nn::ssl::ClientCert::Initialize Member Function

Syntax

nn::Result Initialize(
     const u8 * pCertData,
     size_t certDataSize,
     const u8 * pPrivateKeyData,
     size_t privateKeyDataSize
);

Arguments

Name Description
in pCertData Certificate data. The data format is X.509 v3 certificate data (ASN.1 definition) that has been DER-encoded to binary data.
in certDataSize Size of pCertData.
in pPrivateKeyData Private key data. X.509 key data (ASN.1 definition) that has been DER-encoded to binary data.
in privateKeyDataSize Size of pPrivateKeyData.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
Result::IsSuccess Process was successful.
ResultProtocolFailedErr Error indicating failure to register a certificate. The function returns this value in cases such as when the total number of certificates registered by the SSL library has reached the maximum allowed by the system. Unregistering a locally registered certificate or trying again later (provided another module unregisters a certificate in the meantime) may succeed.
ResultNotInitializedErr Error indicating that the library is not initialized. None of the functions in this library can be run without first running nn::ssl::Initialize.
A value other than the above. Unexpected error (see ssl_Result.h for error details).

Description

Registers a certificate and private key, and initializes the client certificate.


CONFIDENTIAL