From 1ee07f0d2129f0becf0d85ddffdb4235789ce905 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Fri, 22 Jun 2007 16:47:52 +0000 Subject: Add IDEA workaround, bug#159870, thanks to so many people. (Portage version: 2.1.3_rc4) --- app-crypt/gnupg/files/digest-gnupg-2.0.4-r1 | 3 +++ app-crypt/gnupg/files/gnupg-2.0.4-idea.patch | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 app-crypt/gnupg/files/digest-gnupg-2.0.4-r1 create mode 100644 app-crypt/gnupg/files/gnupg-2.0.4-idea.patch (limited to 'app-crypt/gnupg/files') diff --git a/app-crypt/gnupg/files/digest-gnupg-2.0.4-r1 b/app-crypt/gnupg/files/digest-gnupg-2.0.4-r1 new file mode 100644 index 000000000000..8a145e05228d --- /dev/null +++ b/app-crypt/gnupg/files/digest-gnupg-2.0.4-r1 @@ -0,0 +1,3 @@ +MD5 e16efce067ba132f933792a3ec7f180e gnupg-2.0.4.tar.bz2 3575021 +RMD160 7d31526012e32c2fe39fea62c01b5c17d16118ad gnupg-2.0.4.tar.bz2 3575021 +SHA256 3872d7280e5a12a947509c73b70c3024521c29ff4427c8fb4caa17dde2f4248c gnupg-2.0.4.tar.bz2 3575021 diff --git a/app-crypt/gnupg/files/gnupg-2.0.4-idea.patch b/app-crypt/gnupg/files/gnupg-2.0.4-idea.patch new file mode 100644 index 000000000000..aa65cc9f7ac5 --- /dev/null +++ b/app-crypt/gnupg/files/gnupg-2.0.4-idea.patch @@ -0,0 +1,25 @@ + +This is required in order to support IDEA encrypted keys +using gnupg-1.4.X. The raw key has two bytes which are part +of the checksum but not part of the key. + +This will not get into upstream as upstream does not wish to support +IDEA at all even for backward compatibility. + +Signed-off-by: Alon Bar-Lev + +diff -urNp gnupg-2.0.4.org/g10/seckey-cert.c gnupg-2.0.4/g10/seckey-cert.c +--- gnupg-2.0.4.org/g10/seckey-cert.c 2006-11-21 10:26:13.000000000 +0200 ++++ gnupg-2.0.4/g10/seckey-cert.c 2007-06-22 18:08:48.000000000 +0300 +@@ -211,6 +211,11 @@ do_check( PKT_secret_key *sk, const char + csum += checksum (buffer, ndata); + gcry_mpi_release (sk->skey[i]); + ++ if (sk->protect.algo==CIPHER_ALGO_IDEA) { ++ buffer[0] = 0; ++ buffer[1] = 0; ++ } ++ + err = gcry_mpi_scan( &sk->skey[i], GCRYMPI_FMT_USG, + buffer, ndata, &ndata ); + xfree (buffer); -- cgit v1.2.3-65-gdbad