public SSLSession getSslSession() { SslChannel sslChannel = remoteConnection.getSslChannel(); return sslChannel != null ? sslChannel.getSslSession() : null; }
void initialiseCapabilities() { final SslChannel sslChannel = connection.getSslChannel(); final boolean channelSecure = sslChannel != null && Channels.getOption(sslChannel, Options.SECURE, false); starttls = ! (sslChannel == null || channelSecure);
if (channel.flush()) { Messages.conn.trace("Flushed channel"); final SslChannel sslChannel = getSslChannel(); assert sslChannel != null; // because STARTTLS would be false in this case sslChannel.startHandshake();
factoryOperator = and(ClientConnectionOpenListener.this.saslClientFactoryOperator, factoryOperator); final SaslClient saslClient; final SslChannel sslChannel = connection.getSslChannel(); final SSLSession sslSession; if (sslChannel != null) {
final SslChannel sslChannel = connection.getSslChannel(); final SSLSession sslSession = sslChannel == null ? null : sslChannel.getSslSession();
public SSLSession getSslSession() { SslChannel sslChannel = remoteConnection.getSslChannel(); return sslChannel != null ? sslChannel.getSslSession() : null; }
public SSLSession getSslSession() { SslChannel sslChannel = remoteConnection.getSslChannel(); return sslChannel != null ? sslChannel.getSslSession() : null; }
private Collection<Principal> definePrincipals() { final Set<Principal> principals = new LinkedHashSet<Principal>(); final SslChannel sslChannel = connection.getSslChannel(); if (sslChannel != null) { // It might be STARTTLS, in which case we can still opt out of SSL final SSLSession session = sslChannel.getSslSession(); if (session != null) { try { principals.add(session.getPeerPrincipal()); } catch (SSLPeerUnverifiedException ignored) { } } } if (authorizationID != null) { principals.add(new UserPrincipal(authorizationID)); } final ConnectedMessageChannel channel = connection.getChannel(); final InetSocketAddress address = channel.getPeerAddress(InetSocketAddress.class); if (address != null) { principals.add(new InetAddressPrincipal(address.getAddress())); } return principals; }
private Collection<Principal> createPrincipals() { final Set<Principal> principals = new LinkedHashSet<Principal>(); final SslChannel sslChannel = connection.getSslChannel(); if (sslChannel != null) { // It might be STARTTLS, in which case we can still opt out of SSL final SSLSession session = sslChannel.getSslSession(); if (session != null) { try { principals.add(session.getPeerPrincipal()); } catch (SSLPeerUnverifiedException ignored) { } } } String authorizationId = saslServer.getAuthorizationID(); if (authorizationId != null) { principals.add(new UserPrincipal(authorizationId)); } final ConnectedMessageChannel channel = connection.getChannel(); final InetSocketAddress address = channel.getPeerAddress(InetSocketAddress.class); if (address != null) { principals.add(new InetAddressPrincipal(address.getAddress())); } return Collections.unmodifiableCollection(principals); }
void initialiseCapabilities() { final SslChannel sslChannel = connection.getSslChannel(); final boolean channelSecure = Channels.getOption(connection.getChannel(), Options.SECURE, false); starttls = ! (sslChannel == null || channelSecure);
void initialiseCapabilities() { final SslChannel sslChannel = connection.getSslChannel(); final boolean channelSecure = sslChannel != null && Channels.getOption(sslChannel, Options.SECURE, false); starttls = ! (sslChannel == null || channelSecure);
if (channel.flush()) { Messages.conn.trace("Flushed channel"); final SslChannel sslChannel = getSslChannel(); assert sslChannel != null; // because STARTTLS would be false in this case sslChannel.startHandshake();
factoryOperator = and(ClientConnectionOpenListener.this.saslClientFactoryOperator, factoryOperator); final SaslClient saslClient; final SslChannel sslChannel = connection.getSslChannel(); final SSLSession sslSession; if (sslChannel != null) {
if (starttls) { try { connection.getSslChannel().startHandshake(); } catch (IOException e) { connection.handleException(e);
final SslChannel sslChannel = connection.getSslChannel(); final SSLSession sslSession = sslChannel == null ? null : sslChannel.getSslSession();