(self)
| 26 | (2, bytearray(b'\x33'))]) |
| 27 | |
| 28 | def test_write(self): |
| 29 | ext = KeyShareExtension() |
| 30 | |
| 31 | ext.create([(GroupName.secp256r1, bytearray(b'\xff\xfa')), |
| 32 | (GroupName.ffdhe2048, bytearray(b'\xaf\xaa'))]) |
| 33 | |
| 34 | data = ext.write() |
| 35 | |
| 36 | self.assertEqual(data, bytearray( |
| 37 | b'\x00\x2a\x00\x0d' |
| 38 | b'\x00\x0b' |
| 39 | b'\x00\x17\x02\xff\xfa' |
| 40 | b'\x01\x00\x00\x02\xaf\xaa')) |
| 41 | |
| 42 | def test_write_with_no_data(self): |
| 43 | ext = KeyShareExtension() |
nothing calls this directly
no test coverage detected