Skip to content

Commit 6958b4e

Browse files
committed
Merge fixes
1 parent 14a91e7 commit 6958b4e

File tree

5 files changed

+371
-536
lines changed

5 files changed

+371
-536
lines changed

s2a/src/main/java/io/grpc/s2a/internal/handshaker/S2AProtocolNegotiatorFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ public void onSuccess(SslContext sslContext) {
259259
public void run() {
260260
s2aStub.close();
261261
}
262-
}))
262+
}),
263+
null)
263264
.newHandler(grpcHandler);
264265

265266
// Delegate the rest of the handshake to the TLS handler. and remove the

xds/src/main/java/io/grpc/xds/internal/security/SslContextProviderSupplier.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public synchronized void updateSslContext(final SslContextProvider.Callback call
6868
}
6969

7070
// we want to increment the ref-count so call findOrCreate again...
71-
final SslContextProvider toRelease = getSslContextProvider();
71+
final SslContextProvider toRelease = getSslContextProvider(sni);
7272
// When using system root certs on client side, SslContext updates via CertificateProvider is
7373
// only required if Mtls is also enabled, i.e. tlsContext has a cert provider instance.
7474
if (tlsContext instanceof UpstreamTlsContext
@@ -77,7 +77,7 @@ public synchronized void updateSslContext(final SslContextProvider.Callback call
7777
callback.getExecutor().execute(() -> {
7878
try {
7979
callback.updateSslContext(GrpcSslContexts.forClient().build());
80-
releaseSslContextProvider(toRelease);
80+
releaseSslContextProvider(toRelease, sni);
8181
} catch (SSLException e) {
8282
callback.onException(e);
8383
}
@@ -89,13 +89,13 @@ public synchronized void updateSslContext(final SslContextProvider.Callback call
8989
@Override
9090
public void updateSslContext(SslContext sslContext) {
9191
callback.updateSslContext(sslContext);
92-
releaseSslContextProvider(toRelease);
92+
releaseSslContextProvider(toRelease, sni);
9393
}
9494

9595
@Override
9696
public void onException(Throwable throwable) {
9797
callback.onException(throwable);
98-
releaseSslContextProvider(toRelease);
98+
releaseSslContextProvider(toRelease, sni);
9999
}
100100
});
101101
}

0 commit comments

Comments
 (0)