1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 09:29:52 +03:00

Merge pull request #1115 from takotakot/import_v4_change

Add Tls_Disable1_3 (Import v4 change)
This commit is contained in:
Ilya Shipitsin 2020-10-31 20:04:20 +03:00 committed by GitHub
commit a2d15615f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -5930,6 +5930,7 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
c->SslAcceptSettings.Tls_Disable1_0 = CfgGetBool(f, "Tls_Disable1_0");
c->SslAcceptSettings.Tls_Disable1_1 = CfgGetBool(f, "Tls_Disable1_1");
c->SslAcceptSettings.Tls_Disable1_2 = CfgGetBool(f, "Tls_Disable1_2");
c->SslAcceptSettings.Tls_Disable1_3 = CfgGetBool(f, "Tls_Disable1_3");
s->StrictSyslogDatetimeFormat = CfgGetBool(f, "StrictSyslogDatetimeFormat");
@ -6254,6 +6255,7 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
CfgAddBool(f, "Tls_Disable1_0", c->SslAcceptSettings.Tls_Disable1_0);
CfgAddBool(f, "Tls_Disable1_1", c->SslAcceptSettings.Tls_Disable1_1);
CfgAddBool(f, "Tls_Disable1_2", c->SslAcceptSettings.Tls_Disable1_2);
CfgAddBool(f, "Tls_Disable1_3", c->SslAcceptSettings.Tls_Disable1_3);
CfgAddInt(f, "DhParamBits", c->DhParamBits);
// Disable session reconnect

View File

@ -12147,6 +12147,13 @@ bool StartSSLEx(SOCK *sock, X *x, K *priv, UINT ssl_timeout, char *sni_hostname)
}
#endif // SSL_OP_NO_TLSv1_2
#ifdef SSL_OP_NO_TLSv1_3
if (sock->SslAcceptSettings.Tls_Disable1_3)
{
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_3);
}
#endif // SSL_OP_NO_TLSv1_3
Unlock(openssl_lock);
AddChainSslCertOnDirectory(ssl_ctx);
Lock(openssl_lock);

View File

@ -147,6 +147,7 @@ struct SSL_ACCEPT_SETTINGS
bool Tls_Disable1_0;
bool Tls_Disable1_1;
bool Tls_Disable1_2;
bool Tls_Disable1_3;
};
// Socket