Topic: BasicConstraints pathLenConstraint validation
Hi,
I was trying to connect to https://content.uplynk.com/ with wolfSSL but failed with error
ASN_PATHLEN_INV_E = -238, /* ASN CA path length inversion error */
After some debugging I found that it fails in following check
https://github.com/wolfSSL/wolfssl/blob … sn.c#L6046
if (cert->pathLengthSet &&
cert->pathLength >= cert->ca->pathLength) {
WOLFSSL_MSG("CA signing CA with longer path length");
return ASN_PATHLEN_INV_E;
}
In my case both cert->pathLength and cert->ca->pathLength are equal to 3
Baltimore CyberTrust Root issues certificate to Verizon Public SureServer CA G14-SHA2
Verizon issues certificate to *.uplynk.com
Baltimore CyberTrust Root sets pathLenConstraint to 3.
Is it correct that it fails and why?
I do not fully understand requirements of Basic Constraints section in RFC 5280
https://tools.ietf.org/html/rfc5280#section-4.2.1.9
Shouldn't the check be just greater and not greater or equal?
Thanks in advance