cloudflare / tls-tris

crypto/tls, now with 100% more 1.3. THE API IS NOT STABLE AND DOCUMENTATION IS NOT GUARANTEED.
Other
292 stars 50 forks source link

Flexible DC tests #117

Closed cjpatton closed 6 years ago

cjpatton commented 6 years ago

Based on #108.

Currently, subcerts_test.go only passes if maxVersion == VersionTLS13Draft23. This is because DCs are cryptographically bound to the protocol version on the wire. To work around this as we move towards the RFC, this PR adds test data for VersionTLS13Draft28 and VersionTLS13 and uses maxVersion to pick which data to load.

@henrydcase, this should allow us to move to draft28, then rfc without breaking the DC tests. It's the simplest change that doesn't reduce test coverage. I figure we'll remove the test data for draft23 and draft28 once we remove support for these drafts. (I left TODOs for you in the code that mention this.)