From 9c6880706476c6066b9aa2ce82c159d64c8766c6 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 10 Aug 2019 00:18:03 +0700 Subject: Add and use IntValueExact properties --- crypto/src/pkix/Rfc3280CertPathUtilities.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/src/pkix') diff --git a/crypto/src/pkix/Rfc3280CertPathUtilities.cs b/crypto/src/pkix/Rfc3280CertPathUtilities.cs index cdb69b7e0..c703194a4 100644 --- a/crypto/src/pkix/Rfc3280CertPathUtilities.cs +++ b/crypto/src/pkix/Rfc3280CertPathUtilities.cs @@ -1620,7 +1620,7 @@ namespace Org.BouncyCastle.Pkix Asn1TaggedObject constraint = Asn1TaggedObject.GetInstance(policyConstraints.Current); if (constraint.TagNo == 0) { - tmpInt = DerInteger.GetInstance(constraint, false).Value.IntValue; + tmpInt = DerInteger.GetInstance(constraint, false).IntValueExact; if (tmpInt < explicitPolicy) { return tmpInt; @@ -1675,7 +1675,7 @@ namespace Org.BouncyCastle.Pkix Asn1TaggedObject constraint = Asn1TaggedObject.GetInstance(policyConstraints.Current); if (constraint.TagNo == 1) { - tmpInt = DerInteger.GetInstance(constraint, false).Value.IntValue; + tmpInt = DerInteger.GetInstance(constraint, false).IntValueExact; if (tmpInt < policyMapping) { return tmpInt; @@ -1789,7 +1789,7 @@ namespace Org.BouncyCastle.Pkix if (iap != null) { - int _inhibitAnyPolicy = iap.Value.IntValue; + int _inhibitAnyPolicy = iap.IntValueExact; if (_inhibitAnyPolicy < inhibitAnyPolicy) return _inhibitAnyPolicy; @@ -2062,7 +2062,7 @@ namespace Org.BouncyCastle.Pkix case 0: try { - tmpInt = DerInteger.GetInstance(constraint, false).Value.IntValue; + tmpInt = DerInteger.GetInstance(constraint, false).IntValueExact; } catch (Exception e) { -- cgit 1.4.1