@Test public void testCrlInvalidPath() throws Exception { HttpClientOptions clientOptions = new HttpClientOptions(); clientOptions.setTrustOptions(Trust.SERVER_PEM_ROOT_CA.get()); clientOptions.setSsl(true); clientOptions.addCrlPath("/invalid.pem"); try { vertx.createHttpClient(clientOptions); fail("Was expecting a failure"); } catch (VertxException e) { assertNotNull(e.getCause()); assertEquals(NoSuchFileException.class, e.getCause().getCause().getClass()); } }
options.setTrustAll(clientTrustAll); if (clientUsesCrl) { options.addCrlPath("tls/root-ca/crl.pem");
options.addCrlPath("tls/root-ca/crl.pem");
options.setConnectTimeout(connectTimeout); options.setTrustAll(trustAll); options.addCrlPath(crlPath); options.addCrlValue(crlValue); options.setVerifyHost(verifyHost);
@Override public RestClientOptions addCrlPath(String crlPath) throws NullPointerException { super.addCrlPath(crlPath); return this; }
@Test public void testCrlInvalidPath() throws Exception { HttpClientOptions clientOptions = new HttpClientOptions(); clientOptions.setTrustOptions(Trust.SERVER_PEM_ROOT_CA.get()); clientOptions.setSsl(true); clientOptions.addCrlPath("/invalid.pem"); try { vertx.createHttpClient(clientOptions); fail("Was expecting a failure"); } catch (VertxException e) { assertNotNull(e.getCause()); assertEquals(NoSuchFileException.class, e.getCause().getCause().getClass()); } }
options.setTrustAll(clientTrustAll); if (clientUsesCrl) { options.addCrlPath("tls/root-ca/crl.pem");
options.setConnectTimeout(connectTimeout); options.setTrustAll(trustAll); options.addCrlPath(crlPath); options.addCrlValue(crlValue); options.setVerifyHost(verifyHost);
options.addCrlPath("tls/root-ca/crl.pem");