8 #include <openssl/ssl.h>
10 #include "db/database.h"
17 std::shared_ptr<X509> ca;
18 std::shared_ptr<EVP_PKEY> caKey;
19 std::shared_ptr<ASN1_TIME> notBefore;
20 CAConfig( std::string name );
21 bool crlNeedsResign();
30 std::vector<std::shared_ptr<CAConfig>> ca;
31 std::shared_ptr<CAConfig> getCA() {
32 for( auto it = ca.rbegin(); it != ca.rend(); it++ ) {
33 if( X509_cmp_current_time( ( *it )->notBefore.get() ) < 0 ) {
42 extern std::shared_ptr<int> ssl_lib_ref;
44 std::shared_ptr<X509> loadX509FromFile( std::string filename );
45 std::shared_ptr<EVP_PKEY> loadPkeyFromFile( std::string filename );
47 std::shared_ptr<SSL_CTX> generateSSLContext( bool server );
48 std::shared_ptr<BIO> openSerial( const std::string name );
49 std::string timeToString( std::shared_ptr<ASN1_TIME> time );
50 void extractTimes( std::shared_ptr<X509> source, std::shared_ptr<SignedCertificate> cert );