Fixed ssl.PROTOCOL_SSLv3 not supported by Python 2.7.9

Python 2.7.9 doesn't support ssl.PROTOCOL_SSLv3 anymore due to the POODLE
attack. We should remove the use of ssl.PROTOCOL_SSLv3 in designate.

Change-Id: I3cfa4812fe11dafb40da2dc106780c4742796dff
Closes-Bug: 1430137
This commit is contained in:
stanzgy 2015-03-10 11:40:12 +08:00
parent eefeb1414e
commit 857dffd7da
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,6 @@ def wrap(sock):
_SSL_PROTOCOLS = {
"tlsv1": ssl.PROTOCOL_TLSv1,
"sslv23": ssl.PROTOCOL_SSLv23,
"sslv3": ssl.PROTOCOL_SSLv3
}
try:
@ -92,6 +91,11 @@ try:
except AttributeError:
pass
try:
_SSL_PROTOCOLS["sslv3"] = ssl.PROTOCOL_SSLv3
except AttributeError:
pass
def validate_ssl_version(version):
key = version.lower()