本文整理汇总了Python中tlslite.HandshakeSettings.keyExchangeNames方法的典型用法代码示例。如果您正苦于以下问题:Python HandshakeSettings.keyExchangeNames方法的具体用法?Python HandshakeSettings.keyExchangeNames怎么用?Python HandshakeSettings.keyExchangeNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tlslite.HandshakeSettings
的用法示例。
在下文中一共展示了HandshakeSettings.keyExchangeNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: HandshakeSettings
# 需要导入模块: from tlslite import HandshakeSettings [as 别名]
# 或者: from tlslite.HandshakeSettings import keyExchangeNames [as 别名]
#!/usr/bin/env python
from __future__ import print_function
from tlslite import HTTPTLSConnection, HandshakeSettings
from optparse import OptionParser
settings = HandshakeSettings()
settings.cipherNames = ['aes128gcm']
settings.keyExchangeNames = ['ecdhe_rsa']
settings.cipherImplementations = ["python"]
#settings.macNames = ['sha256']
settings.minVersion = (3,3)
settings.maxVersion = (3,3)
settings.useExperimentalTackExtension = True
def main():
parser = OptionParser(usage='%prog host filename [options]', description='A Simple https client used with tlslite-ng')
parser.add_option("--port", dest="port", help="port", default = 4443, type="int", metavar="4443")
parser.add_option("--algo", dest="algo", help="algo", default = "speck128")
parser.add_option("--keyEx", dest="keyEx", help="Key Exchange", default="ecdhe_rsa")
(options, arguments) = parser.parse_args()
if len(arguments) < 1:
parser.print_help()
exit(1)