()
| 250 | } |
| 251 | |
| 252 | @Test |
| 253 | public void testKeyPass() throws Exception { |
| 254 | TesterSupport.configureClientSsl(); |
| 255 | |
| 256 | Tomcat tomcat = getTomcatInstance(); |
| 257 | |
| 258 | File appDir = new File(getBuildDirectory(), "webapps/examples"); |
| 259 | Context ctxt = tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath()); |
| 260 | ctxt.addApplicationListener(WsContextListener.class.getName()); |
| 261 | |
| 262 | TesterSupport.initSsl(tomcat, TesterSupport.LOCALHOST_KEYPASS_JKS, false, |
| 263 | TesterSupport.JKS_PASS, null, TesterSupport.JKS_KEY_PASS, null); |
| 264 | |
| 265 | TesterSupport.configureSSLImplementation(tomcat, sslImplementationName, useOpenSSL); |
| 266 | |
| 267 | tomcat.start(); |
| 268 | ByteChunk res = getUrl("https://localhost:" + getPort() + |
| 269 | "/examples/servlets/servlet/HelloWorldExample"); |
| 270 | Assert.assertTrue(res.toString().indexOf("<a href=\"../helloworld.html\">") > 0); |
| 271 | Assert.assertTrue("Checking no client issuer has been requested", |
| 272 | TesterSupport.getLastClientAuthRequestedIssuerCount() == 0); |
| 273 | } |
| 274 | |
| 275 | @Test |
| 276 | public void testKeyPassFile() throws Exception { |
nothing calls this directly
no test coverage detected