Skip to content

Commit abb3fba

Browse files
committed
Add support for badAttestationStatement error
1 parent d78e230 commit abb3fba

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/acme/client/error.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class AutoRenewalCancellationInvalid < ServerError; end
9797
class AutoRenewalRevocationNotSupported < ServerError; end
9898
class UnknownDelegation < ServerError; end
9999
class OnionCAARequired < ServerError; end
100+
class BadAttestationStatement < ServerError; end
100101

101102
ACME_ERRORS = {
102103
'urn:ietf:params:acme:error:alreadyReplaced' => AlreadyReplaced,
@@ -129,6 +130,7 @@ class OnionCAARequired < ServerError; end
129130
'urn:ietf:params:acme:error:autoRenewalCancellationInvalid' => AutoRenewalCancellationInvalid,
130131
'urn:ietf:params:acme:error:autoRenewalRevocationNotSupported' => AutoRenewalRevocationNotSupported,
131132
'urn:ietf:params:acme:error:unknownDelegation' => UnknownDelegation,
132-
'urn:ietf:params:acme:error:onionCAARequired' => OnionCAARequired
133+
'urn:ietf:params:acme:error:onionCAARequired' => OnionCAARequired,
134+
'urn:ietf:params:acme:error:badAttestationStatement' => BadAttestationStatement,
133135
}
134136
end

lib/acme/client/problem.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class Acme::Client::Problem
3838
'autoRenewalRevocationNotSupported' => 'A request to revoke an auto-renewal Order has been received',
3939
'unknownDelegation' => 'An unknown configuration is listed in the delegation attribute of the order request',
4040
'onionCAARequired' => 'The CA only supports checking the CAA for Hidden Services in-band, but the client has not provided an in-band CAA',
41-
'alreadyReplaced' => 'The request specified a predecessor certificate that has already been marked as replaced'
41+
'alreadyReplaced' => 'The request specified a predecessor certificate that has already been marked as replaced',
42+
'badAttestationStatement' => 'The attestation statement is unacceptable (e.g. not signed by an attestation authority trusted by the CA)'
4243
}.freeze
4344

4445
def self.from(value)

0 commit comments

Comments
 (0)