This constructor takes a X509_STORE_CTX as provided by the SSLVerifyCallback function.
Returns the peer certificate.
The following example will probably change sometime soon.
Example
extern (C) { int myCallback(int code, X509_STORE_CTX *ctx) { auto myCtx = new CertificateStoreCtx(ctx); Certificate cert = myCtx.cert; Stdout(cert.subject).newline; return 0; // BAD CERT! (1 is good) } }
The CertificateStoreCtx is a wrapper to the SSLVerifyCallback X509_STORE_CTX parameter.
It allows retrieving the peer certificate, and examining any errors during validation.