From 04ce6765f4a86e865a456a6c982b8e4610e1c1ec Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 4 Jun 2024 15:25:51 +0200 Subject: [PATCH] gpg: Rename functions with an "fprint" part to "fpr" -- The fprint is too uncommon in our code base and to similar to fprintf. --- g10/card-util.c | 6 ++-- g10/getkey.c | 75 ++++++++++++++++++++-------------------- g10/gpgv.c | 8 ++--- g10/import.c | 24 ++++++------- g10/keydb.h | 26 +++++++------- g10/keyid.c | 13 ++++--- g10/keyserver-internal.h | 10 +++--- g10/keyserver.c | 23 ++++++------ g10/mainproc.c | 4 +-- g10/pkclist.c | 4 +-- g10/revoke.c | 4 +-- g10/skclist.c | 2 +- g10/test-stubs.c | 8 ++--- g10/tofu.c | 5 ++- g10/trustdb.c | 2 +- 15 files changed, 104 insertions(+), 110 deletions(-) diff --git a/g10/card-util.c b/g10/card-util.c index e8a5c1935..002b26e45 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -699,7 +699,7 @@ current_card_status (ctrl_t ctrl, estream_t fp, /* If the fingerprint is all 0xff, the key has no associated OpenPGP certificate. */ if ( thefpr && !fpr_is_ff (thefpr, thefprlen) - && !get_pubkey_byfprint (ctrl, pk, &keyblock, thefpr, thefprlen)) + && !get_pubkey_byfpr (ctrl, pk, &keyblock, thefpr, thefprlen)) { print_key_info (ctrl, fp, 0, pk, 0); print_card_key_info (fp, keyblock); @@ -917,8 +917,8 @@ fetch_url (ctrl_t ctrl) } else if (info.fpr1len) { - rc = keyserver_import_fprint (ctrl, info.fpr1, info.fpr1len, - opt.keyserver, 0); + rc = keyserver_import_fpr (ctrl, info.fpr1, info.fpr1len, + opt.keyserver, 0); } } diff --git a/g10/getkey.c b/g10/getkey.c index 015420173..3e5d32e01 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -326,7 +326,7 @@ get_pubkey_for_sig (ctrl_t ctrl, PKT_public_key *pk, PKT_signature *sig, /* First try the ISSUER_FPR info. */ fpr = issuer_fpr_raw (sig, &fprlen); - if (fpr && !get_pubkey_byfprint (ctrl, pk, NULL, fpr, fprlen)) + if (fpr && !get_pubkey_byfpr (ctrl, pk, NULL, fpr, fprlen)) return 0; /* Fallback to use the ISSUER_KEYID. */ @@ -571,7 +571,7 @@ get_pubkeyblock_for_sig (ctrl_t ctrl, PKT_signature *sig) /* First try the ISSUER_FPR info. */ fpr = issuer_fpr_raw (sig, &fprlen); - if (fpr && !get_pubkey_byfprint (ctrl, NULL, &keyblock, fpr, fprlen)) + if (fpr && !get_pubkey_byfpr (ctrl, NULL, &keyblock, fpr, fprlen)) return keyblock; /* Fallback to use the ISSUER_KEYID. */ @@ -1194,8 +1194,8 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode, mechanism_string = "NTDS"; glo_ctrl.in_auto_key_retrieve++; if (is_fpr) - rc = keyserver_import_fprint_ntds (ctrl, - fprbuf.u.fpr, fprbuf.fprlen); + rc = keyserver_import_fpr_ntds (ctrl, + fprbuf.u.fpr, fprbuf.fprlen); else rc = keyserver_import_ntds (ctrl, name, &fpr, &fpr_len); glo_ctrl.in_auto_key_retrieve--; @@ -1212,10 +1212,10 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode, glo_ctrl.in_auto_key_retrieve++; if (is_fpr) { - rc = keyserver_import_fprint (ctrl, - fprbuf.u.fpr, fprbuf.fprlen, - opt.keyserver, - KEYSERVER_IMPORT_FLAG_LDAP); + rc = keyserver_import_fpr (ctrl, + fprbuf.u.fpr, fprbuf.fprlen, + opt.keyserver, + KEYSERVER_IMPORT_FLAG_LDAP); /* Map error codes because Dirmngr returns NO * DATA if the keyserver does not have the * requested key. It returns NO KEYSERVER if no @@ -1247,10 +1247,10 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode, glo_ctrl.in_auto_key_retrieve++; if (is_fpr) { - rc = keyserver_import_fprint (ctrl, - fprbuf.u.fpr, fprbuf.fprlen, - opt.keyserver, - KEYSERVER_IMPORT_FLAG_LDAP); + rc = keyserver_import_fpr (ctrl, + fprbuf.u.fpr, fprbuf.fprlen, + opt.keyserver, + KEYSERVER_IMPORT_FLAG_LDAP); if (gpg_err_code (rc) == GPG_ERR_NO_DATA || gpg_err_code (rc) == GPG_ERR_NO_KEYSERVER) rc = gpg_error (GPG_ERR_NO_PUBKEY); @@ -1831,8 +1831,8 @@ get_pubkey_from_buffer (ctrl_t ctrl, PKT_public_key *pkbuf, * returned in *R_KEYBLOCK. This should be freed using * release_kbnode(). * - * FPRINT is a byte array whose contents is the fingerprint to use as - * the search term. FPRINT_LEN specifies the length of the + * FPR is a byte array whose contents is the fingerprint to use as + * the search term. FPRLEN specifies the length of the * fingerprint (in bytes). Currently, only 16, 20, and 32-byte * fingerprints are supported. * @@ -1840,15 +1840,15 @@ get_pubkey_from_buffer (ctrl_t ctrl, PKT_public_key *pkbuf, * be done by creating a userID conforming to the unified fingerprint * style. */ int -get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, - const byte * fprint, size_t fprint_len) +get_pubkey_byfpr (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, + const byte *fpr, size_t fprlen) { int rc; if (r_keyblock) *r_keyblock = NULL; - if (fprint_len == 32 || fprint_len == 20 || fprint_len == 16) + if (fprlen == 32 || fprlen == 20 || fprlen == 16) { struct getkey_ctx_s ctx; KBNODE kb = NULL; @@ -1865,8 +1865,8 @@ get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, ctx.nitems = 1; ctx.items[0].mode = KEYDB_SEARCH_MODE_FPR; - memcpy (ctx.items[0].u.fpr, fprint, fprint_len); - ctx.items[0].fprlen = fprint_len; + memcpy (ctx.items[0].u.fpr, fpr, fprlen); + ctx.items[0].fprlen = fprlen; if (pk) ctx.req_usage = pk->req_usage; rc = lookup (ctrl, &ctx, 0, &kb, &found_key); @@ -1886,7 +1886,7 @@ get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, } -/* This function is similar to get_pubkey_byfprint, but it doesn't +/* This function is similar to get_pubkey_byfpr, but it doesn't * merge the self-signed data into the public key and subkeys or into * the user ids. It also doesn't add the key to the user id cache. * Further, this function ignores PK->REQ_USAGE. @@ -1894,17 +1894,16 @@ get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, * This function is intended to avoid recursion and, as such, should * only be used in very specific situations. * - * Like get_pubkey_byfprint, PK may be NULL. In that case, this + * Like get_pubkey_byfpr, PK may be NULL. In that case, this * function effectively just checks for the existence of the key. */ gpg_error_t -get_pubkey_byfprint_fast (ctrl_t ctrl, PKT_public_key * pk, - const byte * fprint, size_t fprint_len) +get_pubkey_byfpr_fast (ctrl_t ctrl, PKT_public_key * pk, + const byte *fpr, size_t fprlen) { gpg_error_t err; KBNODE keyblock; - err = get_keyblock_byfprint_fast (ctrl, - &keyblock, NULL, fprint, fprint_len, 0); + err = get_keyblock_byfpr_fast (ctrl, &keyblock, NULL, fpr, fprlen, 0); if (!err) { if (pk) @@ -1916,7 +1915,7 @@ get_pubkey_byfprint_fast (ctrl_t ctrl, PKT_public_key * pk, } -/* This function is similar to get_pubkey_byfprint_fast but returns a +/* This function is similar to get_pubkey_byfpr_fast but returns a * keydb handle at R_HD and the keyblock at R_KEYBLOCK. R_KEYBLOCK or * R_HD may be NULL. If LOCK is set the handle has been opend in * locked mode and keydb_disable_caching () has been called. On error @@ -1924,9 +1923,9 @@ get_pubkey_byfprint_fast (ctrl_t ctrl, PKT_public_key * pk, * it may have a value of NULL, though. This allows one to do an insert * operation on a locked keydb handle. */ gpg_error_t -get_keyblock_byfprint_fast (ctrl_t ctrl, - kbnode_t *r_keyblock, KEYDB_HANDLE *r_hd, - const byte *fprint, size_t fprint_len, int lock) +get_keyblock_byfpr_fast (ctrl_t ctrl, + kbnode_t *r_keyblock, KEYDB_HANDLE *r_hd, + const byte *fpr, size_t fprlen, int lock) { gpg_error_t err; KEYDB_HANDLE hd; @@ -1939,8 +1938,8 @@ get_keyblock_byfprint_fast (ctrl_t ctrl, if (r_hd) *r_hd = NULL; - for (i = 0; i < MAX_FINGERPRINT_LEN && i < fprint_len; i++) - fprbuf[i] = fprint[i]; + for (i = 0; i < MAX_FINGERPRINT_LEN && i < fprlen; i++) + fprbuf[i] = fpr[i]; hd = keydb_new (ctrl); if (!hd) @@ -1964,7 +1963,7 @@ get_keyblock_byfprint_fast (ctrl_t ctrl, if (r_hd) *r_hd = hd; - err = keydb_search_fpr (hd, fprbuf, fprint_len); + err = keydb_search_fpr (hd, fprbuf, fprlen); if (gpg_err_code (err) == GPG_ERR_NOT_FOUND) { if (!r_hd) @@ -4081,16 +4080,16 @@ get_seckey_default_or_card (ctrl_t ctrl, PKT_public_key *pk, add_to_strlist (&namelist, def_secret_key); else if (fpr_card) { - err = get_pubkey_byfprint (ctrl, pk, NULL, fpr_card, fpr_len); + err = get_pubkey_byfpr (ctrl, pk, NULL, fpr_card, fpr_len); if (gpg_err_code (err) == GPG_ERR_NO_PUBKEY) { if (opt.debug) log_debug ("using LDAP to find public key for current card\n"); - err = keyserver_import_fprint (ctrl, fpr_card, fpr_len, - opt.keyserver, - KEYSERVER_IMPORT_FLAG_LDAP); + err = keyserver_import_fpr (ctrl, fpr_card, fpr_len, + opt.keyserver, + KEYSERVER_IMPORT_FLAG_LDAP); if (!err) - err = get_pubkey_byfprint (ctrl, pk, NULL, fpr_card, fpr_len); + err = get_pubkey_byfpr (ctrl, pk, NULL, fpr_card, fpr_len); else if (gpg_err_code (err) == GPG_ERR_NO_DATA || gpg_err_code (err) == GPG_ERR_NO_KEYSERVER) { @@ -4273,7 +4272,7 @@ get_user_id_byfpr (ctrl_t ctrl, const byte *fpr, size_t fprlen, size_t *rn) if (!name) { /* Get it so that the cache will be filled. */ - if (!get_pubkey_byfprint (ctrl, NULL, NULL, fpr, fprlen)) + if (!get_pubkey_byfpr (ctrl, NULL, NULL, fpr, fprlen)) name = cache_get_uid_byfpr (fpr, fprlen, rn); } diff --git a/g10/gpgv.c b/g10/gpgv.c index 50ec3917a..b97548d9b 100644 --- a/g10/gpgv.c +++ b/g10/gpgv.c @@ -464,8 +464,8 @@ keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags) } int -keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len, - struct keyserver_spec *keyserver, unsigned int flags) +keyserver_import_fpr (ctrl_t ctrl, const byte *fprint,size_t fprint_len, + struct keyserver_spec *keyserver, unsigned int flags) { (void)ctrl; (void)fprint; @@ -476,8 +476,8 @@ keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len, } int -keyserver_import_fprint_ntds (ctrl_t ctrl, - const byte *fprint, size_t fprint_len) +keyserver_import_fpr_ntds (ctrl_t ctrl, + const byte *fprint, size_t fprint_len) { (void)ctrl; (void)fprint; diff --git a/g10/import.c b/g10/import.c index bd13c6302..0422b5c4a 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2199,8 +2199,8 @@ import_one_real (ctrl_t ctrl, goto leave; /* Do we have this key already in one of our pubrings ? */ - err = get_keyblock_byfprint_fast (ctrl, &keyblock_orig, &hd, - fpr2, fpr2len, 1/*locked*/); + err = get_keyblock_byfpr_fast (ctrl, &keyblock_orig, &hd, + fpr2, fpr2len, 1/*locked*/); if ((err && gpg_err_code (err) != GPG_ERR_NO_PUBKEY && gpg_err_code (err) != GPG_ERR_UNUSABLE_PUBKEY) @@ -3071,7 +3071,7 @@ import_matching_seckeys (ctrl_t ctrl, kbnode_t seckeys, /* Get the entire public key block from our keystore and put all its * fingerprints into an array. */ - err = get_pubkey_byfprint (ctrl, NULL, &pub_keyblock, mainfpr, mainfprlen); + err = get_pubkey_byfpr (ctrl, NULL, &pub_keyblock, mainfpr, mainfprlen); if (err) goto leave; log_assert (pub_keyblock && pub_keyblock->pkt->pkttype == PKT_PUBLIC_KEY); @@ -3309,7 +3309,7 @@ import_secret_one (ctrl_t ctrl, kbnode_t keyblock, { /* Read the keyblock again to get the effects of a merge for * the public key. */ - err = get_pubkey_byfprint (ctrl, NULL, &node, fpr, fprlen); + err = get_pubkey_byfpr (ctrl, NULL, &node, fpr, fprlen); if (err || !node) log_error ("key %s: failed to re-lookup public key: %s\n", keystr_from_pk (pk), gpg_strerror (err)); @@ -4403,9 +4403,9 @@ revocation_present (ctrl_t ctrl, kbnode_t keyblock) * itself? */ gpg_error_t err; - err = get_pubkey_byfprint_fast (ctrl, NULL, - sig->revkey[idx].fpr, - sig->revkey[idx].fprlen); + err = get_pubkey_byfpr_fast (ctrl, NULL, + sig->revkey[idx].fpr, + sig->revkey[idx].fprlen); if (gpg_err_code (err) == GPG_ERR_NO_PUBKEY || gpg_err_code (err) == GPG_ERR_UNUSABLE_PUBKEY) { @@ -4419,13 +4419,13 @@ revocation_present (ctrl_t ctrl, kbnode_t keyblock) log_info(_("WARNING: key %s may be revoked:" " fetching revocation key %s\n"), tempkeystr,keystr(keyid)); - keyserver_import_fprint (ctrl, - sig->revkey[idx].fpr, - sig->revkey[idx].fprlen, - opt.keyserver, 0); + keyserver_import_fpr (ctrl, + sig->revkey[idx].fpr, + sig->revkey[idx].fprlen, + opt.keyserver, 0); /* Do we have it now? */ - err = get_pubkey_byfprint_fast (ctrl, NULL, + err = get_pubkey_byfpr_fast (ctrl, NULL, sig->revkey[idx].fpr, sig->revkey[idx].fprlen); } diff --git a/g10/keydb.h b/g10/keydb.h index 75a8ded72..d43d1bcaa 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -404,23 +404,23 @@ gpg_error_t get_pubkey_from_buffer (ctrl_t ctrl, PKT_public_key *pkbuf, gpg_error_t get_seckey (ctrl_t ctrl, PKT_public_key *pk, u32 *keyid); /* Lookup a key with the specified fingerprint. */ -int get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, - const byte *fprint, size_t fprint_len); +int get_pubkey_byfpr (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, + const byte *fpr, size_t fprlen); + +/* This function is similar to get_pubkey_byfpr, but it doesn't + merge the self-signed data into the public key and subkeys or into + the user ids. */ +gpg_error_t get_pubkey_byfpr_fast (ctrl_t ctrl, PKT_public_key *pk, + const byte *fpr, size_t fprlen); /* This function is similar to get_pubkey_byfprint, but it doesn't merge the self-signed data into the public key and subkeys or into the user ids. */ -gpg_error_t get_pubkey_byfprint_fast (ctrl_t ctrl, PKT_public_key *pk, - const byte *fprint, size_t fprint_len); - -/* This function is similar to get_pubkey_byfprint, but it doesn't - merge the self-signed data into the public key and subkeys or into - the user ids. */ -gpg_error_t get_keyblock_byfprint_fast (ctrl_t ctrl, - kbnode_t *r_keyblock, - KEYDB_HANDLE *r_hd, - const byte *fprint, size_t fprint_len, - int lock); +gpg_error_t get_keyblock_byfpr_fast (ctrl_t ctrl, + kbnode_t *r_keyblock, + KEYDB_HANDLE *r_hd, + const byte *fpr, size_t fprlen, + int lock); /* Returns true if a secret key is available for the public key with diff --git a/g10/keyid.c b/g10/keyid.c index d0317105d..fa1434c56 100644 --- a/g10/keyid.c +++ b/g10/keyid.c @@ -778,25 +778,24 @@ keyid_from_pk (PKT_public_key *pk, u32 *keyid) * keyid is not part of the fingerprint. */ u32 -keyid_from_fingerprint (ctrl_t ctrl, const byte *fprint, - size_t fprint_len, u32 *keyid) +keyid_from_fingerprint (ctrl_t ctrl, const byte *fpr, size_t fprlen, u32 *keyid) { u32 dummy_keyid[2]; if( !keyid ) keyid = dummy_keyid; - if (fprint_len != 20 && fprint_len != 32) + if (fprlen != 20 && fprlen != 32) { /* This is special as we have to lookup the key first. */ PKT_public_key pk; int rc; memset (&pk, 0, sizeof pk); - rc = get_pubkey_byfprint (ctrl, &pk, NULL, fprint, fprint_len); + rc = get_pubkey_byfpr (ctrl, &pk, NULL, fpr, fprlen); if( rc ) { - log_printhex (fprint, fprint_len, + log_printhex (fpr, fprlen, "Oops: keyid_from_fingerprint: no pubkey; fpr:"); keyid[0] = 0; keyid[1] = 0; @@ -806,8 +805,8 @@ keyid_from_fingerprint (ctrl_t ctrl, const byte *fprint, } else { - const byte *dp = fprint; - if (fprint_len == 20) /* v4 key */ + const byte *dp = fpr; + if (fprlen == 20) /* v4 key */ { keyid[0] = buf32_to_u32 (dp+12); keyid[1] = buf32_to_u32 (dp+16); diff --git a/g10/keyserver-internal.h b/g10/keyserver-internal.h index c93ca43bb..5c27c3a2b 100644 --- a/g10/keyserver-internal.h +++ b/g10/keyserver-internal.h @@ -37,11 +37,11 @@ struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig); int keyserver_any_configured (ctrl_t ctrl); int keyserver_export (ctrl_t ctrl, strlist_t users); int keyserver_import (ctrl_t ctrl, strlist_t users); -int keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len, - struct keyserver_spec *keyserver, - unsigned int flags); -int keyserver_import_fprint_ntds (ctrl_t ctrl, - const byte *fprint, size_t fprint_len); +int keyserver_import_fpr (ctrl_t ctrl, const byte *fprint,size_t fprint_len, + struct keyserver_spec *keyserver, + unsigned int flags); +int keyserver_import_fpr_ntds (ctrl_t ctrl, + const byte *fprint, size_t fprint_len); int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid, struct keyserver_spec *keyserver, unsigned int flags); diff --git a/g10/keyserver.c b/g10/keyserver.c index 57c7538ae..83c53a0cf 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -976,34 +976,32 @@ keyserver_import_ntds (ctrl_t ctrl, const char *mbox, int -keyserver_import_fprint (ctrl_t ctrl, const byte *fprint, size_t fprint_len, - struct keyserver_spec *keyserver, - unsigned int flags) +keyserver_import_fpr (ctrl_t ctrl, const byte *fpr, size_t fprlen, + struct keyserver_spec *keyserver, unsigned int flags) { KEYDB_SEARCH_DESC desc; memset (&desc, 0, sizeof(desc)); - if (fprint_len == 16 || fprint_len == 20 || fprint_len == 32) + if (fprlen == 16 || fprlen == 20 || fprlen == 32) desc.mode = KEYDB_SEARCH_MODE_FPR; else return gpg_error (GPG_ERR_INV_ARG); - memcpy (desc.u.fpr, fprint, fprint_len); - desc.fprlen = fprint_len; + memcpy (desc.u.fpr, fpr, fprlen); + desc.fprlen = fprlen; return keyserver_get (ctrl, &desc, 1, keyserver, flags, NULL, NULL); } int -keyserver_import_fprint_ntds (ctrl_t ctrl, - const byte *fprint, size_t fprint_len) +keyserver_import_fpr_ntds (ctrl_t ctrl, const byte *fpr, size_t fprlen) { struct keyserver_spec keyserver = { NULL, "ldap:///" }; - return keyserver_import_fprint (ctrl, fprint, fprint_len, - &keyserver, KEYSERVER_IMPORT_FLAG_LDAP); + return keyserver_import_fpr (ctrl, fpr, fprlen, + &keyserver, KEYSERVER_IMPORT_FLAG_LDAP); } @@ -1779,7 +1777,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode, spec = parse_keyserver_uri (url, 1); if(spec) { - err = keyserver_import_fprint (ctrl, *fpr, *fpr_len, spec, 0); + err = keyserver_import_fpr (ctrl, *fpr, *fpr_len, spec, 0); free_keyserver_spec(spec); } } @@ -1788,8 +1786,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode, /* If only a fingerprint is provided, try and fetch it from the configured keyserver. */ - err = keyserver_import_fprint (ctrl, - *fpr, *fpr_len, opt.keyserver, 0); + err = keyserver_import_fpr (ctrl, *fpr, *fpr_len, opt.keyserver, 0); } else log_info(_("no keyserver known\n")); diff --git a/g10/mainproc.c b/g10/mainproc.c index 91ababbb6..0fd32aead 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -2192,8 +2192,8 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_fprint (c->ctrl, p, n, opt.keyserver, - KEYSERVER_IMPORT_FLAG_QUICK); + res = keyserver_import_fpr (c->ctrl, p, n, opt.keyserver, + KEYSERVER_IMPORT_FLAG_QUICK); glo_ctrl.in_auto_key_retrieve--; if (!res) rc = do_check_sig (c, node, extrahash, extrahashlen, NULL, diff --git a/g10/pkclist.c b/g10/pkclist.c index afc8f56bc..09689e15f 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -129,8 +129,8 @@ show_revocation_reason (ctrl_t ctrl, PKT_public_key *pk, int mode) int rc; /* get the keyblock */ - fingerprint_from_pk( pk, fingerprint, &fingerlen ); - rc = get_pubkey_byfprint (ctrl, NULL, &keyblock, fingerprint, fingerlen); + fingerprint_from_pk (pk, fingerprint, &fingerlen); + rc = get_pubkey_byfpr (ctrl, NULL, &keyblock, fingerprint, fingerlen); if( rc ) { /* that should never happen */ log_debug( "failed to get the keyblock\n"); return; diff --git a/g10/revoke.c b/g10/revoke.c index ef5bb4d78..f0110174f 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -294,8 +294,8 @@ gen_desig_revoke (ctrl_t ctrl, const char *uname, strlist_t locusr) else { pk2 = xmalloc_clear (sizeof *pk2); - rc = get_pubkey_byfprint (ctrl, pk2, NULL, - pk->revkey[i].fpr, pk->revkey[i].fprlen); + rc = get_pubkey_byfpr (ctrl, pk2, NULL, + pk->revkey[i].fpr, pk->revkey[i].fprlen); } /* We have the revocation key. */ diff --git a/g10/skclist.c b/g10/skclist.c index f9647cc1d..fe77aaede 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -510,7 +510,7 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk) if (opt.debug) log_debug ("using LDAP to find public key" " for current card\n"); - if (!keyserver_import_fprint + if (!keyserver_import_fpr (ctrl, cinfo.fpr2, cinfo.fpr2len, opt.keyserver, KEYSERVER_IMPORT_FLAG_LDAP)) { diff --git a/g10/test-stubs.c b/g10/test-stubs.c index 00145c12b..e9685b715 100644 --- a/g10/test-stubs.c +++ b/g10/test-stubs.c @@ -202,8 +202,8 @@ keyserver_import_keyid (u32 *keyid, void *dummy, unsigned int flags) } int -keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len, - struct keyserver_spec *keyserver, unsigned int flags) +keyserver_import_fpr (ctrl_t ctrl, const byte *fprint,size_t fprint_len, + struct keyserver_spec *keyserver, unsigned int flags) { (void)ctrl; (void)fprint; @@ -214,8 +214,8 @@ keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len, } int -keyserver_import_fprint_ntds (ctrl_t ctrl, - const byte *fprint, size_t fprint_len) +keyserver_import_fpr_ntds (ctrl_t ctrl, + const byte *fprint, size_t fprint_len) { (void)ctrl; (void)fprint; diff --git a/g10/tofu.c b/g10/tofu.c index fff911293..a4ef1a184 100644 --- a/g10/tofu.c +++ b/g10/tofu.c @@ -2493,9 +2493,8 @@ get_policy (ctrl_t ctrl, tofu_dbs_t dbs, PKT_public_key *pk, int lookup_err; kbnode_t kb; - lookup_err = get_pubkey_byfprint (ctrl, NULL, &kb, - fingerprint_raw, - fingerprint_raw_len); + lookup_err = get_pubkey_byfpr (ctrl, NULL, &kb, + fingerprint_raw, fingerprint_raw_len); if (lookup_err) { if (DBG_TRUST) diff --git a/g10/trustdb.c b/g10/trustdb.c index 88b94389f..12e480707 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -112,7 +112,7 @@ keyid_from_fpr20 (ctrl_t ctrl, const byte *fpr, u32 *keyid) int rc; memset (&pk, 0, sizeof pk); - rc = get_pubkey_byfprint (ctrl, &pk, NULL, fpr, fprlen); + rc = get_pubkey_byfpr (ctrl, &pk, NULL, fpr, fprlen); if (rc) { log_printhex (fpr, fprlen,