#include <stdbool.h>
#include "sopc_crypto_decl.h"
#include "sopc_enums.h"
#include "pkix/x509_common.h"
Go to the source code of this file.
◆ SOPC_KeyManagerInternal_Certificate_GetPublicKey()
Returns the internal public key of the given signed public key.
- Warning
- The returned SOPC_AsymmetricKey must not be freed with SOPC_KeyManager_AsymmetricKey_Free() and the key must not be used after the SOPC_CertificateList is freed by SOPC_KeyManager_Certificate_Free().
-
A special flag
isBorrowedFromCert
is set to !FALSE in this case in the SOPC_AsymmetricKey.
- Parameters
-
pCert | A valid pointer to the signed public key. |
pKey | A valid pointer to the SOPC_AsymmetricKey which will be rewritten to contain the public key. This is not a deep copy, and the key is not valid anymore when the certificate is not valid. |
- Note
- Content of the certificate is unspecified when return value is not SOPC_STATUS_OK.
- Returns
- SOPC_STATUS_OK when successful, SOPC_STATUS_INVALID_PARAMETERS when parameters are NULL, and SOPC_STATUS_NOK when there was an error.