X509CertificateImpl

This class represents X.509 Certificate

Constructors

this
this(DataSource input)

Create a certificate from a data source providing the DER or PEM encoded certificate.

this
this(string filename)

Create a certificate from a file containing the DER or PEM encoded certificate.

this
this(Vector!(ubyte, ALLOC) input)
Undocumented in source.
this
this(RefCounted!(Vector!(ubyte, ALLOC), ALLOC) input)
Undocumented in source.
this
this()
Undocumented in source.

Members

Functions

allowedUsage
bool allowedUsage(KeyConstraints usage)
Undocumented in source. Be warned that the author may not have intended to support it.
allowedUsage
bool allowedUsage(string usage)

Returns true if and only if name (referring to an extended key constraint, eg "PKIX.ServerAuth") is included in the extended key extension.

authorityKeyId
const(Vector!ubyte) authorityKeyId()

Get the DER encoded AuthorityKeyIdentifier of this certificate.

constraints
const(KeyConstraints) constraints()

Get the key constraints as defined in the KeyUsage extension of this certificate.

crlDistributionPoint
string crlDistributionPoint()

Return the CRL distribution point, or empty if not set

endTime
string endTime()

Get the notAfter of the certificate.

exConstraints
const(Vector!string) exConstraints()

Get the key constraints as defined in the ExtendedKeyUsage extension of this certificate.

fingerprint
string fingerprint(string hash_name)

Return a fingerprint of the certificate

forceDecode
void forceDecode()
Undocumented in source. Be warned that the author may not have intended to support it.
isCACert
bool isCACert()

Check whether this certificate is a CA certificate.

isSelfSigned
bool isSelfSigned()

Check whether this certificate is self signed.

isValid
bool isValid()
Undocumented in source. Be warned that the author may not have intended to support it.
issuerDn
const(X509DN) issuerDn()

Get the issuer certificate DN.

issuerInfo
const(Vector!string) issuerInfo(string what)

Get a value for a specific subject_info parameter name.

matchesDnsName
bool matchesDnsName(string name)

Check if a certain DNS name matches up with the information in the cert

ocspResponder
string ocspResponder()

Return the listed address of an OCSP responder, or empty if not set

opBinary
bool opBinary(X509Certificate other)

Impose an arbitrary (but consistent) ordering

opCmp
int opCmp(X509Certificate cert2)

Check two certificates for quality

opEquals
bool opEquals(X509Certificate other)

Check to certificates for equality.

pathLimit
uint pathLimit()

Get the path limit as defined in the BasicConstraints extension of this certificate.

policies
const(Vector!string) policies()

Get the policies as defined in the CertificatePolicies extension of this certificate.

rawIssuerDn
const(Vector!ubyte) rawIssuerDn()

Raw subject DN

rawSubjectDn
const(Vector!ubyte) rawSubjectDn()

Raw issuer DN

serialNumber
const(Vector!ubyte) serialNumber()

Get the serial number of this certificate.

startTime
string startTime()

Get the notBefore of the certificate.

subjectDn
const(X509DN) subjectDn()

Get the subject certificate DN.

subjectInfo
const(Vector!string) subjectInfo(string what)

Get a value for a specific subject_info parameter name.

subjectKeyId
const(Vector!ubyte) subjectKeyId()

Get the DER encoded SubjectKeyIdentifier of this certificate.

subjectPublicKey
PublicKey subjectPublicKey()

Get the public key associated with this certificate.

subjectPublicKeyBits
const(Vector!ubyte) subjectPublicKeyBits()

Get the public key associated with this certificate.

toString
string toString()
x509Version
uint x509Version()

Get the X509 version of this certificate object.

Variables

m_issuer
DataStore m_issuer;
Undocumented in source.
m_self_signed
bool m_self_signed;
Undocumented in source.
m_subject
DataStore m_subject;
Undocumented in source.

Inherited Members

From X509Object

tbsData
const(Vector!ubyte) tbsData()

The underlying data that is to be or was signed

signature
const(Vector!ubyte) signature()
signatureAlgorithm
const(AlgorithmIdentifier) signatureAlgorithm()
hashUsedForSignature
string hashUsedForSignature()
makeSigned
Vector!ubyte makeSigned(PKSigner signer, RandomNumberGenerator rng, AlgorithmIdentifier algo, Vector!(ubyte, ALLOC) tbs_bits)
Vector!ubyte makeSigned(PKSigner signer, RandomNumberGenerator rng, AlgorithmIdentifier algo, RefCounted!(Vector!(ubyte, ALLOC), ALLOC) tbs_bits)

Create a signed X509 object.

checkSignature
bool checkSignature(PublicKey pub_key)

Check the signature on this data

encodeInto
void encodeInto(DEREncoder to)
Undocumented in source. Be warned that the author may not have intended to support it.
decodeFrom
void decodeFrom(BERDecoder from)
Undocumented in source. Be warned that the author may not have intended to support it.
BER_encode
Vector!ubyte BER_encode()
PEM_encode
string PEM_encode()
~this
~this()
Undocumented in source.
doDecode
void doDecode()
Undocumented in source. Be warned that the author may not have intended to support it.
m_sig_algo
AlgorithmIdentifier m_sig_algo;
Undocumented in source.
m_tbs_bits
Vector!ubyte m_tbs_bits;
m_sig
Vector!ubyte m_sig;
Undocumented in source.
forceDecode
void forceDecode()
Undocumented in source.

Meta