Jump to main content

##

# 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

Parameters | Description
--- | ---
serverCertPtr | A pointer to the server certificate
serverCertSize | The size of the server certificate
serverKeyPtr | A pointer to the server private key
serverKeySize | The size of the server private key
certIndex | Most likely '0', but this parameter is provided to select a different server certificate