def test_write_with_data(self): ext = RenegotiationInfoExtension() ext.create(bytearray(b'\xab\xcd')) self.assertEqual(ext.write(), bytearray( b'\xff\x01' + # extension type b'\x00\x03' + # overall extension length b'\x02' + # payload length b'\xab\xcd' # payload ))
def test_write_with_data(self): ext = RenegotiationInfoExtension() ext.create(bytearray(b'\xab\xcd')) self.assertEqual( ext.write(), bytearray(b'\xff\x01' + # extension type b'\x00\x03' + # overall extension length b'\x02' + # payload length b'\xab\xcd' # payload ))
def test_write_with_data(self): ext = RenegotiationInfoExtension() ext.create(bytearray(b"\xab\xcd")) self.assertEqual( ext.write(), bytearray( b"\xff\x01" + b"\x00\x03" # extension type + b"\x02" # overall extension length + b"\xab\xcd" # payload length # payload ), )