From 39046ea7ec221efa9db946230ddc9fb3e65d19ab Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 1 Jul 2003 08:34:45 +0000 Subject: * 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. --- g10/seskey.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'g10/seskey.c') 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(); -- cgit v1.2.3