Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
engine_pkcs11
search-certs-by-label.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File search-certs-by-label.patch of Package engine_pkcs11
Index: engine_pkcs11-0.1.5/src/engine_pkcs11.c =================================================================== --- engine_pkcs11-0.1.5.orig/src/engine_pkcs11.c +++ engine_pkcs11-0.1.5/src/engine_pkcs11.c @@ -496,7 +496,17 @@ static X509 *pkcs11_load_cert(ENGINE * e fprintf(stderr, "Found %u cert%s:\n", count, (count <= 1) ? "" : "s"); } - if ((s_slot_cert_id && *s_slot_cert_id) || (cert_id_len == 0)) { + + if (cert_label) { + for (n = 0; n < count; n++) { + PKCS11_CERT *k = certs + n; + + if (k->label && strcmp (k->label, cert_label)) + selected_cert = k; + } + + free(cert_label); + } else if ((s_slot_cert_id && *s_slot_cert_id) || (cert_id_len == 0)) { for (n = 0; n < count; n++) { PKCS11_CERT *k = certs + n; @@ -516,8 +526,6 @@ static X509 *pkcs11_load_cert(ENGINE * e } x509 = X509_dup(selected_cert->x509); - if (cert_label != NULL) - free(cert_label); return x509; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor