X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fdatabase.h;h=b438187d8be3b66c1df7a3afb68fa3b4924556a1;hb=7a72391242e316a16992e0874a118999486afb87;hp=46aed6c012ba0fec675371e1fb4890347008359f;hpb=08f8da2e81d783d851e9d0a4bbaded420a665d6f;p=cassiopeia.git diff --git a/src/database.h b/src/database.h index 46aed6c..b438187 100644 --- a/src/database.h +++ b/src/database.h @@ -2,6 +2,12 @@ #include #include +#include + +struct Profile { + std::string cert; + std::string key; +}; struct Job { std::string id; @@ -10,14 +16,36 @@ 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; 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; }; class JobProvider { @@ -25,4 +53,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; };