-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Unused bits in asn1 bit string #1610
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
Comments
For reference, the The quote is from RFC5280 Appendix B |
@moshe-shahar Please specify what is the current behavior, what is the expected behavior and how to reproduce. |
Current behavior is to set the unused bits field in the DER to modulo 8 on bits argument. |
@sbutcher-arm This defect is now biting us - we cannot encode a specific field we need to encode in a CSR. Is there any forecast to when this could be looked at? |
ARM Internal Ref: IOTSSL-2526 |
@moshe-shahar I think we need to distinguish between raw bitstrings, which may include trailing zero bits, and named bit lists, for which such are forbidden in DER. Changing |
@hanno-arm, I can't comment or suggest what is the correct fix since I'm not sure I'm familiar with all cases this library should support. |
Description
mbed TLS build:
Version: 2.8.0 (latest)
Bugs
The unused bits in mbedtls_asn1_write_bitstring are not as expected and should contain also the trailing zeros.
Tested against Python cryptography library
From spec:
The text was updated successfully, but these errors were encountered: