NSSLSetClientPKIExternal

Syntax

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

NSSL_RVAL NSSLSetClientPKIExternal(NSSLContextHandle context,
                                   const u8* pClientCert,
                                   int clientCertLen,
                                   NSSLCertType clientCertType,
                                   const u8* pClientPrivKey,
                                   int clientPrivKeyLen,
                                   NSSLPrivKeyType clientPrivKeyType);

Parameters

context The context for which the client certificate is to be set.
pClientCert Certificate buffer. (The buffer size and address should be aligned to NSSL_IO_BUFFER_ALIGN.)
clientCertLen Certificate buffer length (max size 4KB).
clientCertType Type of the certificate (currently only NSSL_CERT_TYPE_DER is supported; pClientCert should contain client certificate in DER format).
pClientPrivKey Private key buffer. (The buffer size and address should be aligned to NSSL_IO_BUFFER_ALIGN.)
clientPrivKeyLen Private key buffer length (max size 4KB).
clientPrivKeyType Type of the private key (currently only NSSL_PRIV_KEY_TYPE_RSA is supported; pClientPrivKey should contain RSA private key in PKCS#1 format).

Return Values

NSSL_RVAL_OK on success, error code of type NSSL_RVAL on failure.

Description

Sets a client certificate and private key to be used in case the server performs client certificate verification. The certificate and private key will be used for all the connections created under the context.

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

NSSLAddServerPKIExternal
NSSLAddServerPKI
NSSLAddServerPKIExternal
NSSLAddServerPKIGroups

Revision History

2012/08/16 Cleanup pass.
2012/04/06 Initial version.


CONFIDENTIAL