Bugzilla – Attachment 3122 Details for
Bug 2474
Enabling ECDSA in PKCS#11 support for ssh-agent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
load ECDSA public key from certificates
file_2474.txt (text/plain), 1.34 KB, created by
Jakub Jelen
on 2018-02-17 03:35:23 AEDT
(
hide
)
Description:
load ECDSA public key from certificates
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2018-02-17 03:35:23 AEDT
Size:
1.34 KB
patch
obsolete
>diff -up openssh-7.6p1/ssh-pkcs11.c.old openssh-7.6p1/ssh-pkcs11.c >--- openssh-7.6p1/ssh-pkcs11.c.old 2018-02-16 16:43:08.861520255 +0100 >+++ openssh-7.6p1/ssh-pkcs11.c 2018-02-16 16:56:35.312601451 +0100 >@@ -917,13 +917,28 @@ pkcs11_fetch_keys_filter(struct pkcs11_p > } else if (d2i_X509(&x509, &cp, attribs[3].ulValueLen) > == NULL) { > error("d2i_X509 failed"); >- } else if ((evp = X509_get_pubkey(x509)) == NULL || >- evp->type != EVP_PKEY_RSA || >- evp->pkey.rsa == NULL) { >- debug("X509_get_pubkey failed or no rsa"); >- } else if ((rsa = RSAPublicKey_dup(evp->pkey.rsa)) >- == NULL) { >- error("RSAPublicKey_dup"); >+ } else if ((evp = X509_get_pubkey(x509)) == NULL) { >+ debug("X509_get_pubkey failed"); >+ } else { >+ switch (evp->type) { >+ case EVP_PKEY_RSA: >+ if (evp->pkey.rsa == NULL) >+ debug("Missing RSA key"); >+ else if ((rsa = RSAPublicKey_dup( >+ evp->pkey.rsa)) == NULL) >+ error("RSAPublicKey_dup failed"); >+ break; >+ case EVP_PKEY_EC: >+ if (evp->pkey.ecdsa == NULL) >+ debug("Missing ECDSA key"); >+ else if ((ecdsa = EC_KEY_dup( >+ evp->pkey.ecdsa)) == NULL) >+ error("EC_KEY_dup failed"); >+ break; >+ default: >+ debug("not a RSA or ECDSA key"); >+ break; >+ } > } > if (x509) > X509_free(x509);
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 2474
:
2718
|
2724
|
2728
|
3069
|
3093
|
3094
|
3095
|
3101
|
3107
| 3122