Bugzilla – Attachment 324 Details for
Bug 589
scard-opensc.c: load only those keys for which there's a private key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
scard-opensc.diff (text/plain), 952 bytes, created by
Nils Larsch
on 2003-06-05 19:04:00 AEST
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Nils Larsch
Created:
2003-06-05 19:04:00 AEST
Size:
952 bytes
patch
obsolete
>--- openssh/scard-opensc.c 2003-06-04 14:12:18.000000000 +0200 >+++ openssh-test/scard-opensc.c 2003-06-05 10:37:02.000000000 +0200 >@@ -135,7 +135,11 @@ > &pin_obj); > if (r == SC_ERROR_OBJECT_NOT_FOUND) { > /* no pin required */ >- sc_lock(card); >+ r = sc_lock(card); >+ if (r) { >+ error("Unable to lock smartcard: %s", sc_strerror(r)); >+ goto err; >+ } > *key_obj_out = key_obj; > return 0; > } else if (r) { >@@ -429,9 +433,14 @@ > } > key_count = r; > } >- /* FIXME: only keep entries with a corresponding private key */ > keys = xmalloc(sizeof(Key *) * (key_count*2+1)); > for (i = 0; i < key_count; i++) { >+ sc_pkcs15_object_t *tmp_obj = NULL; >+ cert_id = ((sc_pkcs15_cert_info_t *)(certs[i]->data))->id; >+ if (sc_pkcs15_find_prkey_by_id(p15card, &cert_id, &tmp_obj)) >+ /* skip the public key (certificate) if no >+ * corresponding private key is present */ >+ continue; > k = key_new(KEY_RSA); > if (k == NULL) > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 589
: 324