Permalink
Browse files

#191 X509Certificate::import() now auto-detects format

  • Loading branch information...
vincent-richard committed Mar 12, 2018
1 parent abba40e commit f04190bafa2ac2142856bb79cb7643ae9e13a58a
Showing with 1 addition and 11 deletions.
  1. +1 −11 doc/book/net.tex
@@ -931,17 +931,7 @@ \subsubsection{Using the default certificate verifier} % .....................
vmime::utility::inputStreamAdapter is(certFile);
vmime::shared_ptr <vmime::security::cert::X509Certificate> cert;
// Try DER format
cert = vmime::security::cert::X509Certificate::import
(is, vmime::security::cert::X509Certificate::FORMAT_DER);
if (cert != NULL)
return cert;
// Try PEM format
is.reset();
cert = vmime::security::cert::X509Certificate::import
(is, vmime::security::cert::X509Certificate::FORMAT_PEM);
cert = vmime::security::cert::X509Certificate::import(is);
return cert;
}

0 comments on commit f04190b

Please sign in to comment.