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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user