]> WPIA git - cassiopeia.git/blobdiff - src/crypto/sslUtil.cpp
fix: Fix memory-leak in CRL.cpp, revocation from DB, multiple CAs
[cassiopeia.git] / src / crypto / sslUtil.cpp
index fd00e8fb85a94db8367299a6d52e676c5cd278bb..9487e42a7253a98d581f7509498e477b8f314da4 100644 (file)
@@ -168,7 +168,6 @@ std::shared_ptr<BIO> openSerial( const std::string name ) {
     }
 
     setupSerial( f );
-
     std::shared_ptr<BIO> b( BIO_new_fd( fileno( f ), 0 ), BIO_free );
     return b;
 }
@@ -178,4 +177,6 @@ CAConfig::CAConfig( std::string name ) {
     this->path = "ca/" + name;
     ca = loadX509FromFile( path + "/ca.crt" );
     caKey = loadPkeyFromFile( path + "/ca.key" );
+    ASN1_TIME* tm = X509_get_notBefore( ca );
+    notBefore = std::shared_ptr<ASN1_TIME>( tm, ASN1_TIME_free );
 }