public void notifyFallback(boolean isFallback) throws IOException { /* * RFC 7507 3. If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest * protocol version supported by the server is higher than the version indicated in * ClientHello.client_version, the server MUST respond with a fatal inappropriate_fallback * alert [..]. */ if (isFallback && getMaximumVersion().isLaterVersionOf(clientVersion)) { throw new TlsFatalAlert(AlertDescription.inappropriate_fallback); } }
public void notifyFallback(boolean isFallback) throws IOException { /* * draft-ietf-tls-downgrade-scsv-00 3. If TLS_FALLBACK_SCSV appears in * ClientHello.cipher_suites and the highest protocol version supported by the server is * higher than the version indicated in ClientHello.client_version, the server MUST respond * with an inappropriate_fallback alert. */ if (isFallback && getMaximumVersion().isLaterVersionOf(clientVersion)) { throw new TlsFatalAlert(AlertDescription.inappropriate_fallback); } }
public ProtocolVersion getServerVersion() throws IOException { if (getMinimumVersion().isEqualOrEarlierVersionOf(clientVersion)) { ProtocolVersion maximumVersion = getMaximumVersion(); if (clientVersion.isEqualOrEarlierVersionOf(maximumVersion)) { return serverVersion = clientVersion; } if (clientVersion.isLaterVersionOf(maximumVersion)) { return serverVersion = maximumVersion; } } throw new TlsFatalAlert(AlertDescription.protocol_version); }
public ProtocolVersion getServerVersion() throws IOException { if (getMinimumVersion().isEqualOrEarlierVersionOf(clientVersion)) { ProtocolVersion maximumVersion = getMaximumVersion(); if (clientVersion.isEqualOrEarlierVersionOf(maximumVersion)) { return serverVersion = clientVersion; } if (clientVersion.isLaterVersionOf(maximumVersion)) { return serverVersion = maximumVersion; } } throw new TlsFatalAlert(AlertDescription.protocol_version); }