summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/PkixCertPath.cs4
-rw-r--r--crypto/src/pkix/PkixNameConstraintValidator.cs7
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;
                 }