Modifier and Type | Class and Description |
---|---|
private static class | P11KeyStore.
The underlying token may contain multiple certs belonging to the same "personality" (for example, a signing cert and encryption cert), all sharing the same CKA_LABEL. |
private static class | P11KeyStore.
callback handler for passing password to Provider.login method |
private static class | P11KeyStore.
getTokenObject return value. |
Modifier and Type | Field and Description |
---|---|
private static final String | |
private HashMap | |
private static final CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static final CK_ATTRIBUTE | |
private static boolean | |
private static final Debug | |
private static final long | |
private static final long[] | |
private static final long | |
private static final boolean | |
private Secmod. | |
private final Token | |
private final boolean | |
private boolean |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
private static CK_ATTRIBUTE[] | |
private void | |
private boolean | |
private boolean | |
private boolean | |
private boolean | |
private boolean | |
private void | |
public synchronized Enumeration | Returns: enumeration of the alias namesImplements abstract java. Lists all the alias names of this keystore. |
public synchronized 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 synchronized 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 synchronized 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 synchronized 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 synchronized 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 chainthe 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 synchronized KeyStore. | Returns: theKeyStore.Entry for the specified alias,
or null if there is no such entryget the alias, KeyStore.KeyStore.Entry for this aliasthis must be protParamnull Overrides java. Get a |
public synchronized Key | Returns: the requested key, or null if the given alias does not exist or does not identify a key-related entry.the alias name alias, char[] the password, which must be password)null Implements abstract java. Returns the key associated with the given alias. |
public synchronized boolean | Returns: true if the entry identified by the given alias contains a trusted certificate, 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
was created by a call to |
public synchronized boolean | Returns: true if the entry identified by the given alias is a key-related, 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
was created by a call to |
public synchronized void | engineLoad(InputStream
the input stream, which must be stream, char[] null the password used to unlock the keystore,
or password)null if the token supports a
CKF_PROTECTED_AUTHENTICATION_PATHImplements abstract java. Loads the keystore. |
public synchronized void | engineLoad(KeyStore.
the paramKeyStore.LoadStoreParameter Overrides java. Loads the keystore using the given
|
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 savethis must be protParamnull Overrides java. Save 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 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 synchronized int | Returns: the number of entries in this keystoreImplements abstract java. Retrieves the number of entries in this keystore. |
public synchronized void | engineStore(OutputStream
this must be stream, char[] null this must be password)null Implements abstract java. engineStore currently is a No-op. |
public synchronized void | engineStore(KeyStore.
this must be paramnull Overrides java. engineStore currently is a No-op. |
private static long[] | |
private String | |
private static String | |
private CK_ATTRIBUTE[] | getIdAttributes(PrivateKey privateKey, PublicKey publicKey, boolean id, boolean netscapeDb)
Compute the CKA_ID and/or CKA_NETSCAPE_DB attributes that should be used for this private key. |
private static String | |
private CK_ATTRIBUTE[] | |
private P11KeyStore. | getTokenObject(Session session, CK_ATTRIBUTE
either ATTR_CLASS_CERT, ATTR_CLASS_PKEY, or ATTR_CLASS_SKEY type, byte[] the CKA_ID if type is ATTR_CLASS_CERT or ATTR_CLASS_PKEY cka_id, String the CKA_LABEL if type is ATTR_CLASS_SKEY cka_label)find an object on the token |
private X509Certificate | |
private X509Certificate[] | |
private PrivateKey | |
private SecretKey | |
private void | |
private boolean | Returns: true if multiple certs found sharing the same CKA_LABELfor each cert not matched with a private key but is CKA_TRUSTED: if CKA_LABEL unique, map cert to CKA_LABEL. |
private boolean | Returns: true if multiple certs found sharing the same CKA_LABEL (if so, write capabilities are disabled)Create a mapping of all key pairs, trusted certs, and secret keys on the token into logical KeyStore entries unambiguously accessible via an alias. |
private ArrayList | Returns: a list of AliasInfo entries that represents all matchesfor each private key CKA_ID, find corresponding cert with same CKA_ID. |
private void | mapSecretKeys(HashMap<String, P11KeyStore.
If the secret key shares a CKA_LABEL with another entry, throw an exception |
private boolean | mapTrustedCert(String certLabel, P11KeyStore.
|
private void | |
private void | |
private void | |
private void | |
private void | |
private void | |
private void | updatePkey(String alias, byte[] cka_id, X509Certificate[] chain, boolean
if true, then caller is updating alias info for
existing cert (only update CKA_ID/CKA_LABEL).
if false, then caller is updating cert chain
(delete old end cert and add new chain). replaceCert)XXX On ibutton, when you C_SetAttribute(CKA_ID) for a private key it not only changes the CKA_ID of the private key, it changes the CKA_ID of the corresponding cert too. |