mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 00:04:57 +03:00
Add DhParamBits configuration to set Diffie-Hellman parameters
This commit is contained in:
@ -6140,6 +6140,19 @@ void SiLoadServerCfg(SERVER *s, FOLDER *f)
|
||||
|
||||
// AcceptOnlyTls
|
||||
c->AcceptOnlyTls = CfgGetBool(f, "AcceptOnlyTls");
|
||||
|
||||
// Bits of Diffie-Hellman parameters
|
||||
c->DhParamBits = CfgGetInt(f, "DhParamBits");
|
||||
if (c->DhParamBits == 0)
|
||||
{
|
||||
c->DhParamBits = DH_PARAM_BITS_DEFAULT;
|
||||
}
|
||||
|
||||
SetDhParam(DhNewFromBits(c->DhParamBits));
|
||||
if (s->OpenVpnServerUdp)
|
||||
{
|
||||
OpenVpnServerUdpSetDhParam(s->OpenVpnServerUdp, DhNewFromBits(c->DhParamBits));
|
||||
}
|
||||
}
|
||||
Unlock(c->lock);
|
||||
|
||||
@ -6450,6 +6463,8 @@ void SiWriteServerCfg(FOLDER *f, SERVER *s)
|
||||
|
||||
CfgAddBool(f, "AcceptOnlyTls", c->AcceptOnlyTls);
|
||||
|
||||
CfgAddInt(f, "DhParamBits", c->DhParamBits);
|
||||
|
||||
// Disable session reconnect
|
||||
CfgAddBool(f, "DisableSessionReconnect", GetGlobalServerFlag(GSF_DISABLE_SESSION_RECONNECT));
|
||||
}
|
||||
|
Reference in New Issue
Block a user