our
(
%TYPE_DESCRIPTION
);
detail
instance
status
title
type
)
;
BEGIN {
%TYPE_DESCRIPTION
= (
badCSR
=>
'The CSR is unacceptable (e.g., due to a short key)'
,
badNonce
=>
'The client sent an unacceptable anti-replay nonce'
,
connection
=>
'The server could not connect to the client for validation'
,
dnssec
=>
'The server could not validate a DNSSEC signed domain'
,
caa
=>
'CAA records forbid the CA from issuing'
,
malformed
=>
'The request message was malformed'
,
serverInternal
=>
'The server experienced an internal error'
,
tls
=>
'The server experienced a TLS error during validation'
,
unauthorized
=>
'The client lacks sufficient authorization'
,
unknownHost
=>
'The server could not resolve a domain name'
,
rateLimited
=>
'The request exceeds a rate limit'
,
invalidContact
=>
'The provided contact URI for a registration was invalid'
,
rejectedIdentifier
=>
'The server will not issue for the identifier'
,
unsupportedIdentifier
=>
'Identifier is not supported, but may be in the future'
,
agreementRequired
=>
'The client must agree to terms before proceeding'
,
);
}
sub
type {
my
(
$self
) =
@_
;
return
$self
->SUPER::type() ||
'about:blank'
;
}
sub
description {
my
(
$self
) =
@_
;
my
$type
=
$self
->type();
if
( !(
$type
=~ s<\Aurn:ietf:params:acme:error:><> ) ) {
$type
=~ s<\Aurn:acme:error:><>;
}
return
$TYPE_DESCRIPTION
{
$type
};
}
sub
to_string {
my
(
$self
) =
@_
;
my
$type
=
$self
->type();
if
(
my
$desc
=
$self
->description() ) {
$type
=
sprintf
"%s (%s)"
,
$desc
,
$type
;
}
my
$detail
=
$self
->detail();
if
(
defined
$detail
&&
length
$detail
) {
return
sprintf
"%s (%s)"
,
$self
->detail(),
$type
;
}
return
$type
;
}
1;