aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-23 00:20:32 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-23 00:20:32 +0100
commitaf5e3d794fc2f83f6cc3b5ddff386dad5463707d (patch)
tree1aae4c275d1c19bd82a0b6d514ef59ba99d042e0 /client
parent0fb2ebb14c538d736d9260fc6fae51d02375a999 (diff)
Consolidate error messages.
Diffstat (limited to 'client')
-rwxr-xr-xclient10
1 files changed, 5 insertions, 5 deletions
diff --git a/client b/client
index fdef865..6438f6a 100755
--- a/client
+++ b/client
@@ -87,13 +87,13 @@ do {
if (defined (my $extra = $2)) {
my $h = eval { JSON::->new->decode($extra) };
if ($@ or !defined $h) {
- print STDERR "WARN: Ignoring extra greeting data from accountd \"$extra\"\n";
+ print STDERR "Warning: Ignoring extra greeting data from accountd \"$extra\"\n";
} else {
print STDERR "Received extra greeting data from accountd: $extra\n" if $ENV{DEBUG};
($JWK_thumbprint, $ALG, $KID) = @$h{qw/jwk-thumbprint alg kid/};
}
}
- my $jwk_str = $S->getline() // die "ERROR: No JWK from lacme-accountd\n";
+ my $jwk_str = $S->getline() // die "Error: No JWK from lacme-accountd\n";
$JWK = JSON::->new->decode($jwk_str);
$JWK_thumbprint //= encode_base64url(sha256(json()->encode($JWK))); # SHA-256 is hardcoded, see RFC 8555 sec. 8.1
$ALG //= "RS256";
@@ -210,7 +210,7 @@ sub acme2($$;$) {
$payload = defined $payload ? encode_base64url(json()->encode($payload)) : "";
$S->printflush($protected, ".", $payload, "\r\n");
- my $sig = $S->getline() // die "ERROR: No response from lacme-accountd\n";
+ my $sig = $S->getline() // die "Error: lost connection with lacme-accountd\n";
$sig =~ s/\r\n\z// or die;
undef $NONCE; # consume the nonce
@@ -249,7 +249,7 @@ sub acme_resource($%) {
if ($r eq "newAccount" or ($r eq "revokeCert" and !defined $KID)) {
# per RFC 8555 sec. 6.2 these requests MUST have a JWK
- print STDERR "WARNING: lacme-accountd supplied an empty JWK; try removing 'keyid' ",
+ print STDERR "Warning: lacme-accountd supplied an empty JWK; try removing 'keyid' ",
"setting from lacme-accountd.conf if the ACME resource request fails.\n"
unless %$JWK;
return acme2($uri, {jwk => $JWK}, \%payload);
@@ -342,7 +342,7 @@ elsif ($COMMAND eq 'newOrder') {
$fh->print($keyAuthorization);
$fh->close() or die "close: $!";
} elsif ($! == EEXIST) {
- print STDERR "WARNING: File exists: $challenge->{token}\n";
+ print STDERR "Warning: File exists: $challenge->{token}\n";
} else {
die "open($challenge->{token}): $!";
}