use of io.grpc.util.AdvancedTlsX509TrustManager in project grpc-java by grpc.
the class AdvancedTlsTest method trustManagerEmptyChainTest.
@Test
public void trustManagerEmptyChainTest() throws Exception {
exceptionRule.expect(IllegalArgumentException.class);
exceptionRule.expectMessage("Want certificate verification but got null or empty certificates");
AdvancedTlsX509TrustManager tm = AdvancedTlsX509TrustManager.newBuilder().setVerification(Verification.CERTIFICATE_ONLY_VERIFICATION).build();
tm.updateTrustCredentials(caCert);
tm.checkClientTrusted(null, "RSA", (SSLEngine) null);
}
Aggregations