aboutsummaryrefslogtreecommitdiffstats
path: root/lacme-accountd
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-21 19:54:25 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-21 19:58:56 +0100
commit1bdaeae835b5c9914f9c2107efda150d643cda12 (patch)
tree77954c523f80735f4aa253975622d1ff62b4e170 /lacme-accountd
parentba6addf54cef0b1536dc87c42a41b4dc207ac884 (diff)
accountd: Improve log message for incoming requests.
Diffstat (limited to 'lacme-accountd')
-rwxr-xr-xlacme-accountd14
1 files changed, 7 insertions, 7 deletions
diff --git a/lacme-accountd b/lacme-accountd
index d4521f9..d8c96b0 100755
--- a/lacme-accountd
+++ b/lacme-accountd
@@ -233,20 +233,20 @@ sub conn($$$) {
while (defined (my $data = $in->getline())) {
$data =~ s/\r\n\z// or panic();
- my ($protected, $payload) = split(/\./, $data, 2);
- unless (defined $protected and $protected =~ /\A[A-Za-z0-9\-_]+\z/) {
- info("[$id] >>> Error: Malformed protected data, refusing to sign!");
+ my ($header, $payload) = split(/\./, $data, 2);
+ unless (defined $header and $header =~ /\A[A-Za-z0-9\-_]+\z/) {
+ info("[$id] >>> Error: Refusing to sign request: Malformed protected header");
last;
}
unless (defined $payload and $payload =~ /\A[A-Za-z0-9\-_]*\z/) {
# POST-as-GET yields an empty payload
- info("[$id] >>> Error: Malformed payload data, refusing to sign!");
+ info("[$id] >>> Error: Refusing to sign request: Malformed payload");
last;
}
- logmsg(noquiet => "[$id] >>> Incoming signature request for ",
- "base64url(", decode_base64url($protected), ") . ",
- "base64url(", decode_base64url($payload), ")");
+ logmsg(noquiet => "[$id] >>> OK signing request: ",
+ "header=base64url(", decode_base64url($header), "); ",
+ "playload=base64url(", decode_base64url($payload), ")");
my $sig = $SIGN->($data);
$out->printflush( encode_base64url($sig), "\r\n" ) or warn "print: $!";