options.setKeyStoreOptions(getClientCertOptions(clientCert));
for (String suite: enabledCipherSuites) {
options.addEnabledCipherSuite(suite);
}
client = vertx.createHttpClient(options);
HttpServerOptions serverOptions = new HttpServerOptions();
serverOptions.setSsl(true);
serverOptions.setTrustStoreOptions(getServerTrustOptions(serverTrust));
serverOptions.setKeyStoreOptions(getServerCertOptions(serverCert));
if (requireClientAuth) {
serverOptions.setClientAuthRequired(true);
}
if (serverUsesCrl) {
serverOptions.addCrlPath(findFileOnClasspath("tls/ca/crl.pem"));
}
for (String suite: enabledCipherSuites) {
serverOptions.addEnabledCipherSuite(suite);
}
server = vertx.createHttpServer(serverOptions.setPort(4043));
server.requestHandler(req -> {
req.bodyHandler(buffer -> {
assertEquals("foo", buffer.toString());
req.response().end("bar");
});