diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-05-11 13:11:10 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-05-11 13:11:10 +0700 |
commit | 9d8e9cb9d50fc95c8d395120f87bc01b27560163 (patch) | |
tree | 41c634aad81a8aa461252e0cc84b329f86967c91 | |
parent | Support TLS 1.3 in test class (diff) | |
download | BouncyCastle.NET-ed25519-9d8e9cb9d50fc95c8d395120f87bc01b27560163.tar.xz |
Reformat
-rw-r--r-- | crypto/src/tls/ProtocolVersion.cs | 67 |
1 files changed, 40 insertions, 27 deletions
diff --git a/crypto/src/tls/ProtocolVersion.cs b/crypto/src/tls/ProtocolVersion.cs index f37ce382d..24cfec4f2 100644 --- a/crypto/src/tls/ProtocolVersion.cs +++ b/crypto/src/tls/ProtocolVersion.cs @@ -225,17 +225,20 @@ namespace Org.BouncyCastle.Tls { switch (MajorVersion) { - case 0x03: - return this; - case 0xFE: - switch (MinorVersion) - { - case 0xFF: return TLSv11; - case 0xFD: return TLSv12; - default: return null; - } + case 0x03: + return this; + case 0xFE: + switch (MinorVersion) + { + case 0xFF: + return TLSv11; + case 0xFD: + return TLSv12; default: return null; + } + default: + return null; } } @@ -247,15 +250,20 @@ namespace Org.BouncyCastle.Tls case 0x03: switch (minor) { - case 0xFF: return null; - default: return Get(major, minor + 1); + case 0xFF: + return null; + default: + return Get(major, minor + 1); } case 0xFE: switch (minor) { - case 0x00: return null; - case 0xFF: return DTLSv12; - default: return Get(major, minor - 1); + case 0x00: + return null; + case 0xFF: + return DTLSv12; + default: + return Get(major, minor - 1); } default: return null; @@ -267,21 +275,26 @@ namespace Org.BouncyCastle.Tls int major = MajorVersion, minor = MinorVersion; switch (major) { - case 0x03: - switch (minor) - { - case 0x00: return null; - default: return Get(major, minor - 1); - } - case 0xFE: - switch (minor) - { - case 0xFF: return null; - case 0xFD: return DTLSv10; - default: return Get(major, minor + 1); - } + case 0x03: + switch (minor) + { + case 0x00: + return null; default: + return Get(major, minor - 1); + } + case 0xFE: + switch (minor) + { + case 0xFF: return null; + case 0xFD: + return DTLSv10; + default: + return Get(major, minor + 1); + } + default: + return null; } } |