|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
java.security.Provider
org.dvb.security.AuthProvider
org.dvb.security.pkcs11.DVBPKCS11Provider
public abstract class DVBPKCS11Provider
This class implements a PKCS11 security provider. It can be used in the following security related packages:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.security.Provider |
---|
java.security.Provider.Service |
Method Summary | |
---|---|
abstract int |
getSlotId()
This method returns the PKCS11 slot identifier currently associated with this provider. |
SlotInfo[] |
getSlotList(boolean tokenPresent)
This method is used to get the list of PKCS11 Slot available for this provider. |
abstract TokenInfo |
getTokenInfo(int slotId)
This method is used to retreive information about a PKCS11 token in a given slot. |
abstract void |
login(java.security.Principal identity,
CallbackHandler handler)
This method is used to explicitly log into a PKCS11 token. |
abstract void |
logout()
This method is called to explicitly log out from a PKCS11 token. |
abstract void |
setCallbackHandler(CallbackHandler handler)
This method is used to set a default callback handler for the provider. |
abstract void |
setSlotId(int slotId)
This method can be used to change the slot identifier used by the provider. |
Methods inherited from class java.security.Provider |
---|
clear, entrySet, getInfo, getName, getService, getServices, getVersion, keySet, load, put, putAll, remove, toString, values |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
Methods inherited from class java.util.Hashtable |
---|
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, keys, size |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public abstract int getSlotId()
public abstract void setSlotId(int slotId) throws java.io.IOException, java.lang.IllegalArgumentException
slotId
- a slot identifier.
java.io.IOException
- this exception is thrown if this method is called when the provider is
logged into the token.
java.lang.IllegalArgumentException
- if the slot does not existpublic SlotInfo[] getSlotList(boolean tokenPresent)
tokenPresent
- boolean indicating if the returned list includes only the slots with a
token present or all slots.
public abstract TokenInfo getTokenInfo(int slotId) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the slot does not exist or there is no token in the slotpublic abstract void login(java.security.Principal identity, CallbackHandler handler) throws LoginException, java.lang.NullPointerException
login
in class AuthProvider
identity
- This parameter is not used. It is kept to be compatible with the J2SE 5.0handler
- This parameter is used to get the pin code needed to login. The callbackHandler
will get a PasswordCallback in which it should put the pin code.
This parameter may be null in which case the handler that was previously
set by setCallbackHandler is used.
LoginException
- This exception is under the conditions when C_Login would return an error return an error.
java.lang.NullPointerException
- if the CallbackHandler parameter is null and either no
previous call to setCallbackHandler has occurred or the last call to that method set the handler to null.public abstract void logout() throws LoginException
logout
in class AuthProvider
LoginException
- This exception is thrown under the conditions when C_Logout would return an error.public abstract void setCallbackHandler(CallbackHandler handler)
setCallbackHandler
in class AuthProvider
handler
- a Callback handler that will be used to get the pin code when
the login method is called with a null handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |