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

FullChainFile chain may be an empty list #95

Open
dracos opened this issue Apr 6, 2016 · 0 comments
Open

FullChainFile chain may be an empty list #95

dracos opened this issue Apr 6, 2016 · 0 comments

Comments

@dracos
Copy link

dracos commented Apr 6, 2016

if data.chain is None:
tests if data.chain is None, but its parent's load_from_content means that if e.g. the file exists but is empty or corrupt, it will be an empty list. I think the check should also check for the empty list as well as None.

$ touch foo.pem
$ python
>>> import simp_le
>>> simp_le.FullChainFile(path="foo.pem").load()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "simp_le.py", line 713, in load
    cert, chain = data.chain[0], data.chain[1:]
IndexError: list index out of range
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

No branches or pull requests

1 participant