-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pubkey_cert_records:decode_extensions
throws on malformed extensions
#6402
Comments
IngelaAndin
added a commit
to IngelaAndin/otp
that referenced
this issue
Nov 11, 2022
IngelaAndin
added a commit
to IngelaAndin/otp
that referenced
this issue
Nov 22, 2022
IngelaAndin
added a commit
to IngelaAndin/otp
that referenced
this issue
Nov 22, 2022
Make encoding errors of known extensions handable by the verify_fun close erlang#6402
IngelaAndin
added a commit
to IngelaAndin/otp
that referenced
this issue
Feb 17, 2023
As different solutions of verifying certificate revocation exists move the decode of 'CRLDistributionPoints' so that it will only be decode when it is acctualy used in the verification process. This would enable interopability with systems that use certificates with an invalid empty CRLDistributionPoints extension that they want to ignore and make verification by other means. Closes erlang#6402
@andreasanta would you also test my PR in your environment? |
@andreasanta I think this should solve your problem and it will be merged soon for OTP-25.3 |
IngelaAndin
added a commit
that referenced
this issue
Feb 23, 2023
…l_distpoint_ext_later/GH-6402/OTP-18316 public_key: Move decode of CRLDistributionPoints extension
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When a certificate contains a known extension which is malformed,
pubkey_cert_records:decode_extensions
throws instead of returning a validation error, or simply skipping the extension. This breaks valid certificate validation paths and does not allow graceful handling of the error.To Reproduce
Expected behavior
Ideally, the extension should not be included in the final parsed result, and optionally an error should be returned.
Affected versions
Erlang/OTP 25 [erts-13.0.2]
Additional context
The certificate above does not adhere to RFC5280 and has an empty
cRLDistributionPoints
extension. However, the certificate is generated by Android in hardware and it is valid for all other purposes. It is part of a valid path and the remaining extensions are valid. Unfortunately, OTP's behaviour in this case is "fail all" and does not allow us to recover gracefully.The text was updated successfully, but these errors were encountered: