Blacklist ciphers only for h2-16 and later

This commit is contained in:
Greg Wilkins 2015-04-09 10:31:45 +10:00
parent 60d790cbf8
commit 663ff827ed
1 changed files with 5 additions and 1 deletions

View File

@ -64,8 +64,12 @@ public class HTTP2ServerConnectionFactory extends AbstractHTTP2ServerConnectionF
@Override @Override
public boolean isAcceptable(String protocol, String tlsProtocol, String tlsCipher) public boolean isAcceptable(String protocol, String tlsProtocol, String tlsCipher)
{ {
// TODO remove this draft protection
if ("h2-14".equals(protocol))
return true;
// Implement 9.2.2 // Implement 9.2.2
return !HTTP2Cipher.isBlackListProtocol(tlsProtocol) || !HTTP2Cipher.isBlackListCipher(tlsCipher); return !(HTTP2Cipher.isBlackListProtocol(tlsProtocol) && HTTP2Cipher.isBlackListCipher(tlsCipher));
} }
public class HTTPServerSessionListener extends ServerSessionListener.Adapter implements Stream.Listener public class HTTPServerSessionListener extends ServerSessionListener.Adapter implements Stream.Listener