本文整理汇总了Python中tlsfuzzer.runner.ConnectionState.client_verify_data方法的典型用法代码示例。如果您正苦于以下问题:Python ConnectionState.client_verify_data方法的具体用法?Python ConnectionState.client_verify_data怎么用?Python ConnectionState.client_verify_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tlsfuzzer.runner.ConnectionState
的用法示例。
在下文中一共展示了ConnectionState.client_verify_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_process
# 需要导入模块: from tlsfuzzer.runner import ConnectionState [as 别名]
# 或者: from tlsfuzzer.runner.ConnectionState import client_verify_data [as 别名]
def test_process(self):
node = ResetRenegotiationInfo()
state = ConnectionState()
state.client_verify_data = bytearray(b'\xde\xad\xc0\xde')
state.server_verify_data = bytearray(b'\xc0\xff\xee')
node.process(state)
self.assertEqual(state.client_verify_data, bytearray(0))
self.assertEqual(state.server_verify_data, bytearray(0))
示例2: test_generate_extensions_with_renego_info_default_generator
# 需要导入模块: from tlsfuzzer.runner import ConnectionState [as 别名]
# 或者: from tlsfuzzer.runner.ConnectionState import client_verify_data [as 别名]
def test_generate_extensions_with_renego_info_default_generator(self):
state = ConnectionState()
state.client_verify_data = bytearray(b"\xab\xcd")
chg = ClientHelloGenerator(extensions={constants.ExtensionType.renegotiation_info: None})
return_val = mock.MagicMock()
return_val.write = mock.MagicMock(return_value=bytearray(10))
with mock.patch.object(messages.ClientHello, "create", return_value=return_val) as mock_method:
ch = chg.generate(state)
self.assertEqual(ch, return_val)
ext = RenegotiationInfoExtension().create(bytearray(b"\xab\xcd"))
mock_method.assert_called_once_with((3, 3), bytearray(32), bytearray(0), [], extensions=[ext])