OpenSSL: Support EC key from private_key blob
Try to parse the private_key blob as an ECPrivateKey in addition to the previously supported RSA and DSA. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
4b834df5e0
commit
812d52ae27
1 changed files with 11 additions and 0 deletions
|
@ -3772,6 +3772,17 @@ static int tls_connection_private_key(struct tls_data *data,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
if (SSL_use_PrivateKey_ASN1(EVP_PKEY_EC, conn->ssl,
|
||||
(u8 *) private_key_blob,
|
||||
private_key_blob_len) == 1) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"OpenSSL: SSL_use_PrivateKey_ASN1(EVP_PKEY_EC) --> OK");
|
||||
ok = 1;
|
||||
break;
|
||||
}
|
||||
#endif /* OPENSSL_NO_EC */
|
||||
|
||||
if (SSL_use_RSAPrivateKey_ASN1(conn->ssl,
|
||||
(u8 *) private_key_blob,
|
||||
private_key_blob_len) == 1) {
|
||||
|
|
Loading…
Reference in a new issue