Browse Source

fixed pgp_getkeybyfpr

master
Edouard Tisserant 7 years ago
parent
commit
473336309a
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      dist/src/lib/keyring.c

+ 2
- 3
dist/src/lib/keyring.c View File

@ -1015,11 +1015,10 @@ pgp_getkeybyfpr(pgp_io_t *io, const pgp_keyring_t *keyring,
unsigned *from, pgp_pubkey_t **pubkey)
{
pgp_fingerprint_t *kfp = &keyring->keys[*from].sigfingerprint;
for ( ; keyring && *from < keyring->keyc; *from += 1) {
pgp_fingerprint_t *kfp = &keyring->keys[*from].sigfingerprint;
if (kfp->length == length &&
memcmp(kfp, fpr, length) == 0) {
memcmp(kfp->fingerprint, fpr, length) == 0) {
if (pubkey) {
*pubkey = &keyring->keys[*from].key.pubkey;
}


Loading…
Cancel
Save