-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add conformance tests #18
Conversation
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
4922315
to
8df89d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. The gluecose/test-vectors design would make it easier for use to compare our CBOR output against the test cases, as it restrict the random number generators to zero readers. My impression is that gluecose/test-vectors is still in early WIP, so I'm hesitant to use their test cases for now. I don't think it will be difficult to migrate once it settles down. |
👍
I am currently working on expanding the gluecose test suite, so if you want we could take the tests that you've selected, translate them, and drop them into gluecose/test-vectors from where go-cose can pick. |
Sure! Can you translate them? There is no need to keep the input content, just that we are testing the same. |
Cool, I'll take a stab at them and let you know as soon as I've something ready for review. |
A first Sign1 batch is here: gluecose/test-vectors#4 |
Thank you @qmuntal, this is awesome to see. |
This PR will be abandoned once #19 is merged |
After we merge gluecose/test-vectors#4 (which is scoped to Sign1) I will extend the CDDL schema to support Sign and add another batch of related tests. |
Great! I'm missing RSA-PSS with SHA256 and some verification failures |
👍
Do you have anything specific failure case in mind? |
Not really. Probably @shizhMSFT does. |
OK, thanks. I'll sync-up with Shiwei and ping you when I have something ready for you to consume. |
Thanks folks. Should we flip this to a draft WIP PR? |
This PR doesn't make sense anymore. Closing it! |
@qmuntal Could you please try out gluecose/test-vectors#5 ?
I was busy coding other stuff today, I'll work on these tomorrow. |
This PR checks in several conformance samples from https://github.com/cose-wg/Examples and test that go-cose can sign and verify them.
Additionally, if the sample allows it, our CBOR output is compared against the sample output.
This new test suite deprecates all tests contained in
sign_verify_cose_wg_examples_test.go
, which were difficult to run and only did partial validations.