python-tls / tls

A pure Python implementation of the Transport Layer Security protocol version 1.2, using existing libraries for crypto math.
Other
163 stars 44 forks source link

Use UBInt24 to parse ASN1Cert and Certificate #126

Closed ashfall closed 7 years ago

ashfall commented 7 years ago

Also deleting a test which was useful earlier because we were trying to put a limit of 2 ** 24 -1 on a UBInt32. Now that we are using the tested UBInt24, it's not possible to look for validation erros when legth specified is "too long" -- that state is unreachable. (Declarative parsing yay!)

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ca7402829c5479e0088d52b4049b32f62001c99c on ashfall:fix-cert-len into 30c40cd01ba4fcd4f55e2b246cf9cec918380602 on pyca:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ca7402829c5479e0088d52b4049b32f62001c99c on ashfall:fix-cert-len into 30c40cd01ba4fcd4f55e2b246cf9cec918380602 on pyca:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ca7402829c5479e0088d52b4049b32f62001c99c on ashfall:fix-cert-len into 30c40cd01ba4fcd4f55e2b246cf9cec918380602 on pyca:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ca7402829c5479e0088d52b4049b32f62001c99c on ashfall:fix-cert-len into 30c40cd01ba4fcd4f55e2b246cf9cec918380602 on pyca:master.

0x0ece commented 7 years ago

Sorry for arriving late, but: https://github.com/pyca/tls/blob/master/tls/_common/_constructs.py#L115 There's 16 hardcoded... can we extract it from the U-type?