pyca / pyca/pyopenssl

X509StoreContextError - path length constraint exceeded

Open
#685 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
944
Forks
440
Avg merge
1d 6h
Merged PRs (30d)
6

Description

I'm trying to verify a certificate chain with pathlen:0 on one of the intermediate certificates, and I'm getting this exception.

It is working when I'm using openssl:

openssl verify -verbose -CAfile root_ca.pem cert.pem
cert.pem: OK 

How can I make it work like in openssl?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the certificate-chain verification using root_ca.pem and cert.pem, comparing the Python behavior with the shown openssl verify command. Trace how the X509StoreContextError is raised for the pathlen:0 intermediate and determine what is needed for Python verification to match OpenSSL; done when the same chain verifies successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.