]> WPIA git - cassiopeia.git/blob - src/database.h
add: Makeing initialization of OpenSSL crypto work
[cassiopeia.git] / src / database.h
1 #pragma once
2
3 #include <string>
4 #include <memory>
5
6 struct Job {
7     std::string id;
8     std::string target;
9     std::string task;
10     std::string from;
11     std::string to;
12 };
13 struct TBSCertificate {
14     std::string CN;
15     std::string subj;
16     std::string md;
17     std::string profile;
18     std::string csr;
19     std::string csr_type;
20     std::string csr_content;
21 };
22
23 class JobProvider {
24 public:
25     virtual std::shared_ptr<Job> fetchJob() = 0;
26     virtual bool finishJob( std::shared_ptr<Job> job ) = 0;
27     virtual std::shared_ptr<TBSCertificate> fetchTBSCert( std::shared_ptr<Job> job ) = 0;
28 };