aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/stroke/stroke_ca.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/libcharon/plugins/stroke/stroke_ca.c
parente185612dd8011ca4f3de460640f74e6a652cbf32 (diff)
downloadstrongswan-87dd205b.tar.bz2
strongswan-87dd205b.tar.xz
Add a return value to hasher_t.allocate_hash()
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_ca.c')
-rw-r--r--src/libcharon/plugins/stroke/stroke_ca.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_ca.c b/src/libcharon/plugins/stroke/stroke_ca.c
index e76560fa2..763b4cc0f 100644
--- a/src/libcharon/plugins/stroke/stroke_ca.c
+++ b/src/libcharon/plugins/stroke/stroke_ca.c
@@ -354,10 +354,12 @@ METHOD(stroke_ca_t, check_for_hash_and_url, void,
if (cert->get_encoding(cert, CERT_ASN1_DER, &encoded))
{
- hasher->allocate_hash(hasher, encoded, &hash);
- section->hashes->insert_last(section->hashes,
+ if (hasher->allocate_hash(hasher, encoded, &hash))
+ {
+ section->hashes->insert_last(section->hashes,
identification_create_from_encoding(ID_KEY_ID, hash));
- chunk_free(&hash);
+ chunk_free(&hash);
+ }
chunk_free(&encoded);
}
break;