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 only attempt to load...
details: https://anonhg.NetBSD.org/src/rev/767d8eb5e88b
branches: trunk
changeset: 766548:767d8eb5e88b
user: agc <agc%NetBSD.org@localhost>
date: Mon Jun 27 07:05:31 2011 +0000
description:
only attempt to load the secret key if we need to (for signing or for
decrypting).
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/netpgp.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r 01f925a9d275 -r 767d8eb5e88b crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Mon Jun 27 06:40:26 2011 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Mon Jun 27 07:05:31 2011 +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.90 2011/06/25 00:37:44 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.91 2011/06/27 07:05:31 agc Exp $");
#endif
#include <sys/types.h>
@@ -852,10 +852,12 @@
(void) fprintf(io->errs, "Can't read pub keyring\n");
return 0;
}
- netpgp->secring = readkeyring(netpgp, "secring");
- if (netpgp->secring == NULL) {
- (void) fprintf(io->errs, "Can't read sec keyring\n");
- return 0;
+ if (netpgp_getvar(netpgp, "need seckey")) {
+ netpgp->secring = readkeyring(netpgp, "secring");
+ if (netpgp->secring == NULL) {
+ (void) fprintf(io->errs, "Can't read sec keyring\n");
+ return 0;
+ }
}
} else {
last = (netpgp->pubring != NULL);
Home |
Main Index |
Thread Index |
Old Index