Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Intermediate with OpenSSL: verify error:num=25:path length constraint exceeded #78
Comments
|
The intermediate isn't actually the problem here, it's the root: Certstrap generates roots with That seems confusing and is definitely not documented anywhere. Path length really ought to be a flag. |
By default when certstrap initializes a CA certificate it sets the `pathlen` X509v3 basic constraint to zero (0). This is correct if the CA will not be used in a certificate chain which includes intermediate certificates. Add a parameter to `certstrap init` to allow a user to override the `pathlen` constraint if they know that their CA will be used with intermediate certificates. By default the value is set to zero, leaving the behaviour the same as before this change if the parameter isn't overridden. c.f. https://tools.ietf.org/html/rfc5280#section-4.2.1.9 Example usage: ``` $ certstrap init -cn foo.example.com [...] $ openssl x509 -noout -text -in out/foo.example.com.crt [...] X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 [...] ``` ``` $ certstrap init -cn bar.example.com --path-length 1 [...] $ openssl x509 -noout -text -in out/bar.example.com.crt [...] X509v3 Basic Constraints: critical CA:TRUE, pathlen:1 [...] ``` Fixes: square#78
|
I ran into this same thing, but I must be missing something. How has anybody ever made use of the --intermediate functionality if the maxpathlen of the root prevents it from working at all? |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Could be a documentation issue - there is nothing in the README.md. I generated an Intermediate certificate using these steps:
I'm trying to debug it, but can't quite figure out what it this comment means:
Should I generate my Intermediate CA differently?