|
1 | 1 | /* |
2 | | - * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2016, 2022 Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials are made available under the |
5 | 5 | * terms of the Eclipse Public License v. 2.0, which is available at |
|
61 | 61 | import io.netty.handler.codec.http.HttpUtil; |
62 | 62 | import io.netty.handler.codec.http.HttpVersion; |
63 | 63 | import io.netty.handler.proxy.HttpProxyHandler; |
| 64 | +import io.netty.handler.ssl.ApplicationProtocolConfig; |
64 | 65 | import io.netty.handler.ssl.ClientAuth; |
| 66 | +import io.netty.handler.ssl.IdentityCipherSuiteFilter; |
65 | 67 | import io.netty.handler.ssl.JdkSslContext; |
66 | 68 | import io.netty.handler.ssl.SslHandler; |
67 | 69 | import io.netty.handler.stream.ChunkedWriteHandler; |
@@ -241,7 +243,16 @@ protected void initChannel(SocketChannel ch) throws Exception { |
241 | 243 | // Enable HTTPS if necessary. |
242 | 244 | if ("https".equals(requestUri.getScheme())) { |
243 | 245 | // making client authentication optional for now; it could be extracted to configurable property |
244 | | - JdkSslContext jdkSslContext = new JdkSslContext(client.getSslContext(), true, ClientAuth.NONE); |
| 246 | + JdkSslContext jdkSslContext = new JdkSslContext( |
| 247 | + client.getSslContext(), |
| 248 | + true, |
| 249 | + (Iterable) null, |
| 250 | + IdentityCipherSuiteFilter.INSTANCE, |
| 251 | + (ApplicationProtocolConfig) null, |
| 252 | + ClientAuth.NONE, |
| 253 | + (String[]) null, /* enable default protocols */ |
| 254 | + false /* true if the first write request shouldn't be encrypted */ |
| 255 | + ); |
245 | 256 | int port = requestUri.getPort(); |
246 | 257 | SslHandler sslHandler = jdkSslContext.newHandler(ch.alloc(), requestUri.getHost(), |
247 | 258 | port <= 0 ? 443 : port, executorService); |
|
0 commit comments