open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
pki.h File Reference
#include <open62541/types.h>
#include <open62541/types_generated.h>
#include <open62541/plugin/log.h>

Go to the source code of this file.

Data Structures

struct  UA_CertificateVerification
 

Typedefs

typedef struct UA_CertificateVerification UA_CertificateVerification
 

Functions

UA_EXPORT UA_StatusCode UA_PKI_decryptPrivateKey (const UA_ByteString privateKey, const UA_ByteString password, UA_ByteString *outDerKey)
 

Typedef Documentation

◆ UA_CertificateVerification

Definition at line 20 of file pki.h.

Function Documentation

◆ UA_PKI_decryptPrivateKey()

UA_EXPORT UA_StatusCode UA_PKI_decryptPrivateKey ( const UA_ByteString  privateKey,
const UA_ByteString  password,
UA_ByteString outDerKey 
)

Decrypt a private key in PEM format using a password.

The output is the key in the binary DER format. Also succeeds if the PEM private key does not require a password or is already in the DER format. The outDerKey memory is allocated internally.

Returns UA_STATUSCODE_BADSECURITYCHECKSFAILED if the password is wrong.