Use SSL_CTX_set_min_proto_version for OpenSSL >= 1.1.0.
GitOrigin-RevId: b346e0b2dd5358d1154d537d02ddcba368b5e792
This commit is contained in:
parent
842e2033b7
commit
8d9a72b8d5
@ -236,6 +236,9 @@ class SslStreamImpl {
|
|||||||
options |= SSL_OP_NO_SSLv3;
|
options |= SSL_OP_NO_SSLv3;
|
||||||
#endif
|
#endif
|
||||||
SSL_CTX_set_options(ssl_ctx, options);
|
SSL_CTX_set_options(ssl_ctx, options);
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
|
||||||
|
#endif
|
||||||
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | SSL_MODE_ENABLE_PARTIAL_WRITE);
|
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | SSL_MODE_ENABLE_PARTIAL_WRITE);
|
||||||
|
|
||||||
if (cert_file.empty()) {
|
if (cert_file.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user