aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rwxr-xr-xclient7
1 files changed, 5 insertions, 2 deletions
diff --git a/client b/client
index bcdf6cd..e29d2a0 100755
--- a/client
+++ b/client
@@ -75,8 +75,11 @@ open (my $S, '+<&=', $1+0) or die "fdopen $1: $!";
# Read the protocol version and JSON Web Key (RFC 7517) from the
# lacme-accountd socket
#
-die "Error: Invalid client version\n" unless
- $S->getline() =~ /\A(\d+) OK(?:.*)\r\n\z/ and $1 == $PROTOCOL_VERSION;
+do {
+ my $greeting = $S->getline();
+ die "Error: Invalid client version\n" unless defined $greeting and
+ $greeting =~ /\A(\d+) OK(?:.*)\r\n\z/ and $1 == $PROTOCOL_VERSION;
+};
my $JWK = JSON::->new->decode($S->getline());
my $KID;