summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp
index fd94ec8..73058a5 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.cpp
@@ -7,6 +7,7 @@
7#include <Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.h> 7#include <Swiften/TLS/OpenSSL/OpenSSLCertificateFactory.h>
8 8
9#include <openssl/pem.h> 9#include <openssl/pem.h>
10#include <openssl/err.h>
10 11
11namespace Swift { 12namespace Swift {
12 13
@@ -44,6 +45,11 @@ std::vector<std::shared_ptr<Certificate>> OpenSSLCertificateFactory::createCerti
44 } 45 }
45 } 46 }
46 47
48 // Clear any (expected) errors which resulted from PEM parsing
49 // If we don't do this, any existing TLS context will detect these
50 // spurious errors and fail to work
51 ERR_clear_error();
52
47 return certificateChain; 53 return certificateChain;
48} 54}
49 55