]> WPIA git - cassiopeia.git/blobdiff - src/database.h
add: Add support for Subject Alternative Names (SANs)
[cassiopeia.git] / src / database.h
index b189807107c64df830378821c8927bb4d80fe988..a80b73ed69f2703f9292329d90dd9a068f4b9ab8 100644 (file)
@@ -2,16 +2,35 @@
 
 #include <string>
 #include <memory>
+#include <vector>
 
 struct Job {
     std::string id;
+    std::string target;
     std::string task;
     std::string from;
     std::string to;
 };
 
+struct SAN {
+    std::string content;
+    std::string type;
+};
+
+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<std::shared_ptr<SAN>> SANs;
+};
+
 class JobProvider {
 public:
     virtual std::shared_ptr<Job> fetchJob() = 0;
     virtual bool finishJob( std::shared_ptr<Job> job ) = 0;
+    virtual std::shared_ptr<TBSCertificate> fetchTBSCert( std::shared_ptr<Job> job ) = 0;
 };