aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/openssl/openssl_x509.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-09 17:15:52 +0200
committerMartin Willi <martin@revosec.ch>2012-07-16 14:55:06 +0200
commit87dd205b61ae8c0125b459959fcc7349fa27bb74 (patch)
treea6c138a105bf40ce5a4b1b60047ed3a76cbe22ca /src/libstrongswan/plugins/openssl/openssl_x509.c
parente185612dd8011ca4f3de460640f74e6a652cbf32 (diff)
downloadstrongswan-87dd205b61ae8c0125b459959fcc7349fa27bb74.tar.bz2
strongswan-87dd205b61ae8c0125b459959fcc7349fa27bb74.tar.xz
Add a return value to hasher_t.allocate_hash()
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_x509.c')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_x509.c4
1 files changed, 2 insertions, 2 deletions
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))