GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use empty string instead of null for endpoint identification algorith… · grpc/grpc-java@097a46b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • xds/src
    • main/java/io/grpc/xds/internal/security/trust
      • XdsX509TrustManager.java
    • test/java/io/grpc/xds/internal/security/trust
      • XdsX509TrustManagerTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎xds/src/main/java/io/grpc/xds/internal/security/trust/XdsX509TrustManager.java‎

Copy file name to clipboardExpand all lines: xds/src/main/java/io/grpc/xds/internal/security/trust/XdsX509TrustManager.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void checkServerTrusted(X509Certificate[] chain, String authType, Socket
229229
SSLSocket sslSocket = (SSLSocket) socket;
230230
SSLParameters sslParams = sslSocket.getSSLParameters();
231231
if (sslParams != null) {
232-
sslParams.setEndpointIdentificationAlgorithm(null);
232+
sslParams.setEndpointIdentificationAlgorithm("");
233233
sslSocket.setSSLParameters(sslParams);
234234
}
235235
}
@@ -242,7 +242,7 @@ public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngi
242242
throws CertificateException {
243243
SSLParameters sslParams = sslEngine.getSSLParameters();
244244
if (sslParams != null) {
245-
sslParams.setEndpointIdentificationAlgorithm(null);
245+
sslParams.setEndpointIdentificationAlgorithm("");
246246
sslEngine.setSSLParameters(sslParams);
247247
}
248248
delegate.checkServerTrusted(chain, authType, sslEngine);
Collapse file

‎xds/src/test/java/io/grpc/xds/internal/security/trust/XdsX509TrustManagerTest.java‎

Copy file name to clipboardExpand all lines: xds/src/test/java/io/grpc/xds/internal/security/trust/XdsX509TrustManagerTest.java
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ public void checkServerTrustedSslEngine()
534534
CertificateUtils.toX509Certificates(TlsTesting.loadCert(SERVER_1_PEM_FILE));
535535
trustManager.checkServerTrusted(serverCerts, "ECDHE_ECDSA", sslEngine);
536536
verify(sslEngine, times(1)).getHandshakeSession();
537+
assertThat(sslEngine.getSSLParameters().getEndpointIdentificationAlgorithm()).isEmpty();
537538
}
538539

539540
@Test
@@ -561,6 +562,7 @@ public void checkServerTrustedSslSocket()
561562
trustManager.checkServerTrusted(serverCerts, "ECDHE_ECDSA", sslSocket);
562563
verify(sslSocket, times(1)).isConnected();
563564
verify(sslSocket, times(1)).getHandshakeSession();
565+
assertThat(sslSocket.getSSLParameters().getEndpointIdentificationAlgorithm()).isEmpty();
564566
}
565567

566568
@Test

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.