]> WPIA git - cassiopeia.git/blobdiff - src/crypto/simpleOpensslSigner.cpp
add: Full CRL tranfer (non-chunked)
[cassiopeia.git] / src / crypto / simpleOpensslSigner.cpp
index 8eb97d579bc997785cb1abd9804273cc5e2d4138..2aea5c815944a82a3f220e291f02bb91dd04e36d 100644 (file)
@@ -160,12 +160,12 @@ std::shared_ptr<SignedCertificate> SimpleOpensslSigner::sign( std::shared_ptr<TB
     return output;
 }
 
-std::shared_ptr<CRL> SimpleOpensslSigner::revoke( std::shared_ptr<CAConfig> ca, std::string serial ) {
+std::pair<std::shared_ptr<CRL>, std::string> SimpleOpensslSigner::revoke( std::shared_ptr<CAConfig> ca, std::string serial ) {
     std::string crlpath = ca->path + "/ca.crl";
 
     std::shared_ptr<CRL> crl( new CRL( crlpath ) );
-    crl->revoke( serial, "" );
+    std::string date = crl->revoke( serial, "" );
     crl->sign( ca );
-
-    return crl;
+    writeFile( crlpath, crl->toString() );
+    return std::pair<std::shared_ptr<CRL>, std::string>( crl, date );
 }