private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException { if (result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.FINISHED) { if (alpnSelector == null) { // This means we are using client-side and try { String protocol = getApplicationProtocol(); assert protocol != null; if (protocol.isEmpty()) { // If empty the server did not announce ALPN: // See: // http://hg.openjdk.java.net/jdk9/dev/jdk/file/65464a307408/src/java.base/ // share/classes/sun/security/ssl/ClientHandshaker.java#l741 selectionListener.unsupported(); } else { selectionListener.selected(protocol); } } catch (Throwable e) { throw toSSLHandshakeException(e); } } else { assert selectionListener == null; alpnSelector.checkUnsupported(); } } return result; }
private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException { if (result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.FINISHED) { if (alpnSelector == null) { // This means we are using client-side and try { String protocol = getApplicationProtocol(); assert protocol != null; if (protocol.isEmpty()) { // If empty the server did not announce ALPN: // See: // http://hg.openjdk.java.net/jdk9/dev/jdk/file/65464a307408/src/java.base/ // share/classes/sun/security/ssl/ClientHandshaker.java#l741 selectionListener.unsupported(); } else { selectionListener.selected(protocol); } } catch (Throwable e) { throw toSSLHandshakeException(e); } } else { assert selectionListener == null; alpnSelector.checkUnsupported(); } } return result; }
private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException { if (result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.FINISHED) { if (alpnSelector == null) { // This means we are using client-side and try { String protocol = getApplicationProtocol(); assert protocol != null; if (protocol.isEmpty()) { // If empty the server did not announce ALPN: // See: // http://hg.openjdk.java.net/jdk9/dev/jdk/file/65464a307408/src/java.base/ // share/classes/sun/security/ssl/ClientHandshaker.java#l741 selectionListener.unsupported(); } else { selectionListener.selected(protocol); } } catch (Throwable e) { throw toSSLHandshakeException(e); } } else { assert selectionListener == null; alpnSelector.checkUnsupported(); } } return result; }
private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException { if (result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.FINISHED) { if (alpnSelector == null) { // This means we are using client-side and try { String protocol = getApplicationProtocol(); assert protocol != null; if (protocol.isEmpty()) { // If empty the server did not announce ALPN: // See: // http://hg.openjdk.java.net/jdk9/dev/jdk/file/65464a307408/src/java.base/ // share/classes/sun/security/ssl/ClientHandshaker.java#l741 selectionListener.unsupported(); } else { selectionListener.selected(protocol); } } catch (Throwable e) { throw toSSLHandshakeException(e); } } else { assert selectionListener == null; alpnSelector.checkUnsupported(); } } return result; }
@Override public void unsupported() { protocolListener.unsupported(); }
@Override public void unsupported() { protocolListener.unsupported(); }
@Override public void unsupported() { protocolListener.unsupported(); }
@Override public void unsupported() { protocolListener.unsupported(); } });
private void selectProtocol() throws SSLException { String protocol = Conscrypt.getApplicationProtocol(getWrappedEngine()); try { protocolListener.selected(protocol); } catch (Throwable e) { throw toSSLHandshakeException(e); } } }
@Override public void protocolSelected(String protocol) { try { protocolListener.selected(protocol); } catch (Throwable t) { PlatformDependent.throwException(t); } } });
@Override public void selected(String protocol) throws SSLException { try { protocolListener.selected(protocol); } catch (Throwable t) { throw toSSLHandshakeException(t); } }
@Override public void selected(String protocol) throws SSLException { try { protocolListener.selected(protocol); } catch (Throwable t) { throw toSSLHandshakeException(t); } }
private void selectProtocol() throws SSLException { String protocol = Conscrypt.getApplicationProtocol(getWrappedEngine()); try { protocolListener.selected(protocol); } catch (Throwable e) { throw toSSLHandshakeException(e); } } }
@Override public void selected(String protocol) throws SSLException { try { protocolListener.selected(protocol); } catch (Throwable t) { throw toSSLHandshakeException(t); } }
@Override public void protocolSelected(String protocol) { try { protocolListener.selected(protocol); } catch (Throwable t) { PlatformDependent.throwException(t); } } });
private void selectProtocol() throws SSLException { String protocol = Conscrypt.getApplicationProtocol(getWrappedEngine()); try { protocolListener.selected(protocol); } catch (Throwable e) { throw toSSLHandshakeException(e); } } }
@Override public void protocolSelected(String protocol) { try { protocolListener.selected(protocol); } catch (Throwable t) { PlatformDependent.throwException(t); } } });
@Override public void unsupported() { protocolListener.unsupported(); } });
@Override public void unsupported() { protocolListener.unsupported(); } });
@Override public void unsupported() { protocolListener.unsupported(); }