Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
kannanjgithub committed Jan 7, 2025
1 parent f996474 commit 60b1ee0
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions okhttp/src/test/java/io/grpc/okhttp/TlsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ public X509Certificate[] getAcceptedIssuers() {
}
}

/** Used to capture the fact that checkServerTrusted has been called for the per-rpc authority verification. */
/** Used to capture the fact that checkServerTrusted has been called for the per-rpc authority
* verification. */
private static class FakeX509ExtendedTrustManager extends X509ExtendedTrustManager {
private final X509ExtendedTrustManager delegate;
private boolean checkServerTrustedCalled;
Expand All @@ -437,32 +438,34 @@ private FakeX509ExtendedTrustManager(X509ExtendedTrustManager delegate) {
}

@Override
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException {
}

@Override
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException {
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)
throws CertificateException {
delegate.checkServerTrusted(chain, authType, socket);
this.checkServerTrustedCalled = true;
}

@Override
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException {
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
throws CertificateException {
delegate.checkServerTrusted(chain, authType, engine);
}

@Override
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException {
delegate.checkServerTrusted(chain, authType, engine);
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
delegate.checkServerTrusted(chain, authType);
}

@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) {
}

@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {
}

@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
delegate.checkServerTrusted(chain, authType);
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) {
}

@Override
Expand Down

0 comments on commit 60b1ee0

Please sign in to comment.