From f04190bafa2ac2142856bb79cb7643ae9e13a58a Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 12 Mar 2018 20:37:12 +0100 Subject: [PATCH] #191 X509Certificate::import() now auto-detects format --- doc/book/net.tex | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/doc/book/net.tex b/doc/book/net.tex index 1e5f1803..ac3b70c3 100644 --- a/doc/book/net.tex +++ b/doc/book/net.tex @@ -931,17 +931,7 @@ vmime::shared_ptr vmime::utility::inputStreamAdapter is(certFile); vmime::shared_ptr 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; }