OpenVPN 3 Core Library
|
Classes | |
class | DH |
class | PKContext |
class | X509Cert |
class | X509CRL |
Functions | |
static std::string | x509_get_subject (const mbedtls_x509_crt *cert, bool new_format=false) |
static std::string | x509_get_common_name (const mbedtls_x509_crt *cert) |
|
static |
Retrieves just the common name of the X.509 Certificate subject field
cert | Pointer to a native mbedTLS X509 object containing the certificate |
Definition at line 112 of file x509certinfo.hpp.
|
static |
Retrieve the complete X.509 Certificate Subject field
OpenSSL supports two ways of representing the subject line. The old format is deprecated, but there might be code expecting this old format. The old format looks like this:
/C=KG/ST=NA/O=OpenVPN-TEST/CN=Test-Server/emailAddress=me@myhost.mydomain
The new format is UTF-8 compliant and has a different formatting scheme:
C=KG, ST=NA, O=OpenVPN-TEST, CN=Test-Server,
emailAddress=me@my.nosp@m.host.nosp@m..mydo.nosp@m.main
This mbed TLS implementation supports generating a subject line formatted as the deprecated OpenSSL format. This is the default behaviour, to preserve OpenSSL compatibility with existing OpenVPN code.
cert | Pointer to a native mbed TLS X509 object containing the certificate |
new_format | (optional, default: false) Which format to use, true indicates the new format |
Definition at line 56 of file x509certinfo.hpp.