public class KeyStore
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KeyStore.STORAGE
Defines certificate storage for which the KeyStore instance
is being created
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(KeyStoreEntry entry)
Adds a KeyStoreEntry instance to the storage
|
void |
delEntry(java.lang.String dn)
Removes a KeyStoreEntry with specified DN from the storage
|
KeyStoreEntry |
findAllEntry(java.lang.String dn)
Finds a KeyStoreEntry in the storage with desired subject DN.
|
KeyStoreEntry |
findEntry(java.lang.String dn)
Finds a KeyStoreEntry in the storage with desired subject DN.
|
java.util.List<KeyStoreEntry> |
getAllEntries()
Gets a list of all KeyStoreEntry from the storage.
|
java.util.List<KeyStoreEntry> |
getEntries()
Gets a list of KeyStoreEntry from the storage.
|
static KeyStore |
getInstance(KeyStore.STORAGE storage)
Return a KeyStore instance for current client or common used certificates
|
public static KeyStore getInstance(KeyStore.STORAGE storage) throws java.lang.SecurityException, KeyStoreException
storage
- defines which KeyStore is required.
The COMMON value means common used certificates,
CLIENT - certificates belonged to the current client onlyKeyStoreException
- if the KeyStore instance can not be createdjava.lang.SecurityException
- if there is not the KeyStorePermission permissionpublic void addEntry(KeyStoreEntry entry) throws KeyStoreException
entry
- KeyStoreEntry instance to be storedKeyStoreException
- if the KeyStoreEntry can not be addedpublic KeyStoreEntry findEntry(java.lang.String dn) throws KeyStoreException
dn
- - distinguish name of certificate in form
"field0=value0,field1=value1,...,fieldN=valueN"
or
"field0=value0;field1=value1;...;fieldN=valueN"KeyStoreException
- in case of bad parameter (null)public KeyStoreEntry findAllEntry(java.lang.String dn) throws KeyStoreException
dn
- - distinguish name of certificate in form
"field0=value0,field1=value1,...,fieldN=valueN"
or
"field0=value0;field1=value1;...;fieldN=valueN"KeyStoreException
- in case of bad parameter (null)public java.util.List<KeyStoreEntry> getEntries()
public java.util.List<KeyStoreEntry> getAllEntries()
public void delEntry(java.lang.String dn) throws KeyStoreException
dn
- - distinguish name of certificate in form
"field0=value0,field1=value1,...,fieldN=valueN"
or
"field0=value0;field1=value1;...;fieldN=valueN"KeyStoreException
- if the KeyStoreEntry can not be deletedCopyright (c) 2014, Oracle and/or its affiliates. All rights reserved.