Skip to content

Commit 39aa894

Browse files
committed
build: disable SSLv2 by default
No one in this day and age should be using SSLv2 so disable it by default. You can re-enable it with `./configure --with-sslv2` but there really should be no reason for that.
1 parent c937f5b commit 39aa894

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

configure

+8-6
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ parser.add_option('--no-ifaddrs',
5454
dest='no_ifaddrs',
5555
help='use on deprecated SunOS systems that do not support ifaddrs.h')
5656

57-
parser.add_option('--no-ssl2',
58-
action='store_true',
59-
dest='no_ssl2',
60-
help='disable OpenSSL v2')
61-
6257
# deprecated
6358
parser.add_option('--openssl-includes',
6459
action='store',
@@ -230,6 +225,11 @@ parser.add_option('--with-perfctr',
230225
dest='with_perfctr',
231226
help='build with performance counters (default is true on Windows)')
232227

228+
parser.add_option('--with-sslv2',
229+
action='store_true',
230+
dest='with_sslv2',
231+
help='enable SSL v2')
232+
233233
parser.add_option('--without-dtrace',
234234
action='store_true',
235235
dest='without_dtrace',
@@ -588,7 +588,9 @@ def configure_openssl(o):
588588
if options.without_ssl:
589589
return
590590

591-
if options.no_ssl2:
591+
# OpenSSL uses `#ifndef OPENSSL_NO_SSL2` checks so only define the
592+
# macro when we want to _disable_ SSL2.
593+
if not options.with_sslv2:
592594
o['defines'] += ['OPENSSL_NO_SSL2=1']
593595

594596
if options.shared_openssl:

0 commit comments

Comments
 (0)