X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fdatabase.h;h=081e925651e0325c0798ac2a623991a04d55d1ce;hb=c7f2cead9ad48debc5fd9eaca974beeef1d4dedf;hp=a80b73ed69f2703f9292329d90dd9a068f4b9ab8;hpb=858fcca3a53da84a306f55d1811bf119bf8d862f;p=cassiopeia.git diff --git a/src/database.h b/src/database.h index a80b73e..081e925 100644 --- a/src/database.h +++ b/src/database.h @@ -4,6 +4,11 @@ #include #include +struct Profile { + std::string cert; + std::string key; +}; + struct Job { std::string id; std::string target; @@ -17,15 +22,34 @@ struct SAN { 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 { @@ -33,4 +57,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; };