]> WPIA git - cassiopeia.git/blobdiff - src/db/database.h
fix: catch another exception
[cassiopeia.git] / src / db / database.h
index f23f61012588a297be5d2d577adc36d3716c0bf3..31687b13ce43242e68ab14babba87ae25e2908f6 100644 (file)
@@ -26,6 +26,7 @@ struct AVA {
 struct TBSCertificate {
     std::string md;
     std::string profile;
+
     /**
      * CSR path
      */
@@ -34,25 +35,31 @@ struct TBSCertificate {
     std::string csr_content;
     std::vector<std::shared_ptr<SAN>> SANs;
     std::vector<std::shared_ptr<AVA>> AVAs;
-};
 
+    std::string wishFrom;
+    std::string wishTo;
+};
 
 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;
 };