summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-05-04 16:43:06 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-05-04 16:43:06 +0700
commite7cb9e780da9b4ed2cee55feb0c4e7302222267d (patch)
treeb5fb6c8609afbc925021b763b06b45e61df3c4f8 /crypto/src/asn1
parentUpdate Dilithium PrivateKeyInfo code from bc-java (diff)
downloadBouncyCastle.NET-ed25519-e7cb9e780da9b4ed2cee55feb0c4e7302222267d.tar.xz
Refactoring around BasicConstraints
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/x509/BasicConstraints.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/src/asn1/x509/BasicConstraints.cs b/crypto/src/asn1/x509/BasicConstraints.cs
index acc8766a7..92e0e3dae 100644
--- a/crypto/src/asn1/x509/BasicConstraints.cs
+++ b/crypto/src/asn1/x509/BasicConstraints.cs
@@ -82,10 +82,11 @@ namespace Org.BouncyCastle.Asn1.X509
             return cA != null && cA.IsTrue;
         }
 
-		public BigInteger PathLenConstraint
-        {
-            get { return pathLenConstraint == null ? null : pathLenConstraint.Value; }
-        }
+        // TODO[api] Return DerInteger
+        public BigInteger PathLenConstraint => pathLenConstraint?.Value;
+
+        internal int PathLenConstraint_Int32 =>
+            pathLenConstraint == null ? int.MaxValue : pathLenConstraint.IntValueExact;
 
 		/**
          * Produce an object suitable for an Asn1OutputStream.