]> WPIA git - cassiopeia.git/blob - src/crypto/simpleOpensslSigner.h
upd: split revoking command into add-serial and revoke
[cassiopeia.git] / src / crypto / simpleOpensslSigner.h
1 #pragma once
2
3 #include <openssl/ssl.h>
4
5 #include "db/database.h"
6 #include "crypto/sslUtil.h"
7 #include "crypto/signer.h"
8 #include "crypto/CRL.h"
9
10 class SimpleOpensslSigner : public Signer {
11 private:
12     static std::shared_ptr<int> lib_ref;
13     std::pair<std::shared_ptr<BIGNUM>, std::string> nextSerial( Profile& prof, std::shared_ptr<CAConfig> ca );
14 public:
15     SimpleOpensslSigner();
16     ~SimpleOpensslSigner();
17     std::shared_ptr<SignedCertificate> sign( std::shared_ptr<TBSCertificate> cert );
18     std::pair<std::shared_ptr<CRL>, std::string> revoke( std::shared_ptr<CAConfig> ca, std::vector<std::string> serial );
19 };