dodo
0.0.1
A C++ library to create containerized Linux services
|
Interface common to X509 documents. More...
#include <x509cert.hpp>
Data Structures | |
struct | Identity |
Attributes that together constitute a X509 identity. More... | |
struct | SAN |
Subject AltName record. More... | |
Public Types | |
enum | SANType { SANType::stDNS = GEN_DNS, SANType::stURI = GEN_URI, SANType::stEMAIL = GEN_EMAIL, SANType::stIP = GEN_IPADD } |
The SubjectAltName type. More... | |
enum | X509Type { X509Type::Unknown, X509Type::PrivateKey, X509Type::PublicKey, X509Type::CertificateSigningRequest, X509Type::Certificate } |
Enumeration of X509 document types. More... | |
Static Public Member Functions | |
static X509Type | detectX509Type (const std::string file, std::string &tag) |
Detects a X509 document type from a PEM file. More... | |
static std::string | SANTypeAsString (const SANType &san_type) |
Convert the SANType name to a string. More... | |
Static Protected Member Functions | |
static Identity | parseIdentity (const std::string src) |
Parse a subject or issuer string into an Identity. More... | |
Private Member Functions | |
X509Common ()=delete | |
Never construct, interface class. More... | |
~X509Common ()=delete | |
Never destruct, interface class. More... | |
Interface common to X509 documents.
See Secure sockets for details on the role of this class.
Definition at line 39 of file x509cert.hpp.
|
strong |
The SubjectAltName type.
Enumerator | |
---|---|
stDNS | A DNS name such as myhost.mydomain.org. |
stURI | An URI. |
stEMAIL | An email address. |
stIP | An IPv4 or IPv6 address. |
Definition at line 45 of file x509cert.hpp.
|
strong |
Enumeration of X509 document types.
Definition at line 165 of file x509cert.hpp.
|
privatedelete |
Never construct, interface class.
|
privatedelete |
Never destruct, interface class.
|
static |
Detects a X509 document type from a PEM file.
The PEM is not checked on validity, and a result other than X509Type::Unknown does not imply the document is well formed and valid. Note that both private key and encrypted private key PEM files are identified as X509Type::PrivateKey.
file | The file name to be content-checked. |
tag | Receives the PEM tag (eg 'CERTIFICATE','PRIVATE KEY',..). |
Definition at line 41 of file x509cert.cpp.
References Certificate, CertificateSigningRequest, PrivateKey, PublicKey, and Unknown.
|
staticprotected |
Parse a subject or issuer string into an Identity.
src | The identity string |
Definition at line 61 of file x509cert.cpp.
References dodo::network::X509Common::Identity::businessCategory, dodo::network::X509Common::Identity::commonName, dodo::network::X509Common::Identity::countryCode, dodo::network::X509Common::Identity::email, dodo::common::escapedSplit(), dodo::network::X509Common::Identity::jurisdictionC, dodo::network::X509Common::Identity::jurisdictionST, dodo::network::X509Common::Identity::locality, dodo::network::X509Common::Identity::organization, dodo::network::X509Common::Identity::organizationUnit, dodo::network::X509Common::Identity::other, dodo::network::X509Common::Identity::postalCode, dodo::network::X509Common::Identity::serialNumber, dodo::common::split(), dodo::network::X509Common::Identity::state, and dodo::network::X509Common::Identity::street.
Referenced by dodo::network::X509Certificate::getIssuer(), dodo::network::X509CertificateSigningRequest::getSubject(), and dodo::network::X509Certificate::getSubject().
|
inlinestatic |