Skip to content

Conversation

@npmccallum
Copy link
Contributor

When deriving Choice, the existing macros emit incorrect length
calculation code when explicit tags are used.

Signed-off-by: Nathaniel McCallum [email protected]

When deriving `Choice`, the existing macros emit incorrect length
calculation code when explicit tags are used.

Signed-off-by: Nathaniel McCallum <[email protected]>
@tarcieri
Copy link
Member

tarcieri commented Feb 8, 2022

Nice! Can you add a test for the code generated for an EXPLICIT context-specific field?

@npmccallum
Copy link
Contributor Author

@tarcieri Is it sufficient to convert GeneralName to a derive with all tests passing? Because that's the real test case driving these fixes.

@tarcieri
Copy link
Member

tarcieri commented Feb 8, 2022

@npmccallum that's probably fine for now. I can circle back and add some tests

@tarcieri tarcieri merged commit 98cabaa into RustCrypto:master Feb 8, 2022
@carl-wallace
Copy link
Contributor

I can run in builder/validator against PKITS, FPKI and Web PKI certs when there's a chance to update. That hits a fair number of extensions that ought exercise the moving parts.

@tarcieri
Copy link
Member

tarcieri commented Feb 8, 2022

I'm really more worried about custom derive unit tests which test the output against some expected generated code.

The reason why they're important is debugging lowering failures outside of unit tests is a huge headache.

@carl-wallace
Copy link
Contributor

Sure, but catching errors from a broad set of data can inform adding unit tests. Many of the tests there are from cases that failed and highlighted an issue. But given much of what is moving is addressing compilation errors, it probably matters less. Will hold off.

@tarcieri tarcieri mentioned this pull request May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants