S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
key_manager_cyclone.h File Reference
#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.

Data Structures

struct  SOPC_AsymmetricKey
 The asymmetric key representation. More...
 
struct  SOPC_CertificateList
 The signed public key representation. More...
 
struct  SOPC_CRLList
 A list of Certificate Revocation Lists. More...
 
struct  SOPC_CSR
 

Functions

SOPC_ReturnStatus SOPC_KeyManagerInternal_Certificate_GetPublicKey (const SOPC_CertificateList *pCert, SOPC_AsymmetricKey *pKey)
 Returns the internal public key of the given signed public key.
 

Function Documentation

◆ SOPC_KeyManagerInternal_Certificate_GetPublicKey()

SOPC_ReturnStatus SOPC_KeyManagerInternal_Certificate_GetPublicKey ( const SOPC_CertificateList * pCert,
SOPC_AsymmetricKey * pKey )

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
pCertA valid pointer to the signed public key.
pKeyA 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.