diff options
| author | David Shaw <[email protected]> | 2003-12-11 01:07:42 +0000 |
|---|---|---|
| committer | David Shaw <[email protected]> | 2003-12-11 01:07:42 +0000 |
| commit | db5ab5e730c6cf2dd103967a305b3519c6c808b3 (patch) | |
| tree | cc2192da8e6a9e685b64378c60bef5f40443a914 /g10/keydb.h | |
| parent | * keyid.c (do_fingerprint_md): Remove the rules to hash the old v3 Elgamal (diff) | |
| download | gnupg-db5ab5e730c6cf2dd103967a305b3519c6c808b3.tar.gz gnupg-db5ab5e730c6cf2dd103967a305b3519c6c808b3.zip | |
* packet.h, build-packet.c (hash_public_key): Remove function ...
* keydb.h, keyid.c (hash_public_key, do_fingerprint_md): ... and make a
new one here that shares code with the fingerprint calculations. This
removes some duplicated functionality, and is also around 14% faster.
(Every bit helps).
* import.c (import_one): No longer need the Elgamal import warning.
* getkey.c (get_pubkey_fast): This one is sort of obscure. get_pubkey_fast
returns the primary key when requesting a subkey, so if a user has a key
signed by a subkey (we don't do this, but used to), AND that key is not
self-signed, AND the algorithm of the subkey in question is not present in
GnuPG, AND the algorithm of the primary key that owns the subkey in
question is present in GnuPG, then we will try and verify the subkey
signature using the primary key algorithm and hit a BUG(). The fix is to
not return a hit if the keyid is not the primary. All other users of
get_pubkey_fast already expect a primary only.
Diffstat (limited to 'g10/keydb.h')
| -rw-r--r-- | g10/keydb.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/g10/keydb.h b/g10/keydb.h index 900d0267c..0d2a143a0 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -1,5 +1,5 @@ /* keydb.h - Key database - * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -237,6 +237,7 @@ KEYDB_HANDLE get_ctx_handle(GETKEY_CTX ctx); /*-- keyid.c --*/ int pubkey_letter( int algo ); +void hash_public_key( MD_HANDLE md, PKT_public_key *pk ); u32 keyid_from_sk( PKT_secret_key *sk, u32 *keyid ); u32 keyid_from_pk( PKT_public_key *pk, u32 *keyid ); u32 keyid_from_sig( PKT_signature *sig, u32 *keyid ); @@ -250,13 +251,11 @@ const char *datestr_from_sig( PKT_signature *sig ); const char *expirestr_from_pk( PKT_public_key *pk ); const char *expirestr_from_sk( PKT_secret_key *sk ); const char *expirestr_from_sig( PKT_signature *sig ); - const char *colon_strtime (u32 t); const char *colon_datestr_from_pk (PKT_public_key *pk); const char *colon_datestr_from_sk (PKT_secret_key *sk); const char *colon_datestr_from_sig (PKT_signature *sig); const char *colon_expirestr_from_sig (PKT_signature *sig); - byte *fingerprint_from_sk( PKT_secret_key *sk, byte *buf, size_t *ret_len ); byte *fingerprint_from_pk( PKT_public_key *pk, byte *buf, size_t *ret_len ); |
