summaryrefslogtreecommitdiffstats
path: root/g10/seskey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/seskey.c')
-rw-r--r--g10/seskey.c6
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();