You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by du...@apache.org on 2006/11/04 08:40:57 UTC
svn commit: r471135 - /spamassassin/trunk/spamd/spamd.raw
Author: duncf
Date: Fri Nov 3 23:40:56 2006
New Revision: 471135
URL: http://svn.apache.org/viewvc?view=rev&rev=471135
Log:
Fix logic error when determining whether to create SSL sockets, also a
few other SSL related cleanups -- changing $opt{'ssl'} to $listen_ssl
now that we can use ssl with --ssl-port and this may not require --ssl.
Modified:
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?view=diff&rev=471135&r1=471134&r2=471135
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Fri Nov 3 23:40:56 2006
@@ -320,11 +320,11 @@
my $listen_unix = 1;
my $listen_inet = 1;
-my $listen_ssl = 1;
+my $listen_ssl = 0;
if (!defined $opt{'socketpath'}) {
$listen_unix = 0;
} else {
- $listen_inet = $listen_ssl = 0;
+ $listen_inet = 0;
}
if (defined $opt{'ssl'} && !defined $opt{'ssl-port'}) {
$listen_inet = 0;
@@ -340,8 +340,9 @@
}
if (
- defined $opt{'ssl'}
- or defined $opt{'ssl-port'}
+ (defined $opt{'ssl'}
+ or defined $opt{'ssl-port'})
+ and !defined $opt{'socketpath'}
)
{
$listen_ssl = 1;
@@ -381,7 +382,7 @@
# Check for server certs
$opt{'server-key'} ||= "$LOCAL_RULES_DIR/certs/server-key.pem";
$opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem";
-if ( $opt{'ssl'} ) {
+if ( $listen_ssl ) {
eval { require IO::Socket::SSL };
die "spamd: SSL encryption requested, but IO::Socket::SSL is unavailable\n"
if ($@);
@@ -1106,7 +1107,7 @@
if ( $! == &Errno::EINTR ) {
return 0;
}
- elsif ( $! == 0 && $opt{'ssl'} ) {
+ elsif ( $! == 0 && $listen_ssl ) {
warn("spamd: SSL failure: " . &IO::Socket::SSL::errstr());
return 0;
}