diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2021-02-22 23:20:15 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2021-02-22 23:24:06 +0100 |
commit | 0fb2ebb14c538d736d9260fc6fae51d02375a999 (patch) | |
tree | 8325b431c88108bbf4ecfd9feae4f5e531297f4c | |
parent | a3a7dd6780e77da26c25b026a4453f7f5b2c00ae (diff) |
lacme-accountd: panic() upon internal error of the signing routine.
It might croak and we want to log that error also.
-rwxr-xr-x | lacme-accountd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lacme-accountd b/lacme-accountd index 5478cc2..5109888 100755 --- a/lacme-accountd +++ b/lacme-accountd @@ -269,7 +269,8 @@ sub conn($$$) { last; } - my $sig = $SIGN->($data) // panic(); + my $sig = eval { $SIGN->($data) }; + panic($@) if $@ or !defined $sig; logmsg(noquiet => "[$id] SIGNED ", $req); $out->printflush( encode_base64url($sig), "\r\n" ) or warn "print: $!"; } |