mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Auto-create revocation certificates.
* configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define. * g10/revoke.c (create_revocation): Add arg "leadin". (gen_standard_revoke): New. * g10/openfile.c (get_openpgp_revocdir): New. (open_outfile): Add MODE value 3. * g10/keyid.c (hexfingerprint): New. * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke. -- GnuPG-bug-id: 1042
This commit is contained in:
parent
aa5b4392aa
commit
03018ef9ee
10 changed files with 143 additions and 9 deletions
14
g10/keyid.c
14
g10/keyid.c
|
@ -772,6 +772,20 @@ fingerprint_from_pk (PKT_public_key *pk, byte *array, size_t *ret_len)
|
|||
}
|
||||
|
||||
|
||||
/* Return an allocated buffer with the fingerprint of PK formatted as
|
||||
a plain hexstring. */
|
||||
char *
|
||||
hexfingerprint (PKT_public_key *pk)
|
||||
{
|
||||
unsigned char fpr[MAX_FINGERPRINT_LEN];
|
||||
size_t len;
|
||||
char *result;
|
||||
|
||||
fingerprint_from_pk (pk, fpr, &len);
|
||||
result = xmalloc (2 * len + 1);
|
||||
bin2hex (fpr, len, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue