diff options
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_ca.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_ca.c | 8 |
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; |