From: Jonathan McDowell Date: Mon, 31 May 2004 23:48:28 +0000 (+0000) Subject: cscvs to tla changeset 137 X-Git-Tag: 0.3.0~47 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=6bcfac5f53de9dff2f646da360b7da1a6e3aa7c1;p=onak.git cscvs to tla changeset 137 Author: noodles Date: 2004/05/29 02:52:56 Allow more RSA types without warning for Type 2/3 keys. --- diff --git a/keyid.c b/keyid.c index 95b5dd4..34ab145 100644 --- 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 @@ -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,