I want to create embedded https server that required the clients to present a certificate and I am using this: http://www.smartjava.org/content/embedded-jetty-client-certificates
Now my question is that how can I provide keystore and truststore file for my code given that my jetty is emedded. I mean these lines in the code:
// the keystore (with one key) we'll use to make the connection with the
// broker
private final static String KEYSTORE_LOCATION = "src/main/resources/client_keystore.jks";
private final static String KEYSTORE_PASS = "secret";
// the truststore we use for our server. This keystore should contain all the keys
// that are allowed to make a connection to the server
private final static String TRUSTSTORE_LOCATION = "src/main/resources/truststore.jks";
private final static String TRUSTSTORE_PASS = "secret";
Thanks
There are numerous examples of Jetty embedded use on github.com/eclipse/jetty.project
Example: LikeJettyXml.java - Jetty 8, with no XML used, setting up an SSL connector.