]> WPIA git - cassiopeia.git/blobdiff - src/crypto/sslUtil.cpp
upd: clean up valgrind stuff
[cassiopeia.git] / src / crypto / sslUtil.cpp
index 3b63769a6fdee9987e0325edf0578c61db9c9a7f..a3432ea5253c87026814d3eaf1cfa96dc231d858 100644 (file)
@@ -194,7 +194,8 @@ CAConfig::CAConfig( const std::string& name ) : path( "ca/" + name ), name( name
     ca = loadX509FromFile( path + "/ca.crt" );
     caKey = loadPkeyFromFile( path + "/ca.key" );
     ASN1_TIME* tm = X509_get_notBefore( ca.get() );
-    notBefore = std::shared_ptr<ASN1_TIME>( tm, ASN1_TIME_free );
+    auto ca0 = ca;
+    notBefore = std::shared_ptr<ASN1_TIME>( tm, [ca0](auto p){(void)p;} );
     std::size_t pos = name.find("_");
     if (pos == std::string::npos) {
         throw new std::invalid_argument("ca name: " + name + " is malformed.");