From f7c17aa15c13b10f7b624ae8da5ea3d921b77535 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 2 Sep 2008 11:00:13 +0000 Subject: refactored credential builder allow enumeration of matching builders try a second builder if the first one fails builder clones resources internally on demand caller frees added resources on failure and success stricter handling of non-supported build parts --- src/charon/plugins/sql/sql_cred.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/charon/plugins/sql/sql_cred.c') diff --git a/src/charon/plugins/sql/sql_cred.c b/src/charon/plugins/sql/sql_cred.c index 9d91973c2..7313b7eb8 100644 --- a/src/charon/plugins/sql/sql_cred.c +++ b/src/charon/plugins/sql/sql_cred.c @@ -64,7 +64,7 @@ static bool private_enumerator_enumerate(private_enumerator_t *this, while (this->inner->enumerate(this->inner, &type, &blob)) { this->current = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type, - BUILD_BLOB_ASN1_DER, chunk_clone(blob), + BUILD_BLOB_ASN1_DER, blob, BUILD_END); if (this->current) { @@ -150,7 +150,7 @@ static bool cert_enumerator_enumerate(cert_enumerator_t *this, while (this->inner->enumerate(this->inner, &type, &blob)) { this->current = lib->creds->create(lib->creds, CRED_CERTIFICATE, type, - BUILD_BLOB_ASN1_DER, chunk_clone(blob), + BUILD_BLOB_ASN1_DER, blob, BUILD_END); if (this->current) { -- cgit v1.2.3