std::shared_ptr<X509> ca;
std::shared_ptr<EVP_PKEY> caKey;
std::shared_ptr<ASN1_TIME> notBefore;
std::shared_ptr<X509> ca;
std::shared_ptr<EVP_PKEY> caKey;
std::shared_ptr<ASN1_TIME> notBefore;
std::shared_ptr<CAConfig> getCA() {
for( auto it = ca.rbegin(); it != ca.rend(); it++ ) {
if( X509_cmp_current_time( ( *it )->notBefore.get() ) < 0 ) {
std::shared_ptr<CAConfig> getCA() {
for( auto it = ca.rbegin(); it != ca.rend(); it++ ) {
if( X509_cmp_current_time( ( *it )->notBefore.get() ) < 0 ) {
-std::shared_ptr<X509> loadX509FromFile( std::string filename );
-std::shared_ptr<EVP_PKEY> loadPkeyFromFile( std::string filename );
+std::shared_ptr<X509> loadX509FromFile( const std::string& filename );
+std::shared_ptr<EVP_PKEY> loadPkeyFromFile( const std::string& filename );
std::string timeToString( std::shared_ptr<ASN1_TIME> time );
void extractTimes( std::shared_ptr<X509> source, std::shared_ptr<SignedCertificate> cert );
std::string timeToString( std::shared_ptr<ASN1_TIME> time );
void extractTimes( std::shared_ptr<X509> source, std::shared_ptr<SignedCertificate> cert );