pkgsrc/security/gnupg2/patches/patch-al
drochner 5214da8496 kill the "idea" option -- gnupg2 uses libgcrypt which used to have
an "idea" option, but that was removed more than a year ago when it
got updated from 1.2 to 1.4
The patch was was used on gnupg2 in the "idea" case was just a four-line
memory initialization fix, there is no point in LICENSE restrictions
due to this, so I've pulled it in as regular patch so that it doesn't
get lost for the case someone fixes idea support in libgcrypt
(which isn't hard).
2009-12-18 17:49:51 +00:00

17 lines
584 B
Text

$NetBSD: patch-al,v 1.1 2009/12/18 17:49:51 drochner Exp $
--- g10/seckey-cert.c.orig 2009-08-06 17:32:40.000000000 +0000
+++ g10/seckey-cert.c
@@ -209,6 +209,12 @@ do_check( PKT_secret_key *sk, const char
csum += checksum (buffer, ndata);
gcry_mpi_release (sk->skey[i]);
+/* http://www.kfwebs.net/articles/article/42/GnuPG-2.0---IDEA-support */
+ if (sk->protect.algo == CIPHER_ALGO_IDEA) {
+ buffer[0] = 0;
+ buffer[1] = 0;
+ }
+
err = gcry_mpi_scan( &sk->skey[i], GCRYMPI_FMT_PGP,
buffer, ndata, &ndata );
xfree (buffer);