NSSLCreateContext

Syntax

#include <cafe.h>
#include <cafe/nssl/nsslclient.h>

NSSLContextHandle NSSLCreateContext(NSSLSSLVersion sslVersion);

Parameters

sslVersion Version of SSL to be used: SSLv3 (NSSL_SSLVERSION_SSLv3), TLS 1.0 (NSSL_SSLVERSION_TLSv1) or automatically select the version (NSSL_SSLVERSION_AUTO).

Return Values

NSSLContextHandle, NSSL context handle (0 or positive value) on success, error code of type NSSL_RVAL on failure.

Description

Creates a context to hold certificates and keys to be used for SSL communication. The certificates and keys associated with a context by the application will be used for all the SSL connections created with the context. An application can create maximum up to 32 contexts.

Do Not Call From

Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also

NSSLDestroyContext
NSSLContextSetMode
NSSLSetClientPKIExternal
NSSLAddServerPKIExternal

Revision History

2015/04/09 Add NSSLContextSetMode to 'See Also'.
2012/08/16 Cleanup pass.
2012/04/06 Initial version.


CONFIDENTIAL