]> WPIA git - cassiopeia.git/blob - src/remoteSigner.h
chg: Tamper with the signature more efficiently
[cassiopeia.git] / src / remoteSigner.h
1 #pragma once
2 #include <memory>
3 #include <openssl/ssl.h>
4
5 #include "database.h"
6 #include "signer.h"
7 #include "bios.h"
8 #include "opensslBIO.h"
9 #include "record.h"
10
11
12 class RemoteSigner : public Signer {
13 private:
14     std::shared_ptr<BIO> target;
15     std::shared_ptr<SSL_CTX> ctx;
16     int count = 0;
17     void send( std::shared_ptr<OpensslBIOWrapper> bio, RecordHeader& head, RecordHeader::SignerCommand cmd, std::string data );
18 public:
19     RemoteSigner( std::shared_ptr<BIO> target, std::shared_ptr<SSL_CTX> ctx );
20     ~RemoteSigner();
21     std::shared_ptr<SignedCertificate> sign( std::shared_ptr<TBSCertificate> cert );
22 };