Skip to content

SSLSession#getCipherSuite() returns SSL_NULL_WITH_NULL_NULL with TLS 1.3 #8477

@rkapsi

Description

@rkapsi

I have a FutureListener which I'm adding to SslHandler#handshakeFuture() with the purpose gathering statistics on TLS protocols and ciphers. Something like this:

void log(SslHandler handler) {
  SSLEngine sslEngine = handler.engine();
    
  Future<Channel> handshakeFuture = handler.handshakeFuture();
  handshakeFuture.addListener(new MySslLogger(sslEngine));
}

class MySslLogger implements FutureListener<Channel> {
  private final SSLEngine sslEngine;

  public HandshakeListener(SSLEngine sslEngine) {
    this.sslEngine = sslEngine;
  }

  @Override
  public void operationComplete(Future<Channel> future) throws Exception {
    SSLSession sslSession = sslEngine.getSession();
    String protocol = sslSession.getProtocol();
    String cipher = sslSession.getCipherSuite();

    System.out.println("protocol=" + protocol + ", cipher=" + cipher);
  }
}

It appears the reported cipher suite as returned by SSLSession#getCipherSuite() remains SSL_NULL_WITH_NULL_NULL in conjunction with TLS 1.3. It works fine with TLS 1.2 and the handshake itself is fine otherwise.

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or URL to code)

Netty version

4.1.31

JVM version (e.g. java -version)

Tried OpenJDK 1.8.0_192 and 11.0.1

OS version (e.g. uname -a)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions