diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-07 17:05:38 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-07 17:05:38 +0700 |
commit | b82448d873dbd8841450afb70f73ddb96ebe7e52 (patch) | |
tree | 5562f719965e9b0114b373cec957e05e5ddd3604 /crypto/src/pkix/PkixNameConstraintValidator.cs | |
parent | Improve CmpCertificate.GetInstance (diff) | |
download | BouncyCastle.NET-ed25519-b82448d873dbd8841450afb70f73ddb96ebe7e52.tar.xz |
Fix serial number comparison
Diffstat (limited to '')
-rw-r--r-- | crypto/src/pkix/PkixNameConstraintValidator.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/pkix/PkixNameConstraintValidator.cs b/crypto/src/pkix/PkixNameConstraintValidator.cs index 7a9e3f45e..85dac857b 100644 --- a/crypto/src/pkix/PkixNameConstraintValidator.cs +++ b/crypto/src/pkix/PkixNameConstraintValidator.cs @@ -79,8 +79,8 @@ namespace Org.BouncyCastle.Pkix // obey RFC 5280 7.1 // special treatment of serialNumber for GSMA SGP.22 RSP specification if (subtreeRdn.Count == 1 && dnsRdn.Count == 1 - && subtreeRdn.GetFirst().GetType().Equals(SerialNumberOid) - && dnsRdn.GetFirst().GetType().Equals(SerialNumberOid)) + && SerialNumberOid.Equals(subtreeRdn.GetFirst().Type) + && SerialNumberOid.Equals(dnsRdn.GetFirst().Type)) { if (!Platform.StartsWith(dnsRdn.GetFirst().Value.ToString(), subtreeRdn.GetFirst().Value.ToString())) return false; |