@Override public void configureTlsExtensions( SSLSocket sslSocket, String hostname, List<Protocol> protocols) { List<String> names = alpnProtocolNames(protocols); try { Object provider = Proxy.newProxyInstance(Platform.class.getClassLoader(), new Class[] {clientProviderClass, serverProviderClass}, new JettyNegoProvider(names)); putMethod.invoke(null, sslSocket, provider); } catch (InvocationTargetException | IllegalAccessException e) { throw assertionError("unable to set alpn", e); } }
@Override public void configureTlsExtensions( SSLSocket sslSocket, String hostname, List<Protocol> protocols) { List<String> names = alpnProtocolNames(protocols); try { Object provider = Proxy.newProxyInstance(Platform.class.getClassLoader(), new Class[] {clientProviderClass, serverProviderClass}, new JettyNegoProvider(names)); putMethod.invoke(null, sslSocket, provider); } catch (InvocationTargetException | IllegalAccessException e) { throw assertionError("unable to set alpn", e); } }