Class Overview
This class provide API's extended from KeyStoreSpi.
If vendor want to support KeyStore as JCE, plugin application should implement this Spi and add as Service Provider.
Summary
Public Methods |
String
|
engineGetCertificateAlias(Certificate cert)
Standard KeyStore API.
|
Date
|
engineGetCreationDate(String alias)
Standard KeyStore API.
|
abstract
void
|
engineLoad(KeyStore.LoadStoreParameter param)
Standard KeyStore API.
|
abstract
void
|
engineLoad(InputStream stream, char[] password)
Standard KeyStore API.
|
void
|
engineSetCertificateEntry(String alias, Certificate cert)
Standard KeyStore API.
|
abstract
void
|
engineSetEntry(String alias, KeyStore.Entry entry, KeyStore.ProtectionParameter protParam)
Standard KeyStore API.
|
void
|
engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
Standard KeyStore API.
|
void
|
engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
Standard KeyStore API.
|
void
|
engineStore(OutputStream stream, char[] password)
Standard KeyStore API.
|
Bundle
|
getProperty()
API to get the properties set by UCM framework during SPI call.
|
void
|
setErrorCode(int error)
API to set the error code(if any) which will be forwarded to calling application via UCM framework.
|
[Expand]
Inherited Methods |
From class
java.security.KeyStoreSpi
abstract
Enumeration<String>
|
engineAliases()
|
abstract
boolean
|
engineContainsAlias(String arg0)
|
abstract
void
|
engineDeleteEntry(String arg0)
|
boolean
|
engineEntryInstanceOf(String arg0, Class<? extends KeyStore.Entry> arg1)
|
abstract
Certificate
|
engineGetCertificate(String arg0)
|
abstract
String
|
engineGetCertificateAlias(Certificate arg0)
|
abstract
Certificate[]
|
engineGetCertificateChain(String arg0)
|
abstract
Date
|
engineGetCreationDate(String arg0)
|
KeyStore.Entry
|
engineGetEntry(String arg0, KeyStore.ProtectionParameter arg1)
|
abstract
Key
|
engineGetKey(String arg0, char[] arg1)
|
abstract
boolean
|
engineIsCertificateEntry(String arg0)
|
abstract
boolean
|
engineIsKeyEntry(String arg0)
|
void
|
engineLoad(KeyStore.LoadStoreParameter arg0)
|
abstract
void
|
engineLoad(InputStream arg0, char[] arg1)
|
boolean
|
engineProbe(InputStream arg0)
|
abstract
void
|
engineSetCertificateEntry(String arg0, Certificate arg1)
|
void
|
engineSetEntry(String arg0, KeyStore.Entry arg1, KeyStore.ProtectionParameter arg2)
|
abstract
void
|
engineSetKeyEntry(String arg0, Key arg1, char[] arg2, Certificate[] arg3)
|
abstract
void
|
engineSetKeyEntry(String arg0, byte[] arg1, Certificate[] arg2)
|
abstract
int
|
engineSize()
|
void
|
engineStore(KeyStore.LoadStoreParameter arg0)
|
abstract
void
|
engineStore(OutputStream arg0, char[] arg1)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
com.samsung.android.knox.ucm.plugin.agent.UcmAgentProviderImpl.UcmAgentSpiProperty
abstract
Bundle
|
getProperty()
API to get the properties set by UCM framework during SPI call.
|
abstract
void
|
setErrorCode(int error)
API to set the error code(if any) which will be forwarded to calling application via UCM framework.
|
|
Public Constructors
public
UcmAgentKeyStoreSpi
()
Public Methods
public
abstract
void
engineLoad
(InputStream stream, char[] password)
public
void
engineStore
(OutputStream stream, char[] password)
public
Bundle
getProperty
()
API to get the properties set by UCM framework during SPI call.
Returns
- Bundle calling application information
Usage
To perform crypto operation properly, plugin application should know caller information.
Plugin application can use this API to get caller user Id, resource Id, caller application Uid and owner Id
public class SimpleKeyStoreSpi extends UcmAgentProviderImpl.UcmAgentKeyStoreSpi {
public SimpleKeyStoreSpi(Context ctx) {
Bundle bundle = getProperty();
int userId = bundle.getInt(UcmAgentSpiProperty.KEY_USER_ID, -1));
int resourceId = bundle.getInt(UcmAgentSpiProperty.KEY_RESOURCE_ID , -1));
int callerId = bundle.getInt(UcmAgentSpiProperty.KEY_CALLER_UID , -1));
}
}
|
public
void
setErrorCode
(int error)
API to set the error code(if any) which will be forwarded to calling application via UCM framework.
public class SimpleUcmAgentKeyStoreSpi extends UcmAgentProviderImpl.UcmAgentKeyStoreSpi {
public void engineGetCertificateChain(String alias) {
...
setErrorCode(UcmAgentService.ERROR_ALIAS_NOT_FOUND);
...
}
}