public SSLSession getSSLSession() { SSLEngine e = connection.getSSLEngine(); if (e == null) { return null; } return e.getSession(); }