Note
In a PKCS12 keystore, entries are identified by the alias, and a localKeyId is required to match the private key with the certificate. Trusted certificate entries are identified by the presence of an trustedKeyUsage attribute.
java.security.KeyStoreSpi
Modifier and Type | Class and Description |
---|---|
private static class | |
public static class | |
private static class | |
private static class | |
private static class | |
private static interface | |
private static class |
Modifier and Type | Field and Description |
---|---|
private final List | |
private static final ObjectIdentifier[] | |
private static final ObjectIdentifier | |
private final ArrayList | |
private int | |
private int | |
private String | |
private static final KnownOIDs[] | |
private int | |
private static final Debug | |
private static final String | |
private static final int | |
private static final String | |
private static final int | |
private static final String | |
private static final int | |
private final Map | entries
Private keys and certificates are stored in a map. |
private final ArrayList | |
private static final String | |
private static final String | |
private static final String | |
private static final int | |
private static final int | |
private String | |
private int | |
private static final int | |
private static final ObjectIdentifier | |
private static final long[][] | |
private static final long[][] | |
private static final ObjectIdentifier | |
private static final ObjectIdentifier | |
private static final ObjectIdentifier | |
private static final ObjectIdentifier | |
private int | |
private SecureRandom | |
private static final int | |
private static final ObjectIdentifier | |
private int | |
private static final ObjectIdentifier | |
private static final String | |
public static final int |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private byte[] | |
private static void | |
private byte[] | |
private static int | |
private static String | |
private static int | |
private static String | |
private static String | |
private static int | |
private void | |
private byte[] | |
private byte[] | |
public Enumeration | Returns: enumeration of the alias namesImplements abstract java. Lists all the alias names of this keystore. |
public boolean | Returns: true if the alias exists, false otherwisethe alias name alias)Implements abstract java. Checks if the given alias exists in this keystore. |
public synchronized void | engineDeleteEntry(String
the alias name alias)Implements abstract java. Deletes the entry identified by the given alias from this keystore. |
public boolean | Returns: true if the keystoreEntry for the specified
alias is an instance or subclass of the
specified entryClass , false otherwisethe alias name alias, Class<? extends KeyStore.the entry class entryClass)Overrides java. Determines if the keystore |
public Set | engineGetAttributes(String
the alias name alias)Overrides java. Retrieves the attributes associated with the given alias. |
public Certificate | Returns: the certificate, or null if the given alias does not exist or does not contain a certificate.the alias name alias)Implements abstract java. Returns the certificate associated with the given alias. |
public String | Returns: the (alias) name of the first entry with matching certificate, or null if no such entry exists in this keystore.the certificate to match with. cert)Implements abstract java. Returns the (alias) name of the first keystore entry whose certificate matches the given certificate. |
public Certificate[] | Returns: the certificate chain (ordered with the user's certificate first and the root certificate authority last), or null if the given alias does not exist or does not contain a certificate chain (i.e., the given alias identifies either a trusted certificate entry or a key entry without a certificate chain).the alias name alias)Implements abstract java. Returns the certificate chain associated with the given alias. |
public Date | Returns: the creation date of this entry, or null if the given alias does not existthe alias name alias)Implements abstract java. Returns the creation date of the entry identified by the given alias. |
public KeyStore. | Returns: theKeyStore.Entry for the specified alias,
or null if there is no such entryget the alias, KeyStore.KeyStore.Entry for this aliasthe protParamProtectionParameter
used to protect the Entry ,
which may be null Overrides java. Gets a |
public Key | Returns: the requested key, or null if the given alias does not exist or does not identify a key entry.the alias name alias, char[] the password for recovering the key password)Implements abstract java. Returns the key associated with the given alias, using the given password to recover it. |
public boolean | Returns: true if the entry identified by the given alias is a trusted certificate entry, false otherwise.the alias for the keystore entry to be checked alias)Implements abstract java. Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise. |
public boolean | Returns: true if the entry identified by the given alias is a key entry, false otherwise.the alias for the keystore entry to be checked alias)Implements abstract java. Returns true if the entry identified by the given alias is a key entry, and false otherwise. |
public synchronized void | engineLoad(InputStream
the input stream from which the keystore is loaded stream, char[] the (optional) password used to check the integrity of
the keystore. password)Implements abstract java. Loads the keystore from the given input stream. |
public boolean | engineProbe(InputStream
the keystore data to be probed stream)Overrides java. Probe the first few bytes of the keystore data stream for a valid PKCS12 keystore encoding. |
public synchronized void | engineSetCertificateEntry(String
the alias name alias, Certificate the certificate cert)Implements abstract java. Assigns the given certificate to the given alias. |
public synchronized void | engineSetEntry(String
save the alias, KeyStore.KeyStore.Entry under this aliasthe entry,Entry to savethe protParamProtectionParameter
used to protect the Entry ,
which may be null Overrides java. Saves a |
public synchronized void | engineSetKeyEntry(String
the alias name alias, Key the key to be associated with the alias key, char[] the password to protect the key password, Certificate[] the certificate chain for the corresponding public
key (only required if the given key is of type
chain)java.security.PrivateKey ).Implements abstract java. Assigns the given key to the given alias, protecting it with the given password. |
public synchronized void | engineSetKeyEntry(String
the alias name alias, byte[] the key (in protected format) to be associated with the alias key, Certificate[] the certificate chain for the corresponding public
key (only useful if the protected key is of type
chain)java.security.PrivateKey ).Implements abstract java. Assigns the given key (that has already been protected) to the given alias. |
public int | Returns: the number of entries in this keystoreImplements abstract java. Retrieves the number of entries in this keystore. |
public synchronized void | engineStore(OutputStream
the output stream to which this keystore is written. stream, char[] the password to generate the keystore integrity check password)Implements abstract java. Stores this keystore to the given output stream, and protects its integrity with the given password. |
private X509Certificate | Returns: the isssuer, or null if none matchesthe input certificate input)Find the issuer of input in allCerts. |
private X509Certificate | Returns: a certificate, null if not foundthe KeyEntry to match entryLocates a matched CertEntry from certEntries, and returns its cert. |
private byte[] | |
private byte[] | getBagAttributes(String alias, byte[] keyId, ObjectIdentifier[] trustedUsage, Set<KeyStore.
|
private byte[] | |
private AlgorithmParameters | |
private SecretKey | |
private byte[] | |
private String | |
private Certificate[] | |
private Key | |
private boolean | |
private boolean | |
public static boolean | Returns: if it's password-lessthe pkcs12 file f)Returns if a pkcs12 file is password-less. |
private void | |
private static ObjectIdentifier | |
private void | |
private void | |
private void | setKeyEntry(String alias, Key key, KeyStore.
|
private static int | |
private static boolean | |
private boolean |