MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / sslProtocolVersion

Function sslProtocolVersion

dev/ssltest.py:11–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9PORT = 8912
10
11def sslProtocolVersion():
12 # sslProtocolVersion
13 if sys.version_info >= (2,7,13):
14 # this means TLSv1 or higher
15 # in the future change to
16 # ssl.PROTOCOL_TLS1.2
17 return ssl.PROTOCOL_TLS
18 elif sys.version_info >= (2,7,9):
19 # this means any SSL/TLS. SSLv2 and 3 are excluded with an option after context is created
20 return ssl.PROTOCOL_SSLv23
21 else:
22 # this means TLSv1, there is no way to set "TLSv1 or higher" or
23 # "TLSv1.2" in < 2.7.9
24 return ssl.PROTOCOL_TLSv1
25
26def sslProtocolCiphers():
27 if ssl.OPENSSL_VERSION_NUMBER >= 0x10100000:

Callers 1

sslHandshakeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected