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 2 minor changes:
details: https://anonhg.NetBSD.org/src/rev/6b1db12429ad
branches: trunk
changeset: 758103:6b1db12429ad
user: agc <agc%NetBSD.org@localhost>
date: Tue Oct 19 00:00:00 2010 +0000
description:
2 minor changes:
+ when writing out the key as an ssh key, don't include the user id
information at the end, in-line with expectations about standard ssh
key formats
+ since the signing key changed its "menu line" entry from "pub" to
"signature", the offset of the key id moved 7 chars to the right, so
take this into consideration when generating new keys
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/netpgp.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 07b4c7747c01 -r 6b1db12429ad crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Mon Oct 18 22:02:25 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c Tue Oct 19 00:00:00 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.76 2010/09/10 20:14:19 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.77 2010/10/19 00:00:00 agc Exp $");
#endif
#include <sys/types.h>
@@ -1118,7 +1118,7 @@
__ops_sprint_keydata(netpgp->io, NULL, key, &cp, "signature ", &key->key.seckey.pubkey, 0);
(void) fprintf(stdout, "%s", cp);
/* write public key */
- (void) snprintf(dir, sizeof(dir), "%s/%.16s", netpgp_getvar(netpgp, "homedir"), &cp[31]);
+ (void) snprintf(dir, sizeof(dir), "%s/%.16s", netpgp_getvar(netpgp, "homedir"), &cp[38]);
if (mkdir(dir, 0700) < 0) {
(void) fprintf(io->errs, "can't mkdir '%s'\n", dir);
return 0;
@@ -1795,7 +1795,6 @@
cc = formatstring((char *)out, (const uint8_t *)"ssh-rsa", 7);
cc += formatbignum((char *)&out[cc], key->key.pubkey.key.rsa.e);
cc += formatbignum((char *)&out[cc], key->key.pubkey.key.rsa.n);
- cc += snprintf(&out[cc], size - cc, " %s", key->uids[0]);
free(io);
free(keyring);
return cc;
Home |
Main Index |
Thread Index |
Old Index