ddn.net.tls.certificate

Certificate and certificate chain implementations.

Provides concrete implementations of TlsCertificate and TlsCertificateChain backed by parsed X.509 certificate data.

Types 2

X.509 certificate implementation.

Stores certificate fields extracted from DER or PEM data. Instances are typically created during TLS handshake when the peer's certificate chain is received.

Methods
string subjectCommonName() @property const
string issuerCommonName() @property const
string subjectDn() @property const
string issuerDn() @property const
string[] subjectAltNames() @property const
string serialNumber() @property const
long notBefore() @property const
long notAfter() @property const
bool isTimeValid() @property const
bool isTimeValidAt(long atTime) const
string keyAlgorithm() @property const
size_t keySize() @property const
string fingerprintSha256() @property const
string[] extendedKeyUsage() @property const
bool isCa() @property const
int pathLengthConstraint() @property const
const(ubyte)[] toDer() const
string toPem() const
Constructors
this(string subjectCN, string issuerCN, string subjectDN, string issuerDN, string[] san, string serial, long nb, long na, string keyAlg, size_t keySz, string fp, string[] eku, bool ca, int plc, const(ubyte)[] der, string pem)Constructs a NativeTlsCertificate from field values.

Certificate chain implementation.

Stores an ordered list of certificates where index 0 is the end-entity (leaf) certificate, followed by intermediates.

Methods
TlsCertificate[] certificates() @property const
size_t length() @property const
Constructors
this(TlsCertificate[] certificates)Constructs a chain from an array of certificates.