Add a return value to hasher_t.allocate_hash()

This commit is contained in:
Martin Willi
2012-07-16 14:55:06 +02:00
parent e185612dd8
commit 87dd205b61
40 changed files with 269 additions and 149 deletions
+5 -3
View File
@@ -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;