]> WPIA git - cassiopeia.git/blobdiff - src/db/database.h
chg: make cassiopeia conform to db schema version 33
[cassiopeia.git] / src / db / database.h
index b67ce665107d3b2aa11107a734aa29a7f10320a5..e457196077f2c32b4ceb18dab2ebd37a90e57bae 100644 (file)
@@ -26,35 +26,37 @@ struct AVA {
 struct TBSCertificate {
     std::string md;
     std::string profile;
-    /**
-     * CSR path
-     */
-    std::string csr;
+
     std::string csr_type;
     std::string csr_content;
     std::vector<std::shared_ptr<SAN>> SANs;
     std::vector<std::shared_ptr<AVA>> AVAs;
-};
 
+    std::string wishFrom;
+    std::string wishTo;
+
+    std::string ocspCA;
+};
 
 struct SignedCertificate {
     std::string certificate;
     std::string serial;
-    uint32_t before;
-    uint32_t after;
+    std::string before;
+    std::string after;
     std::string pkHash;
     std::string certHash;
-    std::string crt_name;
     std::string log;
     std::string ca_name;
 };
 
 class JobProvider {
 public:
+    virtual ~JobProvider() = default;
     virtual std::shared_ptr<Job> fetchJob() = 0;
     virtual void finishJob( std::shared_ptr<Job> job ) = 0;
     virtual void failJob( std::shared_ptr<Job> job ) = 0;
     virtual std::shared_ptr<TBSCertificate> fetchTBSCert( std::shared_ptr<Job> job ) = 0;
     virtual void writeBack( std::shared_ptr<Job> job, std::shared_ptr<SignedCertificate> res ) = 0;
     virtual std::pair<std::string, std::string> getRevocationInfo( std::shared_ptr<Job> job ) = 0;
+    virtual void writeBackRevocation( std::shared_ptr<Job> job, std::string date ) = 0;
 };