diff options
author | Guy Poizat <Guy.Poizat@non.se.com> | 2019-05-16 11:54:26 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-05-20 19:00:59 +0200 |
commit | 0da8441298569dfd714e7b21f74aab373b95d2f7 (patch) | |
tree | a24460a5208a3bdc2ad1b0867e9b677dcbf6f9d2 /lib/vtls/mbedtls.c | |
parent | 8b038bcc95c31ef90b1715b21f76ded390de88f2 (diff) | |
download | curl-0da8441298569dfd714e7b21f74aab373b95d2f7.tar.gz |
mbedtls: enable use of EC keys
Closes #3892
Diffstat (limited to 'lib/vtls/mbedtls.c')
-rw-r--r-- | lib/vtls/mbedtls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index ab357dd87..63d1f4c81 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -343,7 +343,8 @@ mbed_connect_step1(struct connectdata *conn, if(SSL_SET_OPTION(key)) { ret = mbedtls_pk_parse_keyfile(&BACKEND->pk, SSL_SET_OPTION(key), SSL_SET_OPTION(key_passwd)); - if(ret == 0 && !mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_RSA)) + if(ret == 0 && !(mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_RSA) || + mbedtls_pk_can_do(&BACKEND->pk, MBEDTLS_PK_ECKEY))) ret = MBEDTLS_ERR_PK_TYPE_MISMATCH; if(ret) { |