From 158a69aff7b75fa3a6bd5e6990520852c602ae03 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 5 Oct 2006 11:06:42 +0000 Subject: bug fixes --- g10/seskey.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'g10/seskey.c') diff --git a/g10/seskey.c b/g10/seskey.c index 2ef00869f..c0efc3ae7 100644 --- a/g10/seskey.c +++ b/g10/seskey.c @@ -267,7 +267,9 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk, byte *asn; size_t asnlen; - rc = gcry_md_algo_info (hash_algo, GCRYCTL_GET_ASNOID, NULL, &asnlen); + rc = gcry_md_test_algo (hash_algo); + if (!rc) + rc = gcry_md_algo_info (hash_algo, GCRYCTL_GET_ASNOID, NULL, &asnlen); if (rc) log_fatal ("can't get OID of algo %d: %s\n", hash_algo, gpg_strerror (rc)); -- cgit v1.2.3