NET_PRES_CertStoreGetServerCert Function

C

bool NET_PRES_CertStoreGetServerCert(const uint8_t ** serverCertPtr, int32_t * serverCertSize, const uint8_t ** serverKeyPtr, int32_t * serverKeySize, uint8_t certIndex); 

Returns

  • true - Indicates success

  • false - Indicates failure

Description

Get Server Certificate and Key function This function is used by server connections to retrieve their certificate and private key. Multiple server certificates can be stored in the certificate store, for example one for a Web server and one for a mail server.

Preconditions

None.

Parameters

ParametersDescription
serverCertPtrA pointer to the server certificate
serverCertSizeThe size of the server certificate
serverKeyPtrA pointer to the server private key
serverKeySizeThe size of the server private key
certIndexMost likely '0', but this parameter is provided to select a different server certificate