agent: Compute correct MPI length header for protected ECC keys.
authorWerner Koch <wk@gnupg.org>
Thu, 19 Mar 2015 17:01:58 +0000 (18:01 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 19 Mar 2015 17:01:58 +0000 (18:01 +0100)
commitcf83ff01fce3ddcbde6d97dffa0db6f277588e25
tree70ae6c5d1876318d45249159b986e003775abb22
parentdc10d466bff53821f23d2cb4814c259d40c5d9c5
agent: Compute correct MPI length header for protected ECC keys.

* agent/cvt-openpgp.c (apply_protection): Strip leading zeroes from
opaque MPIs to comply with the OpenPGP spec.
--

This patch is the protected private key counterpart to commit ab17f7b.
Thanks to andy_s for describing the problem.

GnuPG-bug-id: 1853
Signed-off-by: Werner Koch <wk@gnupg.org>
agent/cvt-openpgp.c