Lines Matching defs:KeyStore

41  * <p> A <code>KeyStore</code> manages different types of entries.
42 * Each type of entry implements the <code>KeyStore.Entry</code> interface.
43 * Three basic <code>KeyStore.Entry</code> implementations are provided:
46 * <li><b>KeyStore.PrivateKeyEntry</b>
57 * <li><b>KeyStore.SecretKeyEntry</b>
62 * <li><b>KeyStore.TrustedCertificateEntry</b>
79 * to avoid problems, it is recommended not to use aliases in a KeyStore that
89 * <p> Typical ways to request a KeyStore object include
95 * KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
102 * KeyStore ks = KeyStore.getInstance("JKS");
111 * KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
134 * KeyStore.ProtectionParameter protParam =
135 * new KeyStore.PasswordProtection(password);
138 * KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry)
144 * KeyStore.SecretKeyEntry skEntry =
145 * new KeyStore.SecretKeyEntry(mySecretKey);
168 * the following standard <code>KeyStore</code> type:
173 * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
174 * KeyStore section</a> of the
188 public class KeyStore {
213 * A marker interface for <code>KeyStore</code>
214 * {@link #load(KeyStore.LoadStoreParameter) load}
216 * {@link #store(KeyStore.LoadStoreParameter) store}
347 * A marker interface for <code>KeyStore</code> entry types.
354 * A <code>KeyStore</code> entry that holds a <code>PrivateKey</code>
482 * A <code>KeyStore</code> entry that holds a <code>SecretKey</code>.
525 * A <code>KeyStore</code> entry that holds a trusted
569 * Creates a KeyStore object of the given type, and encapsulates the given
576 protected KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
588 * A new KeyStore object encapsulating the
596 * See the KeyStore section in the <a href=
597 * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
609 public static KeyStore getInstance(String type)
613 Object[] objs = Security.getImpl(type, "KeyStore", (String)null);
614 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
625 * <p> A new KeyStore object encapsulating the
634 * See the KeyStore section in the <a href=
635 * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
655 public static KeyStore getInstance(String type, String provider)
661 Object[] objs = Security.getImpl(type, "KeyStore", provider);
662 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
671 * <p> A new KeyStore object encapsulating the
677 * See the KeyStore section in the <a href=
678 * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
696 public static KeyStore getInstance(String type, Provider provider)
702 Object[] objs = Security.getImpl(type, "KeyStore", provider);
703 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type);
1179 * Loads this KeyStore from the given input stream.
1221 * <p> Note that if this KeyStore has already been loaded, it is
1276 * @see #setEntry(String, KeyStore.Entry, KeyStore.ProtectionParameter)
1313 * @see #getEntry(String, KeyStore.ProtectionParameter)
1351 Class<? extends KeyStore.Entry> entryClass)
1365 * A description of a to-be-instantiated KeyStore object.
1368 * instantiate and initialize a KeyStore object. That process is
1371 * <p>This makes it possible to decouple configuration from KeyStore
1375 * @see KeyStore
1392 * Returns the KeyStore described by this object.
1395 * operation, for example if the KeyStore could not be
1398 public abstract KeyStore getKeyStore() throws KeyStoreException;
1402 * the {@link KeyStore.Entry Entry} with the given alias.
1407 * the {@link KeyStore.Entry Entry} with the given alias.
1408 * @param alias the alias of the KeyStore entry
1419 * Returns a new Builder that encapsulates the given KeyStore.
1425 * <p> This is useful if an existing KeyStore object needs to be
1429 * @param keyStore the KeyStore to be encapsulated
1431 * protect the KeyStore entries
1437 public static Builder newInstance(final KeyStore keyStore,
1443 throw new IllegalArgumentException("KeyStore not initialized");
1448 public KeyStore getKeyStore() {
1471 * builder will create a KeyStore of type <code>type</code> and call
1472 * its {@link KeyStore#load load()} method.
1487 * <p>The KeyStore is instantiated from <code>provider</code> if
1491 * will return a {@link KeyStore.PasswordProtection PasswordProtection}
1500 * @param type the type of KeyStore to be constructed
1501 * @param provider the provider from which the KeyStore is to
1503 * @param file the File that contains the KeyStore data
1504 * @param protection the ProtectionParameter securing the KeyStore data
1539 private KeyStore keyStore;
1553 public synchronized KeyStore getKeyStore() throws KeyStoreException
1560 ("Previous KeyStore instantiation failed",
1563 PrivilegedExceptionAction<KeyStore> action =
1564 new PrivilegedExceptionAction<KeyStore>() {
1565 public KeyStore run() throws Exception {
1585 public KeyStore run0() throws Exception {
1586 KeyStore ks;
1588 ks = KeyStore.getInstance(type);
1590 ks = KeyStore.getInstance(type, provider);
1631 ("KeyStore instantiation failed", oldException);
1652 * builder will return a new KeyStore object of type <code>type</code>.
1653 * Its {@link KeyStore#load(KeyStore.LoadStoreParameter) load()}
1658 * <p>The KeyStore is instantiated from <code>provider</code> if
1669 * @param type the type of KeyStore to be constructed
1670 * @param provider the provider from which the KeyStore is to
1685 private final PrivilegedExceptionAction<KeyStore> action
1686 = new PrivilegedExceptionAction<KeyStore>() {
1688 public KeyStore run() throws Exception {
1689 KeyStore ks;
1691 ks = KeyStore.getInstance(type);
1693 ks = KeyStore.getInstance(type, provider);
1724 public synchronized KeyStore getKeyStore()
1728 ("Previous KeyStore instantiation failed",
1736 ("KeyStore instantiation failed", cause);