From e7e1782673f6974b93f1225b80c49a8e6dda0219 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 16 May 2014 12:59:29 +0200 Subject: Add length field to serialised signature. This seems to contradict the spec but is something Googles reference implementation does. --- src/plop.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plop.erl') diff --git a/src/plop.erl b/src/plop.erl index e1c1382..30df046 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -401,9 +401,12 @@ serialise(#sig_and_hash_alg{ [<>]; serialise(#signature{ algorithm = Algorithm, - signature = Signature + signature = Signature % DER encoded. }) -> - [serialise(Algorithm), <>]. + SigLen = size(Signature), + [serialise(Algorithm), + <>, + Signature/binary]. %%%%%%%%%%%%%%%%%%%% %% Tests. -- cgit v1.1