org.eparapher.core.crypto.keystore
Class GenericKeystore
java.lang.Object
org.eparapher.core.crypto.keystore.GenericKeystore
- All Implemented Interfaces:
- IGenericStore, IUserKeystore
- Direct Known Subclasses:
- FileKeystore, HardwareKeyStore, MSCAPIKeystore
public abstract class GenericKeystore
- extends Object
- implements IUserKeystore
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentPrivateKey
protected PrivateKey currentPrivateKey
currentPublicKey
protected PublicKey currentPublicKey
currentX509Certificate
protected X509Certificate currentX509Certificate
currentX509CertificateChain
protected X509Certificate[] currentX509CertificateChain
currentalias
protected String currentalias
currentaliasselected
protected boolean currentaliasselected
ks
protected KeyStore ks
loadedKeystore
protected boolean loadedKeystore
GenericKeystore
protected GenericKeystore()
isKeystoreLoaded
public boolean isKeystoreLoaded()
getKeystoreEntries
public KeystoreEntry[] getKeystoreEntries()
- Specified by:
getKeystoreEntries in interface IUserKeystore
getTrustedCertificates
public KeystoreEntry[] getTrustedCertificates()
loadPublicInformation
public boolean loadPublicInformation()
- Load Public key and certificate on the selected/default alias
- Specified by:
loadPublicInformation in interface IGenericStore
- Returns:
- true if public key and X509 certificate(s) loaded
loadPrivateKey
public boolean loadPrivateKey(String secret)
- Specified by:
loadPrivateKey in interface IGenericStore
- Parameters:
ALIAS - PINorPWD -
- Returns:
selectAlias
protected boolean selectAlias()
autoSelectAlias
protected boolean autoSelectAlias()
setDefaultAlias
public boolean setDefaultAlias(String alias)
- Specified by:
setDefaultAlias in interface IUserKeystore
getDefaultAlias
public String getDefaultAlias()
- Specified by:
getDefaultAlias in interface IUserKeystore
containsAlias
public boolean containsAlias(String alias)
- Return true if alias already define in the keystore
- Specified by:
containsAlias in interface IGenericStore
getPrivateKey
public PrivateKey getPrivateKey()
- Specified by:
getPrivateKey in interface IUserKeystore
getPublicKey
public PublicKey getPublicKey()
- Specified by:
getPublicKey in interface IUserKeystore
getX509Certificate
public X509Certificate getX509Certificate()
- Specified by:
getX509Certificate in interface IUserKeystore
getX509CertificateChain
public X509Certificate[] getX509CertificateChain()
- Specified by:
getX509CertificateChain in interface IUserKeystore
getProviderName
public String getProviderName()
- Specified by:
getProviderName in interface IGenericStore
getKeystore
public KeyStore getKeystore()
- Specified by:
getKeystore in interface IGenericStore
newcertificate
public boolean newcertificate()
- Specified by:
newcertificate in interface IGenericStore
getTrustAnchors
public Set<TrustAnchor> getTrustAnchors()
- Specified by:
getTrustAnchors in interface IGenericStore
Copyright © 2009 eParapher Software Foundation. All Rights Reserved.