aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-17 11:42:18 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-18 00:42:32 +0100
commit3a5c3f0596398d64bb34498f40becbcd32ffa5de (patch)
treebd66df4f36cc1d8563ad29392ab623aaeb021635 /client
parent0ca64b6236f8fe767181214a97d8428d473b8e32 (diff)
Consolidate error messages for consistency.
Diffstat (limited to 'client')
-rwxr-xr-xclient8
1 files changed, 4 insertions, 4 deletions
diff --git a/client b/client
index e29d2a0..a5490f8 100755
--- a/client
+++ b/client
@@ -97,7 +97,7 @@ my $NONCE;
my $CONFIG = do {
my $conf = do { local $/ = undef; <$CONFFILE> };
- close $CONFFILE or die "Can't close: $!";
+ close $CONFFILE or die "close: $!";
my $h = Config::Tiny::->read_string($conf) or die Config::Tiny::->errstr()."\n";
$h->{_} //= {};
$h->{client}->{$_} //= $h->{_}->{$_} foreach keys %{$h->{_}}; # add defaults
@@ -303,11 +303,11 @@ elsif ($COMMAND eq 'newOrder') {
# serve $keyAuthorization at http://$domain/.well-known/acme-challenge/$challenge->{token}
if (sysopen(my $fh, $challenge->{token}, O_CREAT|O_EXCL|O_WRONLY, 0644)) {
$fh->print($keyAuthorization);
- $fh->close() or die "Can't close: $!";
+ $fh->close() or die "close: $!";
} elsif ($! == EEXIST) {
print STDERR "WARNING: File exists: $challenge->{token}\n";
} else {
- die "Can't open $challenge->{token}: $!";
+ die "open($challenge->{token}): $!";
}
my $r = acme($challenge->{url}, {});
request_json_decode($r);
@@ -378,7 +378,7 @@ elsif ($COMMAND eq 'newOrder') {
elsif ($COMMAND eq 'revokeCert') {
die if @ARGV;
my $der = do { local $/ = undef; <STDIN> };
- close STDIN or die "Can't close: $!";
+ close STDIN or die "close: $!";
# send a KID if the request is signed with the acccount key, otherwise send a JWK
set_kid(0);