diff options
author | Werner Koch <wk@gnupg.org> | 2003-07-01 10:34:45 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-07-01 10:34:45 +0200 |
commit | 39046ea7ec221efa9db946230ddc9fb3e65d19ab (patch) | |
tree | aa251dc190129aef89d82597f7ffb53ba6486fc9 /g10/seskey.c | |
parent | Key generation and signing using the OpenPGP card does rudimentary work. (diff) | |
download | gnupg2-39046ea7ec221efa9db946230ddc9fb3e65d19ab.tar.xz gnupg2-39046ea7ec221efa9db946230ddc9fb3e65d19ab.zip |
* app-openpgp.c (store_fpr): Fixed fingerprint calculation.
* keygen.c (gen_card_key): Obviously we should use the creation
date received from SCDAEMON, so that the fingerprints will match.
* sign.c (do_sign): Pass the serialno to the sign code.
* keyid.c (serialno_and_fpr_from_sk): New.
Diffstat (limited to 'g10/seskey.c')
-rw-r--r-- | g10/seskey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/seskey.c b/g10/seskey.c index 5d0490cdf..ae22032a1 100644 --- a/g10/seskey.c +++ b/g10/seskey.c @@ -215,12 +215,14 @@ encode_md_value (int pubkey_algo, gcry_md_hd_t md, int hash_algo, } else { + gpg_error_t rc; byte *asn; size_t asnlen; - if( gcry_md_algo_info( algo, GCRYCTL_GET_ASNOID, NULL, &asnlen ) ) + rc = gcry_md_algo_info( algo, GCRYCTL_GET_ASNOID, NULL, &asnlen); + if (rc) log_fatal("can't get OID of algo %d: %s\n", - algo, gcry_strerror(-1)); + algo, gpg_strerror (rc)); asn = xmalloc (asnlen); if( gcry_md_algo_info( algo, GCRYCTL_GET_ASNOID, asn, &asnlen ) ) BUG(); |