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 When building up a P...



details:   https://anonhg.NetBSD.org/src/rev/565c59087bd0
branches:  trunk
changeset: 326576:565c59087bd0
user:      agc <agc%NetBSD.org@localhost>
date:      Tue Feb 04 01:46:38 2014 +0000

description:
When building up a PGP public key from an ssh key, do not use the key
file's mtime as the birthtime of the signature - rather, just zero
this value (the key birthtime is an inherent part of calculating the
key id)

This allows public key files to be copied to other file systems, machines
or directories, and still produce the same key id.

diffstat:

 crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 0ba5e3ef44aa -r 565c59087bd0 crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c Tue Feb 04 00:52:47 2014 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/ssh2pgp.c Tue Feb 04 01:46:38 2014 +0000
@@ -276,7 +276,7 @@
        (void) memset(key, 0x0, sizeof(*key));
        pubkey = &key->key.seckey.pubkey;
        pubkey->version = PGP_V4;
-       pubkey->birthtime = st.st_mtime;
+       pubkey->birthtime = 0;
        /* get key type */
        ok = 1;
        switch (pubkey->alg = findstr(pkatypes, buf)) {



Home | Main Index | Thread Index | Old Index