Skip to content

Commit f86b466

Browse files
committed
fixup! ACME: allow specifying preferred or required profile.
1 parent 7a5e27a commit f86b466

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

src/acme.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,8 @@ where
302302
.transpose()?;
303303

304304
self.profile = match self.issuer.profile {
305-
Profile::Required(x) | Profile::Preferred(x)
306-
if self.directory.meta.profiles.contains_key(x) =>
307-
{
308-
Some(x)
309-
}
305+
Profile::Required(x) => Some(x),
306+
Profile::Preferred(x) if self.directory.meta.profiles.contains_key(x) => Some(x),
310307
Profile::Preferred(x) => {
311308
ngx::ngx_log_error!(
312309
nginx_sys::NGX_LOG_NOTICE,
@@ -315,7 +312,6 @@ where
315312
);
316313
None
317314
}
318-
Profile::Required(_) => return Err(NewAccountError::Profile),
319315
_ => None,
320316
};
321317

src/acme/error.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ pub enum NewAccountError {
2121
#[error("external account key required")]
2222
ExternalAccount,
2323

24-
#[error("profile is not supported")]
25-
Profile,
26-
2724
#[error(transparent)]
2825
Protocol(#[from] Problem),
2926

@@ -50,7 +47,6 @@ impl NewAccountError {
5047
pub fn is_invalid(&self) -> bool {
5148
match self {
5249
Self::ExternalAccount => true,
53-
Self::Profile => true,
5450
Self::Protocol(err) => matches!(
5551
err.category(),
5652
ProblemCategory::Account | ProblemCategory::Malformed

src/acme/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ impl Problem {
336336
| ErrorKind::BadSignatureAlgorithm
337337
| ErrorKind::ExternalAccountRequired
338338
| ErrorKind::InvalidContact
339-
| ErrorKind::InvalidProfile
340339
| ErrorKind::UnsupportedContact
341340
| ErrorKind::UserActionRequired => ProblemCategory::Account,
342341

343342
ErrorKind::BadCsr
344343
| ErrorKind::Caa
344+
| ErrorKind::InvalidProfile
345345
| ErrorKind::RejectedIdentifier
346346
| ErrorKind::UnsupportedIdentifier => ProblemCategory::Order,
347347

0 commit comments

Comments
 (0)