]> the.earth.li Git - onak.git/commitdiff
cscvs to tla changeset 137
authorJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:48:28 +0000 (23:48 +0000)
committerJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:48:28 +0000 (23:48 +0000)
Author: noodles
Date: 2004/05/29 02:52:56
Allow more RSA types without warning for Type 2/3 keys.

keyid.c

diff --git a/keyid.c b/keyid.c
index 95b5dd4452ce7c400557dee75e9e321629b50b7c..34ab145df0bb0c847ed015896686ce237251cb9b 100644 (file)
--- a/keyid.c
+++ b/keyid.c
@@ -5,7 +5,7 @@
  *
  * Copyright 2002 Project Purple
  *
- * $Id: keyid.c,v 1.8 2003/11/01 19:25:15 noodles Exp $
+ * $Id: keyid.c,v 1.9 2004/05/29 02:52:56 noodles Exp $
  */
 
 #include <sys/types.h>
@@ -135,11 +135,12 @@ uint64_t get_packetid(struct openpgp_packet *packet)
                        keyid += packet->data[offset++];
                }
                /*
-                * I thought we needed to ensure it's an RSA key, but pks
-                * doesn't seem to care and I've seen some type 3 keys.
-                * So just log a warning.
+                * Check for an RSA key; if not then log but accept anyway.
+                * 1 == RSA
+                * 2 == RSA Encrypt-Only
+                * 3 == RSA Sign-Only
                 */
-               if (packet->data[7] != 1) {
+               if (packet->data[7] < 1 || packet->data[7] > 3) {
                        logthing(LOGTHING_NOTICE,
                                "Type 2 or 3 key, but not RSA: %llx (type %d)",
                                keyid,