Documentation  |   Table of Contents   |  < Previous   |  Next >  

106    SslLib.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

The SSL Library functions no longer take an SSL Library reference number as their first parameter. A couple of APIs (the SslExtendedItem, SslExtendedItems, and SslVerify structures, and the sslVerify... constants) are no longer declared in the public headers; if you need to use them, you must declare them yourself. And the SSL Verify callback receives CertMgrVerifyFail... values to indicate that an error occurred, rather than sslErrVerify... values.

Deleted APIs ^TOP^

Table 106.1  Deleted macros

Deleted API

Use instead

sslErrVerify()

CertMgrVerifyFailure()

Table 106.2  Deleted structures 

Deleted API

Use instead

SslExtendedItem

See "The SslExtendedItem Structure" of Exploring Palm OS: Security and Cryptography.

SslExtendedItems

See "The SslExtendedItems Structure" of Exploring Palm OS: Security and Cryptography.

SslVerify

See "The SslVerify Structure" of Exploring Palm OS: Security and Cryptography.

Table 106.3  Deleted #defines 

Deleted API

Use instead

kSsl...

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

sslErrVerifyBadSignature

CertMgrVerifyFailSignature

sslErrVerifyConstraintViolation

CertMgrVerifyFailBasicConstraints

sslErrVerifyNotAfter

CertMgrVerifyFailNotAfter

sslErrVerifyNotBefore

CertMgrVerifyFailNotBefore

sslErrVerifyNoTrustedRoot

CertMgrVerifyFailUnknownIssuer

sslErrVerifyUnknownCriticalExtension

CertMgrVerifyFailCriticalExtension

sslVerifyDone

6

sslVerifyExtensions

5

sslVerifyFindParent

1

sslVerifyNotAfterFindParent

4

sslVerifyNotBefore

3

sslVerifySignature

2

Modified APIs ^TOP^

Table 106.4  Modified functions 

Modified API

Description of change

status_t SslClose (SslContext *, uint16_t, uint32_t)

You no longer need to supply an SSL library reference number.

void SslConsume (SslContext *, int32_t)

You no longer need to supply an SSL library reference number.

status_t SslContextCreate (SslLib *, SslContext **)

You no longer need to supply an SSL library reference number.

void SslContextDestroy (SslContext *)

You no longer need to supply an SSL library reference number.

int32_t SslContextGetLong (SslContext *, SslAttribute)

You no longer need to supply an SSL library reference number.

status_t SslContextGetPtr (SslContext *, SslAttribute, void **)

You no longer need to supply an SSL library reference number.

status_t SslContextSetLong (SslContext *, SslAttribute, long)

You no longer need to supply an SSL library reference number. The final parameter formerly was declared as an Int32.

status_t SslContextSetPtr (SslContext *, SslAttribute, void *)

You no longer need to supply an SSL library reference number.

status_t SslFlush (SslContext *, int32_t *)

You no longer need to supply an SSL library reference number.

status_t SslLibClose (void)

You no longer need to supply an SSL library reference number.

status_t SslLibCreate (SslLib **)

You no longer need to supply an SSL library reference number.

void SslLibDestroy (SslLib *)

You no longer need to supply an SSL library reference number.

int32_t SslLibGetLong (SslLib *, SslAttribute)

You no longer need to supply an SSL library reference number.

status_t SslLibGetPtr (SslLib *, SslAttribute, void **)

You no longer need to supply an SSL library reference number.

status_t SslLibName (void)

You no longer need to supply an SSL library reference number.

status_t SslLibOpen (void)

You no longer need to supply an SSL library reference number.

status_t SslLibSetLong (SslLib *, SslAttribute, int32_t)

You no longer need to supply an SSL library reference number.

status_t SslLibSetPtr (SslLib *, SslAttribute, void *)

You no longer need to supply an SSL library reference number.

status_t SslLibSleep (void)

You no longer need to supply an SSL library reference number.

status_t SslLibWake (void)

You no longer need to supply an SSL library reference number.

status_t SslOpen (SslContext *, uint16_t, uint32_t)

You no longer need to supply an SSL library reference number.

status_t SslPeek (SslContext *, void **, int32_t *, int32_t)

You no longer need to supply an SSL library reference number.

int32_t SslRead (SslContext *, void *, int32_t, status_t *)

You no longer need to supply an SSL library reference number.

int16_t SslReceive (SslContext *, void *, uint16_t, uint16_t, void *, uint16_t *, int32_t, status_t *)

You no longer need to supply an SSL library reference number. Also, the fromLen parameter is now a pointer; on entry, it points to the size of the fromAddr buffer. On exit, the indicated value contains the actual size of the returned address in the fromAddr buffer.

int16_t SslSend (SslContext *, const void *, uint16_t, uint16_t, void *, uint16_t, int32_t, status_t *)

You no longer need to supply an SSL library reference number. Also, the final parameter used to point to a variable of type Err.

int32_t SslWrite (SslContext *, const void *, int32_t, status_t *)

You no longer need to supply an SSL library reference number. Also, the final parameter used to point to a variable of type Err.

Table 106.5  Modified structures

Modified API

Description of change

SslCipherSuiteInfo

The export field was renamed to be exportCipher.

SslSocket

The socket field, formerly declared to be a NetSocketRef, is now an int32_t. The err field is now a status_t. The addr field, formerly declared to be a NetSocketAddrType, is now simply an array of eight unsigned chars.

Table 106.6  Modified #defines

Modified API

Description of change

sslErrVerifyCallback

The value of this #define has changed.

Unchanged APIs ^TOP^

Table 106.7  Unchanged structures

SslCallback

SslCallback_st

SslContext

SslIoBuf

SslLib

SslSession

Table 106.8  Unchanged types

SslAttribute

Table 106.9  Unchanged #defines 

kSslDBName

kSslLibCreator

kSslLibType

sslAlertAccessDenied

sslAlertBadCertificate

sslAlertBadRecordMac

sslAlertCertificateExpired

sslAlertCertificateRevoked

sslAlertCertificateUnknown

sslAlertCloseNotify

sslAlertDecodeError

sslAlertDecompressionFailure

sslAlertDecryptError

sslAlertDecryptionFailed

sslAlertExportRestricion

sslAlertHandshakeFailure

sslAlertIllegalParameter

sslAlertInsufficientSecurity

sslAlertInternalError

sslAlertNoCertificate

sslAlertNoRenegotiation

sslAlertProtocolVersion

sslAlertRecordOverflow

sslAlertUnexpectedMessage

sslAlertUnknownCa

sslAlertUnsupportedCertificate

sslAlertUserCancled

sslArgInfoAlert

sslArgInfoCert

sslArgInfoHandshake

sslArgInfoReadAfter

sslArgInfoReadBefore

sslArgInfoWriteAfter

sslArgInfoWriteBefore

sslCloseDontSendShutdown

sslCloseDontWaitForShutdown

sslCloseUseDefaultTimeout

sslCmdFree

sslCmdGet

sslCmdInfo

sslCmdNew

sslCmdRead

sslCmdReset

sslCmdSet

sslCmdVerify

sslCmdWrite

sslCompat1RecordPerMessage

sslCompatAll

sslCompatBigRecords

sslCompatNetscapeCaDnBug

sslCompatReuseCipherBug

sslCsiAuthNULL

sslCsiAuthRsa

sslCsiCipherNull

sslCsiCipherRc4

sslCsiDigestMd2

sslCsiDigestMd5

sslCsiDigestNull

sslCsiDigestSha1

sslCsiKeyExchNull

sslCsiKeyExchRsa

sslCs_RSA_RC4_128_MD5

sslCs_RSA_RC4_128_SHA1

sslCs_RSA_RC4_40_MD5

sslCs_RSA_RC4_56_SHA1

sslErrBadArgument

sslErrBadDecode

sslErrBadLength

sslErrBadOption

sslErrBadPeerFinished

sslErrBadSignature

sslErrBufferTooSmall

sslErrCbAbort

sslErrCert

sslErrCertDecodeError

sslErrCsp

sslErrDivByZero

sslErrEof

sslErrExtraHandshakeData

sslErrFailed

sslErrFatalAlert

sslErrHandshakeEncoding

sslErrHandshakeProtocol

sslErrInitNotCalled

sslErrInternalError

sslErrIo

sslErrMissingProvider

sslErrNoDmem

sslErrNoMethodSet

sslErrNoModInverse

sslErrNoRandom

sslErrNotFound

sslErrNotImplemented

sslErrNullArg

sslErrOk

sslErrOutOfMemory

sslErrReadAppData

sslErrReallocStaticData

sslErrRecordError

sslErrUnexpectedRecord

sslErrUnsupportedCertType

sslErrUnsupportedSignatureType

sslErrWrongMessage

sslFlgInfoAlert

sslFlgInfoCert

sslFlgInfoHandshake

sslFlgInfoIo

sslHsStateCert

sslHsStateCertB

sslHsStateCertReq

sslHsStateCertReqB

sslHsStateCkEx

sslHsStateCleanup

sslHsStateClientCert

sslHsStateClientHello

sslHsStateClosed

sslHsStateDone

sslHsStateFinished

sslHsStateFlush

sslHsStateGenerateKeys

sslHsStateHelloRequest

sslHsStateNone

sslHsStateReadCcs

sslHsStateReadFinished

sslHsStateReadFinishedB

sslHsStateReadFinishedC

sslHsStateServerDone

sslHsStateServerHello

sslHsStateShutdown

sslHsStateSkEx

sslHsStateSkExAnonDh

sslHsStateSkExDh

sslHsStateSkExRsa

sslHsStateStart

sslHsStateWrite

sslHsStateWriteCcs

sslHsStateWriteClose

sslHsStateWriteFlush

sslLastApiFlush

sslLastApiNone

sslLastApiOpen

sslLastApiRead

sslLastApiShutdown

sslLastApiWrite

sslLastIoNone

sslLastIoRead

sslLastIoWrite

sslModeClear

sslModeFlush

sslModeSsl

sslModeSslClient

sslOpenBufferedReuse

sslOpenDelayHandshake

sslOpenModeClear

sslOpenModeSsl

sslOpenNewConnection

sslOpenNoAutoFlush

sslOpenUseDefaultTimeout

sslVersionSSLv3

Table 106.10  Unchanged application-defined functions

SslCallbackFunc()