Don't allow SSL to be enabled without a cert
authorJamie Cameron <jcameron@webmin.com>
Sun, 9 Nov 2008 20:53:55 +0000 (20:53 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 9 Nov 2008 20:53:55 +0000 (20:53 +0000)
apache/lang/en
apache/mod_ssl.pl

index 902dae7..3c34f0f 100644 (file)
@@ -905,6 +905,7 @@ mod_ssl_builtin=Prompt at startup
 mod_ssl_passsc=Execute script $1
 mod_ssl_epassph=No SSL password entered
 mod_ssl_epasssc=Missing or invalid SSL password script
+mod_ssl_ecerton=When SSL is enabled, a certificate file must be selected
 
 # nodo50 v0.1 - Change 000003 - New Script. Define Editors for mod_apachessl directives (Apache-ssl not use mod_ssl)
 # nodo50 v0.1 - Change 000003 - Nuevo Script. Define edici&#243;n de directivas de mod_apachessl (Apache-ssl no usa mod_ssl)
index ac5c789..0b78136 100644 (file)
@@ -25,6 +25,11 @@ return (1, $text{'mod_ssl_enable'},
 }
 sub save_SSLEngine
 {
+if ($in{'SSLEngine'} eq 'on' &&
+    $in{'SSLCertificateFile_def'}) {
+       # SSL enabled but no cert .. fail
+       &error($text{'mod_ssl_ecerton'});
+       }
 return &parse_choice("SSLEngine");
 }