]> WPIA git - cassiopeia.git/blobdiff - src/crypto/sslUtil.cpp
add: Implement signing based on requested "wish time"
[cassiopeia.git] / src / crypto / sslUtil.cpp
index 82ff9f80fc8dac1dcda3a7a768a5049f7b4285da..d0710e0a837d8d297dd343f37b1796f18d362e0f 100644 (file)
@@ -3,8 +3,11 @@
 #include <sys/types.h>
 #include <termios.h>
 #include <unistd.h>
+
 #include <iostream>
 
+#include "crypto/CRL.h"
+
 std::shared_ptr<int> ssl_lib_ref(
     new int( SSL_library_init() ),
     []( int* ref ) {
@@ -196,3 +199,8 @@ void extractTimes( std::shared_ptr<X509> target,  std::shared_ptr<SignedCertific
     cert->before = timeToString( std::shared_ptr<ASN1_TIME>( X509_get_notBefore( target.get() ), ASN1_TIME_free ) );
     cert->after = timeToString( std::shared_ptr<ASN1_TIME>( X509_get_notAfter( target.get() ), ASN1_TIME_free ) );
 }
+
+bool CAConfig::crlNeedsResign() {
+    std::shared_ptr<CRL> crl( new CRL( path + "/ca.crl" ) );
+    return crl->needsResign();
+}