www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


SSL_SessionNew

Open a new SSL session. Could be used as either SSL server session or SSL client session. If it is used as a server session the field certIdentity in the structure should be non-null, otherwise the SSL server can't run on this session.

int SSL_SessionNew(SSL_SESSION_NEW_EntryPtr newSessionPtr,
                   int *error);

Parameters

newSessionPtr

New SSL structure

error

Output parameter:

  • zero - Success

  • -222 - Invalid argument (Version not supported.)
  • -255 - TCP/IP stack memory allocation failed
  • -202 - Maximum of 8 SSL sessions exceeded

Return Value

>0: Session ID
-1: failed (See error output parameter.)

Comments

Each session maintains its own connect information for the convenience of resumption.   You can resume a previous connection only if the current connect attempt and the previous one are in the same SSL session, and your previous connection cache hasn't been overwritten yet.

For SSL server, all connections spawned from a single listening socket belong to one session, you should assign the session ID to the listening socket. All accepted sockets will inherit that session ID.

For SSL client, user determines which session one connection belongs to. For example, users may decide that any connection to the same SSL server uses a single session ID, so that when user is trying to connect to the same server again, he may resume the previous connection.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV0.91V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.02

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document