]> WPIA git - cassiopeia.git/blobdiff - src/db/database.h
fix: use correct prepared statement for writing logs
[cassiopeia.git] / src / db / database.h
index 77db633aa636de0658a5173397145f370e8b8fff..b378e92495625384dae46c312f30c408ac299359 100644 (file)
@@ -3,14 +3,16 @@
 #include <string>
 #include <memory>
 #include <vector>
+#include <sstream>
 
 struct Job {
     std::string id;
-    std::string warning;
+    std::string attempt;
     std::string target;
     std::string task;
     std::string from;
     std::string to;
+    std::stringstream log;
 };
 
 struct SAN {
@@ -26,31 +28,32 @@ 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;