tls: checking if dhparam is empty, using "undef" instead of "" for clarity.

Signed-off-by: Tom Li <biergaizi2009@gmail.com>
This commit is contained in:
Tom Li 2015-02-02 20:50:37 +08:00
parent edea4c239d
commit 2cc6d3f938

View File

@ -82,10 +82,10 @@ sub init {
"Cannot locate cert/key! Run plugins/tls_cert to generate");
return;
}
unless (-f $dhparam) {
$dhparam = "";
unless (-f $dhparam && -s $dhparam) {
$dhparam = undef;
$self->log(LOGINFO,
"Cannot locate dhparam, possible DHE algorithms will be unavailable.");
"dhparam is not exist or empty, possible DHE ciphers will be unavailable.");
$self->log(LOGINFO,
"The encryption strength will decline due to lack of Forward Secrecy.");
}