@@ -10,7 +10,7 @@ use std::string::{String, ToString};
1010
1111use http:: Uri ;
1212use ngx:: collections:: Vec ;
13- use serde:: { Deserialize , Serialize } ;
13+ use serde:: { de :: IgnoredAny , Deserialize , Serialize } ;
1414
1515use crate :: conf:: identifier:: Identifier ;
1616
@@ -22,6 +22,7 @@ pub struct DirectoryMetadata {
2222 pub website : Option < Uri > ,
2323 pub caa_identities : Vec < String > ,
2424 pub external_account_required : Option < bool > ,
25+ pub profiles : std:: collections:: BTreeMap < String , IgnoredAny > ,
2526}
2627
2728/// RFC8555 Section 7.1.1 Directory
@@ -118,6 +119,8 @@ pub struct OrderRequest<'a> {
118119 pub not_before : Option < String > ,
119120 #[ serde( skip_serializing_if = "Option::is_none" ) ]
120121 pub not_after : Option < String > ,
122+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
123+ pub profile : Option < & ' a str > ,
121124}
122125
123126#[ derive( Clone , Debug , Deserialize , Eq , PartialEq ) ]
@@ -200,6 +203,7 @@ pub enum ErrorKind {
200203 ExternalAccountRequired ,
201204 IncorrectResponse ,
202205 InvalidContact ,
206+ InvalidProfile ,
203207 Malformed ,
204208 OrderNotReady ,
205209 RateLimited ,
@@ -232,6 +236,7 @@ const ERROR_KIND: &[(&str, ErrorKind)] = &[
232236 ) ,
233237 ( "incorrectResponse" , ErrorKind :: IncorrectResponse ) ,
234238 ( "invalidContact" , ErrorKind :: InvalidContact ) ,
239+ ( "invalidProfile" , ErrorKind :: InvalidProfile ) ,
235240 ( "malformed" , ErrorKind :: Malformed ) ,
236241 ( "orderNotReady" , ErrorKind :: OrderNotReady ) ,
237242 ( "rateLimited" , ErrorKind :: RateLimited ) ,
@@ -331,6 +336,7 @@ impl Problem {
331336 | ErrorKind :: BadSignatureAlgorithm
332337 | ErrorKind :: ExternalAccountRequired
333338 | ErrorKind :: InvalidContact
339+ | ErrorKind :: InvalidProfile
334340 | ErrorKind :: UnsupportedContact
335341 | ErrorKind :: UserActionRequired => ProblemCategory :: Account ,
336342
0 commit comments