]> WPIA git - cassiopeia.git/blob - src/crypto/CRL.h
add: signing of OCSP certificates
[cassiopeia.git] / src / crypto / CRL.h
1 #pragma once
2
3 #include <string>
4 #include <memory>
5
6 #include "crypto/sslUtil.h"
7
8 class CRL {
9 private:
10     std::shared_ptr<X509_CRL> crl;
11 public:
12     CRL( std::string path );
13
14     /**
15      * Adds the serial to this serial.
16      * @param serial the serial to remove (as hex string)
17      * @param time the "revokation time" (der-encoded)
18      * @returns DER-encoded TIME of the revoked time
19      */
20     std::string revoke( std::string serial, std::string time );
21
22     bool needsResign();
23
24     /**
25      * Signs this CRL.
26      * @param ca the CA to sign with
27      */
28     void sign( std::shared_ptr<CAConfig> ca );
29
30     bool verify( std::shared_ptr<CAConfig> ca );
31
32     std::string getSignature();
33     void setSignature( std::string signature );
34
35     std::string toString();
36 };