Re: [webmin-devel] Changes to miniserv.pl to force SSLv3/TLSv1

Jamie Cameron <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
Hi Jonathan,

Was the change you made just adding the line :

eval "Net::SSLeay::CTX_set_options( $ctx,&Net::SSLeay::OP_NO_SSLv2 )";

Probably the best way to submit changes like this is via a diff betweem
the old and new versions .. that way I (and the patch program) can see
exactly what has changed.

 - Jamie 

On Wed, 2006-02-01 at 04:29, Jonathan Glass wrote:
> I've made a small change to miniserv.pl to force SSLv3/TLSv1 in the 
> HTTPS server.  I'm not a developer, so don't know the correct way to 
> share this information with you, so I'll just post the code change in 
> this email.  Hopefully someone from webmin will incorporate this simple 
> change to kill off those older ciphers, or at least make it an option 
> somewhere.
> 
> Original:
> #!/usr/bin/perl
> # A very simple perl web server used by Webmin
> 
> # Require basic libraries
> package miniserv;
> use Socket;
> use POSIX;
> 
> # Find and read config file
> if (@ARGV != 1) {
> 	die "Usage: miniserv.pl <config file>";
> 	}
> if ($ARGV[0] =~ /^([a-z]:)?\//i) {
> 	$config_file = $ARGV[0];
> 	}
> else {
> 	chop($pwd = `pwd`);
> 	$config_file = "$pwd/$ARGV[0]";
> 	}
> %config = &read_config_file($config_file);
> 
> # Check is SSL is enabled and available
> if ($config{'ssl'}) {
> 	eval "use Net::SSLeay";
> 	if (!$@) {
> 		$use_ssl = 1;
> 		# These functions only exist for SSLeay 1.0
> 		eval "Net::SSLeay::SSLeay_add_ssl_algorithms()";
> 		eval "Net::SSLeay::load_error_strings()";
> 	if (defined(&Net::SSLeay::X509_STORE_CTX_get_current_cert) &&
> 		    defined(&Net::SSLeay::CTX_load_verify_locations) &&
> 		    defined(&Net::SSLeay::CTX_set_verify)) {
> 			$client_certs = 1;
> 			}
> 		}
> 
> 
> CHANGED
> #!/usr/bin/perl
> # A very simple perl web server used by Webmin
> 
> # Require basic libraries
> package miniserv;
> use Socket;
> use POSIX;
> 
> # Find and read config file
> if (@ARGV != 1) {
> 	die "Usage: miniserv.pl <config file>";
> 	}
> if ($ARGV[0] =~ /^([a-z]:)?\//i) {
> 	$config_file = $ARGV[0];
> 	}
> else {
> 	chop($pwd = `pwd`);
> 	$config_file = "$pwd/$ARGV[0]";
> 	}
> %config = &read_config_file($config_file);
> 
> # Check is SSL is enabled and available
> if ($config{'ssl'}) {
> 	eval "use Net::SSLeay";
> 	if (!$@) {
> 		$use_ssl = 1;
> 		# These functions only exist for SSLeay 1.0
> 		eval "Net::SSLeay::SSLeay_add_ssl_algorithms()";
> 		eval "Net::SSLeay::load_error_strings()";
> 		eval "Net::SSLeay::CTX_set_options( $ctx,&Net::SSLeay::OP_NO_SSLv2 )";
> 	if (defined(&Net::SSLeay::X509_STORE_CTX_get_current_cert) &&
> 		    defined(&Net::SSLeay::CTX_load_verify_locations) &&
> 		    defined(&Net::SSLeay::CTX_set_verify)) {
> 			$client_certs = 1;
> 			}
> 		}



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.