diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-10-18 16:13:07 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-10-18 16:13:07 +0700 |
commit | f0c658a6d112912f819dced69348573f2a529c05 (patch) | |
tree | 6bf59e150efe6cc3c2f941df7a62a0deb7341dec /crypto/src/pkix | |
parent | No SerializableAttribute in PCL (diff) | |
download | BouncyCastle.NET-ed25519-f0c658a6d112912f819dced69348573f2a529c05.tar.xz |
PCL: Various non-IO changes
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r-- | crypto/src/pkix/PkixCertPath.cs | 4 | ||||
-rw-r--r-- | crypto/src/pkix/PkixNameConstraintValidator.cs | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/crypto/src/pkix/PkixCertPath.cs b/crypto/src/pkix/PkixCertPath.cs index e3d3ea7fe..23a53c396 100644 --- a/crypto/src/pkix/PkixCertPath.cs +++ b/crypto/src/pkix/PkixCertPath.cs @@ -208,12 +208,12 @@ namespace Org.BouncyCastle.Pkix string encoding) // : base("X.509") { - string upper = encoding.ToUpper(); + string upper = Platform.ToUpperInvariant(encoding); IList certs; try { - if (upper.Equals("PkiPath".ToUpper())) + if (upper.Equals(Platform.ToUpperInvariant("PkiPath"))) { Asn1InputStream derInStream = new Asn1InputStream(inStream); Asn1Object derObject = derInStream.ReadObject(); diff --git a/crypto/src/pkix/PkixNameConstraintValidator.cs b/crypto/src/pkix/PkixNameConstraintValidator.cs index 535f95174..cf944beae 100644 --- a/crypto/src/pkix/PkixNameConstraintValidator.cs +++ b/crypto/src/pkix/PkixNameConstraintValidator.cs @@ -638,7 +638,7 @@ namespace Org.BouncyCastle.Pkix // a particular mailbox if (constraint.IndexOf('@') != -1) { - if (email.ToUpper().Equals(constraint.ToUpper())) + if (Platform.ToUpperInvariant(email).Equals(Platform.ToUpperInvariant(constraint))) { return true; } @@ -646,7 +646,7 @@ namespace Org.BouncyCastle.Pkix // on particular host else if (!(constraint[0].Equals('.'))) { - if (sub.ToUpper().Equals(constraint.ToUpper())) + if (Platform.ToUpperInvariant(sub).Equals(Platform.ToUpperInvariant(constraint))) { return true; } @@ -708,7 +708,8 @@ namespace Org.BouncyCastle.Pkix String str = ((String)it.Current); // is sub domain - if (WithinDomain(dns, str) || dns.ToUpper().Equals(str.ToUpper())) + if (WithinDomain(dns, str) + || Platform.ToUpperInvariant(dns).Equals(Platform.ToUpperInvariant(str))) { return; } |