diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2016-11-07 21:51:27 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-11-09 22:08:49 -0500 |
commit | f43b7b6cb6724792b9680dd6d744648b4a7e5b59 (patch) | |
tree | 6bb5d127336047637ecf6689a0531150d1b0ca04 /lib/vtls/cyassl.c | |
parent | 46f906a1b0e987ff8a044595550ba2a0e3d6368c (diff) |
vtls: Fail on unrecognized param for CURLOPT_SSLVERSION
- Fix GnuTLS code for CURL_SSLVERSION_TLSv1_2 that broke when the
TLS 1.3 support was added in 6ad3add.
- Homogenize across code for all backends the error message when TLS 1.3
is not available to "<backend>: TLS 1.3 is not yet supported".
- Return an error when a user-specified ssl version is unrecognized.
---
Prior to this change our code for some of the backends used the
'default' label in the switch statement (ie ver unrecognized) for
ssl.version and treated it the same as CURL_SSLVERSION_DEFAULT.
Bug: https://curl.haxx.se/mail/lib-2016-11/0048.html
Reported-by: Kamil Dudka
Diffstat (limited to 'lib/vtls/cyassl.c')
-rw-r--r-- | lib/vtls/cyassl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 5d6dbfb8c..39248d2c7 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -174,12 +174,15 @@ cyassl_connect_step1(struct connectdata *conn, req_method = TLSv1_2_client_method(); use_sni(TRUE); break; + case CURL_SSLVERSION_TLSv1_3: + failf(data, "CyaSSL: TLS 1.3 is not yet supported"); + return CURLE_SSL_CONNECT_ERROR; case CURL_SSLVERSION_SSLv3: #ifdef WOLFSSL_ALLOW_SSLV3 req_method = SSLv3_client_method(); use_sni(FALSE); #else - failf(data, "No support for SSLv3"); + failf(data, "CyaSSL does not support SSLv3"); return CURLE_NOT_BUILT_IN; #endif break; |