Module Name:    src
Committed By:   agc
Date:           Tue Oct 19 00:00:01 UTC 2010

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 \
    src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.76 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.77
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.76	Fri Sep 10 20:14:19 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Tue Oct 19 00:00:00 2010
@@ -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;

Reply via email to