mirror of
https://github.com/moparisthebest/curl
synced 2025-03-03 02:41:59 -05:00
openssl: ensure to check SSL_CTX_set_alpn_protos return values
SSL_CTX_set_alpn_protos() return 0 on success, and non-0 on failure Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com> Closes #6794
This commit is contained in:
parent
7b6bfd2d78
commit
5930cb1c46
@ -2749,7 +2749,10 @@ static CURLcode ossl_connect_step1(struct Curl_easy *data,
|
||||
/* expects length prefixed preference ordered list of protocols in wire
|
||||
* format
|
||||
*/
|
||||
SSL_CTX_set_alpn_protos(backend->ctx, protocols, cur);
|
||||
if(SSL_CTX_set_alpn_protos(backend->ctx, protocols, cur)) {
|
||||
failf(data, "Error setting ALPN");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user