Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@IngelaAndin
Copy link
Contributor

As different solutions of verifying certificate revocation exists move the decode of 'CRLDistributionPoints' so that it will only be decode when it is actually used in the verification process. This would enable interoperability with systems that use certificates with an invalid empty CRLDistributionPoints extension that they want to ignore and make verification by other means.

Closes #6402

As different solutions of verifying certificate revocation exists
move the decode of 'CRLDistributionPoints' so that it will only be decode
when it is actually used in the verification process. This would enable
interoperability 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
@IngelaAndin IngelaAndin added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels Feb 17, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

CT Test Results

    2 files    15 suites   5m 1s ⏱️
215 tests 213 ✔️ 2 💤 0
230 runs  228 ✔️ 2 💤 0

Results for commit a893290.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Comment on lines +373 to 377
select_extension(Id, [#'Extension'{extnID = ?'id-ce-cRLDistributionPoints' = Id,
extnValue = Value} = Extension | _]) when is_binary(Value) ->
Extension#'Extension'{extnValue = public_key:der_decode('CRLDistributionPoints', Value)};
select_extension(Id, [#'Extension'{extnID = Id} = Extension | _]) ->
Extension;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it only the extension ?id-ce-cRLDistributionPoints that is decoded here? Could there not be other extensions as well that is not decoded until used?
Would a test of is_binary(Value) imply that the extension needs to be decoded here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CRL extension is not decode initially but then decode later when used by public_key functions. Other possibly unencoded extensions are not know by public key and handled totally by some other code that will have to do the decoding. We could possible find a reason to add more known public_key extensions here later, but I do not think there is an obvious one at the moment. Yes is_binary implies that the value is DER encoded.

@IngelaAndin IngelaAndin self-assigned this Feb 20, 2023
@IngelaAndin IngelaAndin modified the milestones: OTP-26.0-rc2, OTP-25.3 Feb 20, 2023
@IngelaAndin IngelaAndin merged commit 205da37 into erlang:maint Feb 23, 2023
@IngelaAndin IngelaAndin deleted the ingela/public_key/decode_crl_distpoint_ext_later/GH-6402/OTP-18316 branch February 23, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants