diff options
Diffstat (limited to 'lacme-accountd')
-rwxr-xr-x | lacme-accountd | 14 |
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: $!"; |