diff options
Diffstat (limited to 'crypto/src/x509')
-rw-r--r-- | crypto/src/x509/X509Certificate.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index 30cdd6e2d..b1307d90e 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -367,7 +367,11 @@ namespace Org.BouncyCastle.X509 if (basicConstraints == null || !basicConstraints.IsCA()) return -1; - return basicConstraints.PathLenConstraint_Int32; + var pathLenConstraint = basicConstraints.PathLenConstraintInteger; + if (pathLenConstraint == null) + return int.MaxValue; + + return pathLenConstraint.IntPositiveValueExact; } public virtual GeneralNames GetIssuerAlternativeNameExtension() |