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 @@ -155,12 +155,12 @@ private void updateSslContextWhenReady() {
155155 updateSslContext ();
156156 clearKeysAndCerts ();
157157 }
158- } else if (isClientSideTls ()) {
158+ } else if (isNormalTlsAndClientSide ()) {
159159 if (savedTrustedRoots != null || savedSpiffeTrustMap != null ) {
160160 updateSslContext ();
161161 clearKeysAndCerts ();
162162 }
163- } else if (isServerSideTls ()) {
163+ } else if (isNormalTlsAndServerSide ()) {
164164 if (savedKey != null ) {
165165 updateSslContext ();
166166 clearKeysAndCerts ();
@@ -179,11 +179,13 @@ protected final boolean isMtls() {
179179 return certInstance != null && (rootCertInstance != null || isUsingSystemRootCerts );
180180 }
181181
182- protected final boolean isClientSideTls () {
182+ protected final boolean isNormalTlsAndClientSide () {
183+ // We don't do (rootCertInstance != null || isUsingSystemRootCerts) here because of where this method is called
184+ // from. With the rootCertInstance being null when using system root certs, there is nothing to update.
183185 return rootCertInstance != null && certInstance == null ;
184186 }
185187
186- protected final boolean isServerSideTls () {
188+ protected final boolean isNormalTlsAndServerSide () {
187189 return certInstance != null && rootCertInstance == null ;
188190 }
189191
You can’t perform that action at this time.
0 commit comments