From: Felix Dörre Date: Fri, 2 Dec 2016 23:52:56 +0000 (+0000) Subject: upd: more valgrind stuff X-Git-Url: https://code.wpia.club/?a=commitdiff_plain;h=fa810385d9b1b4ed9a40704acbe2265990e67791;hp=e290d5b161394e00585e85a4c8cff37605eb81ed;p=cassiopeia.git upd: more valgrind stuff --- diff --git a/src/crypto/sslUtil.cpp b/src/crypto/sslUtil.cpp index a3432ea..7a0c639 100644 --- a/src/crypto/sslUtil.cpp +++ b/src/crypto/sslUtil.cpp @@ -209,7 +209,7 @@ CAConfig::CAConfig( const std::string& name ) : path( "ca/" + name ), name( name } std::string timeToString( std::shared_ptr time ) { - std::shared_ptr gtime( ASN1_TIME_to_generalizedtime( time.get(), 0 ) ); + std::shared_ptr gtime( ASN1_TIME_to_generalizedtime( time.get(), 0 ), ASN1_GENERALIZEDTIME_free ); std::string strdate( ( char* ) ASN1_STRING_get0_data( gtime.get() ), ASN1_STRING_length( gtime.get() ) ); logger::notef("openssl formatted me a date: %s", strdate); @@ -221,8 +221,8 @@ std::string timeToString( std::shared_ptr time ) { } void extractTimes( std::shared_ptr target, std::shared_ptr cert ) { - cert->before = timeToString( std::shared_ptr( X509_get_notBefore( target.get() ), ASN1_TIME_free ) ); - cert->after = timeToString( std::shared_ptr( X509_get_notAfter( target.get() ), ASN1_TIME_free ) ); + cert->before = timeToString( std::shared_ptr( X509_get_notBefore( target.get() ), [target](auto p){(void)p;} ) ); + cert->after = timeToString( std::shared_ptr( X509_get_notAfter( target.get() ), [target](auto p){(void)p;} ) ); } bool CAConfig::crlNeedsResign() {