Home GnuPG
Diffusion GnuPG c45633a571bf

gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.
c45633a571bfUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.

* g10/keydb.h (keyid_cmp): New function.
* g10/keyid.c (pk_keyid): New function.
(pk_main_keyid): New function.
(keyid_copy): New function.
(pk_keyid_str): New function.
* g10/packet.h (PKT_public_key): Update comments for main_keyid and
keyid.

Before accessing pk->keyid, it is necessary to call keyid_from_pk (pk,
NULL) to ensure that pk->keyid is valid. Because it is easy to forget
to do this, these accessor functions take care of it.

  • Signed-off-by: Neal H. Walfield <neal@g10code.com>

Details

Provenance
Neal H. Walfield <neal@g10code.com>Authored on Feb 19 2016, 2:48 PM
Parents
rG7e7f35a2d7d4: gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
Branches
Unknown
Tags
Unknown

Event Timeline

Neal H. Walfield <neal@g10code.com> committed rGc45633a571bf: gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid. (authored by Neal H. Walfield <neal@g10code.com>).Feb 19 2016, 4:13 PM