Skip to content

Commit

Permalink
Remove insecure trust manager from test (#3268)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Jun 12, 2021
1 parent bec9966 commit 80a7403
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import io.netty.handler.codec.http.HttpMethod
import io.netty.handler.codec.http.HttpVersion
import io.netty.handler.ssl.SslContext
import io.netty.handler.ssl.SslContextBuilder
import io.netty.handler.ssl.util.InsecureTrustManagerFactory
import io.opentelemetry.api.common.AttributeKey
import io.opentelemetry.instrumentation.test.AgentTestTrait
import io.opentelemetry.instrumentation.test.base.HttpClientTest
Expand Down Expand Up @@ -64,7 +63,7 @@ class Netty41ClientTest extends HttpClientTest<DefaultFullHttpRequest> implement
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline pipeline = socketChannel.pipeline()
if (https) {
SslContext sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build()
SslContext sslContext = SslContextBuilder.forClient().build()
pipeline.addLast(sslContext.newHandler(socketChannel.alloc()))
}
pipeline.addLast(new HttpClientCodec())
Expand Down

0 comments on commit 80a7403

Please sign in to comment.