From 87dd205b61ae8c0125b459959fcc7349fa27bb74 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 9 Jul 2012 17:15:52 +0200 Subject: Add a return value to hasher_t.allocate_hash() --- src/libstrongswan/plugins/openssl/openssl_x509.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/plugins/openssl/openssl_x509.c') diff --git a/src/libstrongswan/plugins/openssl/openssl_x509.c b/src/libstrongswan/plugins/openssl/openssl_x509.c index ee19c4179..e85c5cc90 100644 --- a/src/libstrongswan/plugins/openssl/openssl_x509.c +++ b/src/libstrongswan/plugins/openssl/openssl_x509.c @@ -973,11 +973,11 @@ static bool parse_certificate(private_openssl_x509_t *this) parse_extKeyUsage(this); hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1); - if (!hasher) + if (!hasher || !hasher->allocate_hash(hasher, this->encoding, &this->hash)) { + DESTROY_IF(hasher); return FALSE; } - hasher->allocate_hash(hasher, this->encoding, &this->hash); hasher->destroy(hasher); if (issued_by(this, &this->public.x509.interface, NULL)) -- cgit v1.2.3