diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-05-05 19:00:34 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-05-05 19:00:34 +0700 |
commit | eec1e384fc311c22550cc4654fcf8272d65e2978 (patch) | |
tree | d08b71b94008b1065b8612d9c20af860fa61c92a /crypto/src/pkix | |
parent | Refactoring around BasicConstraints (diff) | |
download | BouncyCastle.NET-ed25519-eec1e384fc311c22550cc4654fcf8272d65e2978.tar.xz |
Improvements to pathLenConstraints checks
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r-- | crypto/src/pkix/Rfc3280CertPathUtilities.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/src/pkix/Rfc3280CertPathUtilities.cs b/crypto/src/pkix/Rfc3280CertPathUtilities.cs index 88b842abb..82fe44c35 100644 --- a/crypto/src/pkix/Rfc3280CertPathUtilities.cs +++ b/crypto/src/pkix/Rfc3280CertPathUtilities.cs @@ -1778,8 +1778,12 @@ namespace Org.BouncyCastle.Pkix } if (bc != null && bc.IsCA()) { - maxPathLength = System.Math.Min(maxPathLength, bc.PathLenConstraint_Int32); - } + var pathLenConstraint = bc.PathLenConstraintInteger; + if (pathLenConstraint != null) + { + maxPathLength = System.Math.Min(maxPathLength, pathLenConstraint.IntPositiveValueExact); + } + } return maxPathLength; } |