diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-19 13:36:35 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-19 13:36:35 +0400 |
commit | 9f23ce242e99010ab01a57448d0b1605d84830b1 (patch) | |
tree | 2a0764249398d53637c3da9582e1d1e5023f2c75 /core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | |
parent | e49392d526e1a168ed5c2c993c64d0a4feb47b65 (diff) |
Refactor code that checks version features
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java index fef6de3e..eb954c4b 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsServerProtocol.java @@ -279,10 +279,7 @@ public class TlsServerProtocol } else { - - ProtocolVersion equivalentTLSVersion = getContext().getServerVersion().getEquivalentTLSVersion(); - - if (ProtocolVersion.TLSv12.isEqualOrEarlierVersionOf(equivalentTLSVersion)) + if (TlsUtils.isTLSv12(getContext())) { /* * RFC 5246 If no suitable certificate is available, the client MUST send a @@ -292,7 +289,7 @@ public class TlsServerProtocol */ this.failWithError(AlertLevel.fatal, AlertDescription.unexpected_message); } - else if (equivalentTLSVersion.isSSL()) + else if (TlsUtils.isSSL(getContext())) { if (clientCertificate == null) { |