Limit the searches to the selected keychain.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20923 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -96,6 +96,7 @@ kc_rsa_finish(RSA *rsa)
|
|||||||
{
|
{
|
||||||
struct kc_rsa *kc_rsa = RSA_get_app_data(rsa);
|
struct kc_rsa *kc_rsa = RSA_get_app_data(rsa);
|
||||||
CFRelease(kc_rsa->item);
|
CFRelease(kc_rsa->item);
|
||||||
|
memset(kc_rsa, 0, sizeof(*kc_rsa));
|
||||||
free(kc_rsa);
|
free(kc_rsa);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -215,8 +216,9 @@ static int
|
|||||||
keychain_iter_start(hx509_context context,
|
keychain_iter_start(hx509_context context,
|
||||||
hx509_certs certs, void *data, void **cursor)
|
hx509_certs certs, void *data, void **cursor)
|
||||||
{
|
{
|
||||||
OSStatus ret;
|
struct ks_keychain *ctx = data;
|
||||||
struct iter *iter;
|
struct iter *iter;
|
||||||
|
OSStatus ret;
|
||||||
|
|
||||||
iter = calloc(1, sizeof(*iter));
|
iter = calloc(1, sizeof(*iter));
|
||||||
if (iter == NULL) {
|
if (iter == NULL) {
|
||||||
@@ -224,7 +226,7 @@ keychain_iter_start(hx509_context context,
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = SecKeychainSearchCreateFromAttributes(NULL,
|
ret = SecKeychainSearchCreateFromAttributes(ctx->keychain,
|
||||||
kSecCertificateItemClass,
|
kSecCertificateItemClass,
|
||||||
NULL,
|
NULL,
|
||||||
&iter->searchRef);
|
&iter->searchRef);
|
||||||
|
Reference in New Issue
Block a user