NewPG is now GnuPG 1.9

Werner Koch wk at gnupg.org
Wed Aug 6 15:47:02 CEST 2003


On Wed, 06 Aug 2003 13:38:49 +0200, Simon Josefsson said:

> Perhaps this isn't a new problem though (gpg 1.3 behave the same), but
> it would be nice to have GnuPG prefer a valid key, when available.

Oops.  It should not allow to use an expired key.  1.9 has been forked
from 1.3 not too long ago and I try to keep it in sync.

> 1280-bit RSA key, ID B565716F, created 2002-05-05
 
> gpg: signing failed: Invalid public key algorithm

Part of the code is from 1.1.2.  Here is the fix:


diff -u -r1.1.2.3 pkglue.c
--- g10/pkglue.c        5 Aug 2003 17:11:02 -0000       1.1.2.3
+++ g10/pkglue.c        6 Aug 2003 12:42:56 -0000
@@ -48,6 +48,13 @@
                            "(private-key(dsa(p%m)(q%m)(g%m)(y%m)(x%m)))",
                            skey[0], skey[1], skey[2], skey[3], skey[4]);
     }
+  else if (algo == GCRY_PK_RSA)
+    {
+      rc = gcry_sexp_build (&s_skey, NULL,
+                           "(private-key(rsa(n%m)(e%m)(d%m)(p%m)(q%m)(u%m)))",
+                           skey[0], skey[1], skey[2], skey[3], skey[4],
+                           skey[5]);
+    }
   else if (algo == GCRY_PK_ELG || algo == GCRY_PK_ELG_E)
     {
       rc = gcry_sexp_build (&s_skey, NULL,




-- 
Werner Koch                                      <wk at gnupg.org>
The GnuPG Experts                                http://g10code.com
Free Software Foundation Europe	                 http://fsfeurope.org





More information about the Gnupg-devel mailing list