Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib If we get passed a k...
details: https://anonhg.NetBSD.org/src/rev/55397ef9158f
branches: trunk
changeset: 757528:55397ef9158f
user: agc <agc%NetBSD.org@localhost>
date: Thu Sep 02 07:31:16 2010 +0000
description:
If we get passed a key which has no subuids, sigs, fingerprint or any
other data, and has been revoked, don't even attempt to print it out.
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/netpgp.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 824771bacedd -r 55397ef9158f crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Thu Sep 02 06:00:11 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Thu Sep 02 07:31:16 2010 +0000
@@ -34,7 +34,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.72 2010/09/02 06:00:12 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.73 2010/09/02 07:31:16 agc Exp $");
#endif
#include <sys/types.h>
@@ -564,6 +564,11 @@
(void) fprintf(stderr, "formatobj: json is '%s'\n", s);
free(s);
}
+ if (obj->c == 2 && obj->value.v[1].type == MJ_STRING &&
+ strcmp(obj->value.v[1].value.s, "[REVOKED]") == 0) {
+ /* whole key has been rovoked - just return */
+ return;
+ }
pobj(fp, &obj->value.v[mj_object_find(obj, "header", 0, 2) + 1], 0);
p(fp, " ", NULL);
pobj(fp, &obj->value.v[mj_object_find(obj, "key bits", 0, 2) + 1], 0);
Home |
Main Index |
Thread Index |
Old Index