diff options
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r-- | crypto/src/pkix/PkixBuilderParameters.cs | 6 | ||||
-rw-r--r-- | crypto/src/pkix/PkixCertPathBuilderResult.cs | 6 | ||||
-rw-r--r-- | crypto/src/pkix/PkixCertPathValidatorResult.cs | 6 | ||||
-rw-r--r-- | crypto/src/pkix/PkixNameConstraintValidator.cs | 3 | ||||
-rw-r--r-- | crypto/src/pkix/PkixPolicyNode.cs | 9 | ||||
-rw-r--r-- | crypto/src/pkix/TrustAnchor.cs | 12 |
6 files changed, 19 insertions, 23 deletions
diff --git a/crypto/src/pkix/PkixBuilderParameters.cs b/crypto/src/pkix/PkixBuilderParameters.cs index b76c97874..998b9550c 100644 --- a/crypto/src/pkix/PkixBuilderParameters.cs +++ b/crypto/src/pkix/PkixBuilderParameters.cs @@ -133,13 +133,13 @@ namespace Org.BouncyCastle.Pkix public override string ToString() { - string nl = Platform.NewLine; StringBuilder s = new StringBuilder(); - s.Append("PkixBuilderParameters [" + nl); + s.AppendLine("PkixBuilderParameters ["); s.Append(base.ToString()); s.Append(" Maximum Path Length: "); s.Append(MaxPathLength); - s.Append(nl + "]" + nl); + s.AppendLine(); + s.AppendLine("]"); return s.ToString(); } } diff --git a/crypto/src/pkix/PkixCertPathBuilderResult.cs b/crypto/src/pkix/PkixCertPathBuilderResult.cs index 639009a37..a9dfc6722 100644 --- a/crypto/src/pkix/PkixCertPathBuilderResult.cs +++ b/crypto/src/pkix/PkixCertPathBuilderResult.cs @@ -36,9 +36,9 @@ namespace Org.BouncyCastle.Pkix { StringBuilder sb = new StringBuilder(); sb.AppendLine("SimplePKIXCertPathBuilderResult: ["); - sb.Append(" Certification Path: ").AppendLine(CertPath.ToString()); - sb.Append(" Trust Anchor: ").AppendLine(TrustAnchor.TrustedCert.IssuerDN.ToString()); - sb.Append(" Subject Public Key: ").AppendLine(SubjectPublicKey.ToString()); + sb.Append(" Certification Path: ").Append(CertPath).AppendLine(); + sb.Append(" Trust Anchor: ").Append(TrustAnchor.TrustedCert.IssuerDN).AppendLine(); + sb.Append(" Subject Public Key: ").Append(SubjectPublicKey).AppendLine(); return sb.ToString(); } } diff --git a/crypto/src/pkix/PkixCertPathValidatorResult.cs b/crypto/src/pkix/PkixCertPathValidatorResult.cs index 7df3eab21..693ded89c 100644 --- a/crypto/src/pkix/PkixCertPathValidatorResult.cs +++ b/crypto/src/pkix/PkixCertPathValidatorResult.cs @@ -59,9 +59,9 @@ namespace Org.BouncyCastle.Pkix { StringBuilder sb = new StringBuilder(); sb.AppendLine("PKIXCertPathValidatorResult: ["); - sb.Append(" Trust Anchor: ").AppendLine(TrustAnchor.ToString()); - sb.Append(" Policy Tree: ").AppendLine(PolicyTree.ToString()); - sb.Append(" Subject Public Key: ").AppendLine(SubjectPublicKey.ToString()); + sb.Append(" Trust Anchor: ").Append(TrustAnchor).AppendLine(); + sb.Append(" Policy Tree: ").Append(PolicyTree).AppendLine(); + sb.Append(" Subject Public Key: ").Append(SubjectPublicKey).AppendLine(); return sb.ToString(); } } diff --git a/crypto/src/pkix/PkixNameConstraintValidator.cs b/crypto/src/pkix/PkixNameConstraintValidator.cs index 5ad4de6f8..ad59702c5 100644 --- a/crypto/src/pkix/PkixNameConstraintValidator.cs +++ b/crypto/src/pkix/PkixNameConstraintValidator.cs @@ -1849,7 +1849,8 @@ namespace Org.BouncyCastle.Pkix { sb.Append(name); sb.AppendLine(":"); - sb.AppendLine(value.ToString()); + sb.Append(value); + sb.AppendLine(); } } } diff --git a/crypto/src/pkix/PkixPolicyNode.cs b/crypto/src/pkix/PkixPolicyNode.cs index 0ea80b258..5a29d7b13 100644 --- a/crypto/src/pkix/PkixPolicyNode.cs +++ b/crypto/src/pkix/PkixPolicyNode.cs @@ -110,14 +110,12 @@ namespace Org.BouncyCastle.Pkix return ToString(""); } - public virtual string ToString( - string indent) + public virtual string ToString(string indent) { StringBuilder buf = new StringBuilder(); buf.Append(indent); buf.Append(mValidPolicy); - buf.Append(" {"); - buf.Append(Platform.NewLine); + buf.AppendLine(" {"); foreach (PkixPolicyNode child in mChildren) { @@ -125,8 +123,7 @@ namespace Org.BouncyCastle.Pkix } buf.Append(indent); - buf.Append("}"); - buf.Append(Platform.NewLine); + buf.AppendLine("}"); return buf.ToString(); } diff --git a/crypto/src/pkix/TrustAnchor.cs b/crypto/src/pkix/TrustAnchor.cs index 22078baf2..c8937e8c8 100644 --- a/crypto/src/pkix/TrustAnchor.cs +++ b/crypto/src/pkix/TrustAnchor.cs @@ -236,22 +236,20 @@ namespace Org.BouncyCastle.Pkix public override string ToString() { // TODO Some of the sub-objects might not implement ToString() properly - string nl = Platform.NewLine; StringBuilder sb = new StringBuilder(); - sb.Append("["); - sb.Append(nl); + sb.AppendLine("["); if (this.pubKey != null) { - sb.Append(" Trusted CA Public Key: ").Append(this.pubKey).Append(nl); - sb.Append(" Trusted CA Issuer Name: ").Append(this.caName).Append(nl); + sb.Append(" Trusted CA Public Key: ").Append(this.pubKey).AppendLine(); + sb.Append(" Trusted CA Issuer Name: ").Append(this.caName).AppendLine(); } else { - sb.Append(" Trusted CA cert: ").Append(this.TrustedCert).Append(nl); + sb.Append(" Trusted CA cert: ").Append(this.TrustedCert).AppendLine(); } if (nc != null) { - sb.Append(" Name Constraints: ").Append(nc).Append(nl); + sb.Append(" Name Constraints: ").Append(nc).AppendLine(); } return sb.ToString(); } |