Reputation: 2323
I've got a karaf integration test based on pax-exam and need to access a secure maven repository:
editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories", "https://my.repo.net:443/nexus/content/groups/my-group@snapshots@id=my.repo")
Unsecured works fine, however I've troubles getting the ssl authentication working:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
So I'd normally either provide a truststore with the key and/or pass it in using environment variables. The problem is, in this configuration the environment variables are not being passed to the container, so where could I hook the SSL certs into my karaf instance?
Upvotes: 0
Views: 267
Reputation: 2323
VMOption allows you to pass variables to the karaf container like this:
new VMOption("-Djavax.net.ssl.trustStore=my.truststore")
Upvotes: 0