!34146 delete tlsv1

Merge pull request !34146 from ZPaC/delete-tlsv1
This commit is contained in:
i-robot 2022-05-11 01:11:06 +00:00 committed by Gitee
commit 69d4f96c81
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 3 deletions

View File

@ -34,9 +34,8 @@ bool HttpRequestHandler::Initialize(int fd, const std::unordered_map<std::string
if (PSContext::instance()->enable_ssl()) {
MS_LOG(INFO) << "Enable ssl support.";
if (!SSL_CTX_set_options(SSLHTTP::GetInstance().GetSSLCtx(), SSL_OP_SINGLE_DH_USE | SSL_OP_SINGLE_ECDH_USE |
SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 |
SSL_OP_NO_TLSv1_1)) {
if (!SSL_CTX_set_options(SSLHTTP::GetInstance().GetSSLCtx(),
SSL_OP_SINGLE_DH_USE | SSL_OP_SINGLE_ECDH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3)) {
if (evbase_) {
event_base_free(evbase_);
evbase_ = nullptr;