| 9 | PORT = 8912 |
| 10 | |
| 11 | def 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 | |
| 26 | def sslProtocolCiphers(): |
| 27 | if ssl.OPENSSL_VERSION_NUMBER >= 0x10100000: |