Home GnuPG
Diffusion GnuPG 30ec869b8c63

gpg: Fix segv with RSA_S keys.
30ec869b8c63Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Fix segv with RSA_S keys.

* g10/misc.c (pubkey_get_npkey, pubkey_get_nskey)
(pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to
GCRY_PK_RSA.

The problem is that Libgcrypt has no more support for the alternate
RSA ids and thus if asking for the number of parameters, they will
return zero. Now, this leads to packing the key parameters into an
opaque MPI but because the algorithm id is actually known to GPG, it
assumes valid RSA parameters.

An example key with RSA_S is 0x5434509D.

Details

Provenance
wernerAuthored on Jan 11 2012, 8:15 PM
Parents
rGb42bc48dfb4b: estream: Avoid printing leading zeroes by %p on 32 bit systems.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG30ec869b8c63: gpg: Fix segv with RSA_S keys. (authored by Werner Koch <wk@gnupg.org>).Jan 11 2012, 8:15 PM