1use serde::{Deserialize, Serialize};
2
3#[derive(Deserialize, Debug, Serialize)]
6pub struct GenerateCertificateResponse {
7 pub ca_chain: Option<Vec<String>>,
8 pub certificate: String,
9 pub expiration: Option<u64>,
10 pub issuing_ca: String,
11 pub private_key: String,
12 pub private_key_type: String,
13 pub serial_number: String,
14}
15
16#[derive(Deserialize, Debug, Serialize)]
19pub struct GenerateIntermediateResponse {
20 pub csr: String,
21 pub private_key: Option<String>,
22 pub private_key_type: Option<String>,
23}
24
25#[derive(Deserialize, Debug, Serialize)]
28pub struct GenerateRootResponse {
29 pub certificate: String,
30 pub issuing_ca: String,
31 pub serial_number: String,
32}
33
34#[derive(Deserialize, Debug, Serialize)]
37pub struct ListCertificatesResponse {
38 pub keys: Vec<String>,
39}
40
41#[derive(Deserialize, Debug, Serialize)]
44pub struct ListRolesResponse {
45 pub keys: Vec<String>,
46}
47
48#[derive(Deserialize, Debug, Serialize)]
51pub struct ReadCertificateResponse {
52 pub certificate: String,
53 pub revocation_time: i64,
54 pub ca_chain: Option<String>,
55}
56
57#[derive(Deserialize, Debug, Serialize)]
60pub struct ReadCRLConfigResponse {
61 pub disable: bool,
62 pub expiry: String,
63}
64
65#[derive(Deserialize, Debug, Serialize)]
68pub struct RevokeCertificateResponse {
69 pub revocation_time: u64,
70}
71
72#[derive(Deserialize, Debug, Serialize)]
75pub struct RotateCRLsResponse {
76 pub success: bool,
77}
78
79#[derive(Deserialize, Debug, Serialize)]
82pub struct ReadURLsResponse {
83 pub issuing_certificates: Vec<String>,
84 pub crl_distribution_points: Vec<String>,
85 pub ocsp_servers: Vec<String>,
86}
87
88#[derive(Deserialize, Debug, Serialize)]
91pub struct ReadRoleResponse {
92 pub allow_any_name: bool,
93 pub allow_bare_domains: bool,
94 pub allow_glob_domains: bool,
95 pub allow_ip_sans: bool,
96 pub allow_localhost: bool,
97 pub allow_subdomains: bool,
98 pub allow_token_displayname: bool,
99 pub allowed_domains: Vec<String>,
100 pub allowed_domains_template: bool,
101 pub allowed_other_sans: Vec<String>,
102 pub allowed_serial_numbers: Vec<String>,
103 pub allowed_uri_sans: Vec<String>,
104 pub basic_constraints_valid_for_non_ca: bool,
105 pub client_flag: bool,
106 pub code_signing_flag: bool,
107 pub country: Vec<String>,
108 pub email_protection_flag: bool,
109 pub enforce_hostnames: bool,
110 pub ext_key_usage: Vec<String>,
111 pub ext_key_usage_oids: Vec<String>,
112 pub generate_lease: bool,
113 pub key_bits: u64,
114 pub key_type: String,
115 pub key_usage: Vec<String>,
116 pub locality: Vec<String>,
117 pub max_ttl: u64,
118 pub no_store: bool,
119 pub not_before_duration: u64,
120 pub organization: Vec<String>,
121 pub ou: Vec<String>,
122 pub policy_identifiers: Vec<String>,
123 pub postal_code: Vec<String>,
124 pub province: Vec<String>,
125 pub require_cn: bool,
126 pub server_flag: bool,
127 pub street_address: Vec<String>,
128 pub ttl: u64,
129 pub use_csr_common_name: bool,
130 pub use_csr_sans: bool,
131}
132
133#[derive(Deserialize, Debug, Serialize)]
136pub struct SignCertificateResponse {
137 pub ca_chain: Option<Vec<String>>,
138 pub certificate: String,
139 pub issuing_ca: String,
140 pub serial_number: String,
141}
142
143#[derive(Deserialize, Debug, Serialize)]
146pub struct SignIntermediateResponse {
147 pub ca_chain: Option<Vec<String>>,
148 pub certificate: String,
149 pub issuing_ca: String,
150 pub serial_number: String,
151}
152
153#[derive(Deserialize, Debug, Serialize)]
156pub struct SignSelfIssuedResponse {
157 pub certificate: String,
158 pub issuing_ca: String,
159}