X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fdatabase.h;h=ca90bd447e591a01cd5272ab4b676abf66ccdc70;hb=1da0a75827f3b6af11c6a30880984c511cb624c9;hp=e719df63628ba2923b6a7b3b0088eff0b56390e3;hpb=e0d596ece5c45eba590040a822f4108657f217f0;p=cassiopeia.git diff --git a/src/database.h b/src/database.h index e719df6..ca90bd4 100644 --- a/src/database.h +++ b/src/database.h @@ -2,6 +2,7 @@ #include #include +#include struct Job { std::string id; @@ -10,13 +11,40 @@ struct Job { std::string from; std::string to; }; + +struct SAN { + std::string content; + std::string type; +}; + +struct AVA { + std::string name; + std::string value; +}; + struct TBSCertificate { - std::string CN; - std::string subj; std::string md; std::string profile; + /** + * CSR path + */ std::string csr; std::string csr_type; + std::string csr_content; + std::vector> SANs; + std::vector> AVAs; +}; + + +struct SignedCertificate { + std::string certificate; + std::string serial; + uint32_t before; + uint32_t after; + std::string pkHash; + std::string certHash; + std::string crt_name; + std::string log; }; class JobProvider { @@ -24,4 +52,5 @@ public: virtual std::shared_ptr fetchJob() = 0; virtual bool finishJob( std::shared_ptr job ) = 0; virtual std::shared_ptr fetchTBSCert( std::shared_ptr job ) = 0; + virtual void writeBack( std::shared_ptr job, std::shared_ptr res ) = 0; };