diff options
Diffstat (limited to 'crypto/src/pkix/PkixNameConstraintValidator.cs')
-rw-r--r-- | crypto/src/pkix/PkixNameConstraintValidator.cs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crypto/src/pkix/PkixNameConstraintValidator.cs b/crypto/src/pkix/PkixNameConstraintValidator.cs index e3e8c2fa0..5ad4de6f8 100644 --- a/crypto/src/pkix/PkixNameConstraintValidator.cs +++ b/crypto/src/pkix/PkixNameConstraintValidator.cs @@ -495,18 +495,14 @@ namespace Org.BouncyCastle.Pkix // a particular mailbox if (constraint.IndexOf('@') != -1) { - if (Platform.ToUpperInvariant(email).Equals(Platform.ToUpperInvariant(constraint))) - { + if (string.Equals(email, constraint, StringComparison.OrdinalIgnoreCase)) return true; - } } // on particular host - else if (!(constraint[0].Equals('.'))) + else if (constraint[0] != '.') { - if (Platform.ToUpperInvariant(sub).Equals(Platform.ToUpperInvariant(constraint))) - { + if (string.Equals(sub, constraint, StringComparison.OrdinalIgnoreCase)) return true; - } } // address in sub domain else if (WithinDomain(sub, constraint)) @@ -1852,9 +1848,8 @@ namespace Org.BouncyCastle.Pkix private static void Append(StringBuilder sb, string name, object value) { sb.Append(name); - sb.Append(":\n"); - sb.Append(value); - sb.Append('\n'); + sb.AppendLine(":"); + sb.AppendLine(value.ToString()); } } } |