scp.createSSLContext();
}
@Test
public void testKeyStoreParametersResourceLoading() throws Exception {
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setPassword("changeit");
ksp.setResource("org/apache/camel/itest/osgi/util/jsse/localhost.ks");
KeyStore ks = ksp.createKeyStore();
assertNotNull(ks.getCertificate("server"));
URL resourceUrl = this.getClass().getResource("/org/apache/camel/itest/osgi/util/jsse/localhost.ks");
ksp.setResource(resourceUrl.toExternalForm());
ks = ksp.createKeyStore();
assertNotNull(ks.getCertificate("server"));
File file = new File("../../../test-classes/org/apache/camel/itest/osgi/util/jsse/localhost.ks");
System.out.println("the file is " + file.getAbsolutePath());
ksp.setResource(file.getAbsolutePath());
ks = ksp.createKeyStore();
assertNotNull(ks.getCertificate("server"));
}