Bugzilla – Attachment 2670 Details for
Bug 2429
ssh-keygen ignores keys that have CKA_ID == 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Do not require to return ID from token
file_2429.txt (text/plain), 1.24 KB, created by
Jakub Jelen
on 2015-07-16 00:29:24 AEST
(
hide
)
Description:
Do not require to return ID from token
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2015-07-16 00:29:24 AEST
Size:
1.24 KB
patch
obsolete
>diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c >index dfa6e31..7c38d9e 100644 >--- a/ssh-pkcs11.c >+++ b/ssh-pkcs11.c >@@ -322,7 +322,8 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx, > k11->slotidx = slotidx; > /* identify key object on smartcard */ > k11->keyid_len = keyid_attrib->ulValueLen; >- k11->keyid = xmalloc(k11->keyid_len); >+ if (keyid_attrib->ulValueLen) >+ k11->keyid = xmalloc(k11->keyid_len); > memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len); > k11->orig_finish = def->finish; > memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method)); >@@ -482,14 +483,14 @@ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx, > continue; > } > /* check that none of the attributes are zero length */ >- if (attribs[0].ulValueLen == 0 || >- attribs[1].ulValueLen == 0 || >+ if (attribs[1].ulValueLen == 0 || > attribs[2].ulValueLen == 0) { > continue; > } > /* allocate buffers for attributes */ > for (i = 0; i < 3; i++) >- attribs[i].pValue = xmalloc(attribs[i].ulValueLen); >+ if (attribs[i].ulValueLen > 0) >+ attribs[i].pValue = xmalloc(attribs[i].ulValueLen); > /* > * retrieve ID, modulus and public exponent of RSA key, > * or ID, subject and value for certificates.
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 Raw
Actions:
View
Attachments on
bug 2429
: 2670