open62541pp 0.15.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::crypto Namespace Reference

Classes

struct  CreateCertificateResult
 

Enumerations

enum class  CertificateFormat
 

Functions

CreateCertificateResult createCertificate (Span< const String > subject, Span< const String > subjectAltName, CertificateFormat certificateFormat=CertificateFormat::DER)
 

Enumeration Type Documentation

◆ CertificateFormat

Enumerator
DER 
PEM 

Definition at line 13 of file create_certificate.hpp.

Function Documentation

◆ createCertificate()

CreateCertificateResult opcua::crypto::createCertificate ( Span< const String > subject,
Span< const String > subjectAltName,
CertificateFormat certificateFormat = CertificateFormat::DER )

Create a self-signed X.509 v3 certificate.

It is recommended to store the generated certificate on disk for reuse, so the application can be recognized across several executions.

Note
Only available with open62541 >= v1.3 and OpenSSL/LibreSSL
Parameters
subjectElements for the subject, e.g. {"C=DE", "O=SampleOrganization", "CN=Open62541Server@localhost"}
subjectAltNameElements for SubjectAltName, e.g. {"DNS:localhost", "URI:urn:open62541.server.application"}
certificateFormatCertificate format, either DER or PEM
Exceptions
BadStatus(BadOutOfMemory)
CreateCertificateError
See also
UA_CreateCertificate