Skip to content

Commit

Permalink
HttpBlobStore add hostname and port to SSL Connection constructor
Browse files Browse the repository at this point in the history
this change adds host and port parameters to SSL connection contrcutor
with out which the blobstore download client cannot talk to endpoints
sharing SSL certificates.

Fixes bazelbuild#6551
  • Loading branch information
sevki committed Nov 15, 2018
1 parent 4206d96 commit 94d35ab
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ private HttpBlobStore(
} else {
sslCtx = null;
}

final int port = uri.getPort();
final String hostname = uri.getHost();
this.eventLoop = newEventLoopGroup.apply(2);
Bootstrap clientBootstrap =
new Bootstrap()
Expand All @@ -208,7 +209,7 @@ public void channelAcquired(Channel ch) {}
public void channelCreated(Channel ch) {
ChannelPipeline p = ch.pipeline();
if (sslCtx != null) {
SSLEngine engine = sslCtx.newEngine(ch.alloc());
SSLEngine engine = sslCtx.newEngine(ch.alloc(), hostname, port);
engine.setUseClientMode(true);
p.addFirst("ssl-handler", new SslHandler(engine));
}
Expand Down

0 comments on commit 94d35ab

Please sign in to comment.