-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include test vectors in specifications #459
Comments
Sounds like a good idea. Want to create a PR? I’d create a test case for go-libp2p as part of reviewing that PR. |
I'll see to put some test vectors together from the current Rust implementation! |
This is proving trickier than I thought it would. Creating test vectors for parsing a certificate is easy but generation is difficult because the ECDSA signature of the certificate itself incorporates randomness. |
I guess parsing could be enough? Implementations can always write round-trip tests where they try to parse their own certificates. If that passes, generation should be okay too! |
I am adding tests with a static inputs in libp2p/rust-libp2p#2945. Here is a direct link: https://github.com/libp2p/rust-libp2p/blob/3b76e39c68192318111fd9142df5a79f281c3bf6/transports/tls/src/certificate.rs#L497-L544 Do you want to test these against the go implementation? Once successful, I can PR them to the spec. |
Whilst reviewing the
rust-libp2p
implementation of the QUIC transport, I took a closer look at the TLS specification: https://github.com/libp2p/specs/blob/master/tls/tls.mdWhat do people think about including test vectors in there? I am thinking something like:
This would make it possible to easily write unit tests against this fairly critical part of the code and would potentially catch interoperability issues early on.
The text was updated successfully, but these errors were encountered: