This function loads the certificate (in PEM format) contained in the specified buffer.
The format of the certificate data is verified. If the component already has a certificate loaded, it will be replaced on success, and unchanged on failure.
- Parameters
-
pBuffer | [ in ] Buffer holding the certificate |
cBuffer | [ in ] Number of data bytes in pBuffer |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize must be called before this function. |
P6R::eInvalidArg | pBuffer is equal to NULL or cBuffer is set to zero. |
P6R::eNoMemory | Insufficient available memory to copy the certificate from pBuffer. |
P6R::eInvalidCert | The given certificate is in an unsupported format or is corrupted. |