diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:07:20 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:07:20 +0700 |
commit | fe7d3e0009ae2ba833be66729221f42ac3aa0464 (patch) | |
tree | 7008925a5fb5a59a32fcd40ab0638a8e6888de08 /crypto/src/tls | |
parent | Refactor Asn1Dump (diff) | |
download | BouncyCastle.NET-ed25519-fe7d3e0009ae2ba833be66729221f42ac3aa0464.tar.xz |
Refactoring around Platform
Diffstat (limited to 'crypto/src/tls')
-rw-r--r-- | crypto/src/tls/CertificateStatus.cs | 4 | ||||
-rw-r--r-- | crypto/src/tls/ProtocolVersion.cs | 2 | ||||
-rw-r--r-- | crypto/src/tls/SignatureScheme.cs | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/crypto/src/tls/CertificateStatus.cs b/crypto/src/tls/CertificateStatus.cs index 51f488fd6..7ff11f729 100644 --- a/crypto/src/tls/CertificateStatus.cs +++ b/crypto/src/tls/CertificateStatus.cs @@ -4,7 +4,6 @@ using System.IO; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Ocsp; -using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Tls { @@ -165,8 +164,7 @@ namespace Org.BouncyCastle.Tls } } - // Match IList capacity to actual size - response = Platform.CreateArrayList(ocspResponseList); + response = ocspResponseList; break; } default: diff --git a/crypto/src/tls/ProtocolVersion.cs b/crypto/src/tls/ProtocolVersion.cs index e9c08e8cd..fd32848b0 100644 --- a/crypto/src/tls/ProtocolVersion.cs +++ b/crypto/src/tls/ProtocolVersion.cs @@ -412,7 +412,7 @@ namespace Org.BouncyCastle.Tls CheckUint8(minor); int v = (major << 8) | minor; - string hex = Platform.ToUpperInvariant(Convert.ToString(0x10000 | v, 16).Substring(1)); + string hex = Convert.ToString(0x10000 | v, 16).Substring(1).ToUpperInvariant(); return new ProtocolVersion(v, prefix + " 0x" + hex); } } diff --git a/crypto/src/tls/SignatureScheme.cs b/crypto/src/tls/SignatureScheme.cs index ed8e3c21b..56bc52d89 100644 --- a/crypto/src/tls/SignatureScheme.cs +++ b/crypto/src/tls/SignatureScheme.cs @@ -199,7 +199,7 @@ namespace Org.BouncyCastle.Tls public static string GetText(int signatureScheme) { - string hex = Platform.ToUpperInvariant(Convert.ToString(signatureScheme, 16)); + string hex = Convert.ToString(signatureScheme, 16).ToUpperInvariant(); return GetName(signatureScheme) + "(0x" + hex + ")"; } |