h2o / picotls

TLS 1.3 implementation in C (master supports RFC8446 as well as draft-26, -27, -28)
538 stars 142 forks source link

`ptls_decode8` for consistency #442

Closed kazuho closed 1 year ago

kazuho commented 1 year ago

When attempting to read one byte, there are cases where we have to raise either DECODE_ERROR (indicating a syntax error) or another error (e.g., ILLEGAL_PARAMETER indicating logical error).

It is better to have a wrapper function like ptls_decode16.