summaryrefslogtreecommitdiff
path: root/rpmio/digest.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpmio/digest.c')
-rw-r--r--rpmio/digest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/rpmio/digest.c b/rpmio/digest.c
index 64b678b86..c565cf608 100644
--- a/rpmio/digest.c
+++ b/rpmio/digest.c
@@ -75,8 +75,12 @@ DIGEST_CTX
rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags)
{
HASH_HashType type;
- DIGEST_CTX ctx = xcalloc(1, sizeof(*ctx));
+ DIGEST_CTX ctx;
+ if (rpmInitCrypto() < 0)
+ return NULL;
+
+ ctx = xcalloc(1, sizeof(*ctx));
ctx->flags = flags;
type = getHashType(hashalgo);