Replay protection was using raw PIV buffer instead of SSN value
Encoding and decoding between SSN and PIV was performed in little endian, but should be in network byte order (big endian)
The two above resulted in wrong behavior while using aiocoap as a client, and uoscore as a server (after PIV=0xFF, receiving PIV=0x0100 was read by the server as 0x00, which resulted in replay error).
Also, added extensive tests for ssn <-> piv conversion functions.
The two above resulted in wrong behavior while using aiocoap as a client, and uoscore as a server (after PIV=0xFF, receiving PIV=0x0100 was read by the server as 0x00, which resulted in replay error).
Also, added extensive tests for ssn <-> piv conversion functions.