(self)
| 47 | self.assertEqual(data, bytearray(b'\x00\x2a\x00\x00')) |
| 48 | |
| 49 | def test_parse(self): |
| 50 | parser = Parser(bytearray( |
| 51 | #b'\x00\x2a\x00\x0d' |
| 52 | b'\x00\x0b' |
| 53 | b'\x00\x17\x02\xff\xfa' |
| 54 | b'\x01\x00\x00\x02\xaf\xaa')) |
| 55 | |
| 56 | ext = KeyShareExtension() |
| 57 | ext.parse(parser) |
| 58 | |
| 59 | self.assertEqual(ext.client_shares, |
| 60 | [(GroupName.secp256r1, bytearray(b'\xff\xfa')), |
| 61 | (GroupName.ffdhe2048, bytearray(b'\xaf\xaa'))]) |
| 62 | |
| 63 | def test_parse_with_no_data(self): |
| 64 | parser = Parser(bytearray()) |
nothing calls this directly
no test coverage detected