Skip to content
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

Fix a crash during CRL verification #28

Closed
wants to merge 1 commit into from

Conversation

teskje
Copy link

@teskje teskje commented Sep 10, 2020

If use_deltas was set to True as an input to the verify_crl function the code would proceed to build the following list of distribution point objects in sources:
[[dp, dp, ...], dp, dp, ...]

The code after assumed the following format:
[[dp, dp, ...], [dp, dp, ...]] (a list of lists)

This divide could lead to a crash due to a TypeError, as described in #9.

The fix implemented in this PR removes the nesting of lists as it is not needed, so the new format is:
[dp, dp, ..., dp, dp, ...]

If `use_deltas` was set to True as an input to the `verify_crl` function
the code would proceed to build the following list of distribution point
objects in `sources`:
    `[[dp, dp, ...], dp, dp, ...]`

The code after assumed the following format:
    `[[dp, dp, ...], [dp, dp, ...]]`  (a list of lists)

This divide could lead to a crash due to a `TypeError`.

The fix implemented in this commit removes the nesting of lists as it is
not needed, so the new format is:
    `[dp, dp, ..., dp, dp, ...]`
@3lixy
Copy link

3lixy commented Dec 28, 2020

I just came across this issue too and was about to submit a pull request for this and saw this one. My solution was slightly different by just changing
sources.extend(cert.delta_crl_distribution_points)
to
sources.extend([cert.delta_crl_distribution_points])

It seems rare to see this for a cert for me.

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.

2 participants