Home | History | Annotate | Download | only in ssl

Lines Matching refs:keystore

52 import java.security.KeyStore;
69 * a {@link KeyStore truststore} file containg one or several trusted
78 * keytool -import -alias "my server cert" -file server.crt -keystore my.truststore
84 * a {@link KeyStore keystore} file containg a private key/public certificate
93 * Use the following sequence of actions to generate a keystore file
99 * <pre>keytool -genkey -v -alias "my client key" -validity 365 -keystore my.keystore</pre>
100 * For simplicity use the same password for the key as that of the keystore
106 * <pre>keytool -certreq -alias "my client key" -file mycertreq.csr -keystore my.keystore</pre>
119 * <pre>keytool -import -alias "my trusted ca" -file caroot.crt -keystore my.keystore</pre>
125 * <pre>keytool -import -alias "my client key" -file mycert.p7 -keystore my.keystore</pre>
130 * Verify the content the resultant keystore file
131 * <pre>keytool -list -v -keystore my.keystore</pre>
185 final KeyStore keystore,
187 final KeyStore truststore,
197 if (keystore != null) {
198 keymanagers = createKeyManagers(keystore, keystorePassword);
211 final KeyStore keystore,
213 final KeyStore truststore)
216 this(TLS, keystore, keystorePassword, truststore, null, null);
219 public SSLSocketFactory(final KeyStore keystore, final String keystorePassword)
222 this(TLS, keystore, keystorePassword, null, null, null);
225 public SSLSocketFactory(final KeyStore truststore)
256 private static KeyManager[] createKeyManagers(final KeyStore keystore, final String password)
258 if (keystore == null) {
259 throw new IllegalArgumentException("Keystore may not be null");
263 kmfactory.init(keystore, password != null ? password.toCharArray(): null);
267 private static TrustManager[] createTrustManagers(final KeyStore keystore)
269 if (keystore == null) {
270 throw new IllegalArgumentException("Keystore may not be null");
274 tmfactory.init(keystore);