From 2cc6d3f93843ccfd472518eb74cf27514418dee6 Mon Sep 17 00:00:00 2001 From: Tom Li Date: Mon, 2 Feb 2015 20:50:37 +0800 Subject: [PATCH] tls: checking if dhparam is empty, using "undef" instead of "" for clarity. Signed-off-by: Tom Li --- plugins/tls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/tls b/plugins/tls index 7712a54..b6d4a29 100644 --- a/plugins/tls +++ b/plugins/tls @@ -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."); }