File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
xds/src/main/java/io/grpc/xds/internal/security/certprovider Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,12 @@ private void updateSslContextWhenReady() {
158158 updateSslContext ();
159159 clearKeysAndCerts ();
160160 }
161- } else if (isClientSideTls ()) {
161+ } else if (isNormalTlsAndClientSide ()) {
162162 if (savedTrustedRoots != null || savedSpiffeTrustMap != null ) {
163163 updateSslContext ();
164164 clearKeysAndCerts ();
165165 }
166- } else if (isServerSideTls ()) {
166+ } else if (isNormalTlsAndServerSide ()) {
167167 if (savedKey != null ) {
168168 updateSslContext ();
169169 clearKeysAndCerts ();
@@ -182,11 +182,13 @@ protected final boolean isMtls() {
182182 return certInstance != null && (rootCertInstance != null || isUsingSystemRootCerts );
183183 }
184184
185- protected final boolean isClientSideTls () {
185+ protected final boolean isNormalTlsAndClientSide () {
186+ // We don't do (rootCertInstance != null || isUsingSystemRootCerts) here because of where this method is called
187+ // from. With the rootCertInstance being null when using system root certs, there is nothing to update.
186188 return rootCertInstance != null && certInstance == null ;
187189 }
188190
189- protected final boolean isServerSideTls () {
191+ protected final boolean isNormalTlsAndServerSide () {
190192 return certInstance != null && rootCertInstance == null ;
191193 }
192194
You can’t perform that action at this time.
0 commit comments