|
IAIK PKCS#11 Wrapper version 1.2.16 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectiaik.pkcs.pkcs11.objects.Object
iaik.pkcs.pkcs11.objects.Storage
iaik.pkcs.pkcs11.objects.Certificate
An object of this class represents a certificate as defined by PKCS#11. A certificate is of a specific type: X_509_PUBLIC_KEY, X_509_ATTRIBUTE or VENDOR_DEFINED. If an application needs to use vendor-defined certificates, it must set a VendorDefinedCertificateBuilder using the setVendorDefinedCertificateBuilder method.
| Nested Class Summary | |
static interface |
Certificate.CertificateType
This interface defines the available certificate types as defined by PKCS#11: X_509_PUBLIC_KEY, X_509_ATTRIBUTE or VENDOR_DEFINED. |
static interface |
Certificate.VendorDefinedCertificateBuilder
If an application uses vendor defined certificates, it must implement this interface and install such an object handler using setVendorDefinedCertificateBuilder. |
| Nested classes inherited from class iaik.pkcs.pkcs11.objects.Object |
Object.ObjectClass, Object.VendorDefinedObjectBuilder |
| Field Summary | |
protected CertificateTypeAttribute |
certificateType_
The type of this certificate. |
protected BooleanAttribute |
trusted_
Indicates, if this certificate can be trusted. |
protected static Certificate.VendorDefinedCertificateBuilder |
vendorCertificateBuilder_
The currently set vendor defined certificate builder, or null. |
| Fields inherited from class iaik.pkcs.pkcs11.objects.Storage |
label_, modifiable_, private_, token_ |
| Fields inherited from class iaik.pkcs.pkcs11.objects.Object |
attributeTable_, objectClass_, objectClassNames_, objectHandle_, vendorObjectBuilder_ |
| Constructor Summary | |
|
Certificate()
The default constructor. |
protected |
Certificate(Session session,
long objectHandle)
Constructor taking the reference to the PKCS#11 module for accessing the object's attributes, the session handle to use for reading the attribute values and the object handle. |
| Method Summary | |
protected void |
allocateAttributes()
Allocates the attribute objects for this class and adds them to the attribute table. |
Object |
clone()
Create a (deep) clone of this object. |
boolean |
equals(Object otherObject)
Compares all member variables of this object with the other object. |
LongAttribute |
getCertificateType()
Gets the certificate type attribute of the PKCS#11 certificate. |
static String |
getCertificateTypeName(Long certificateType)
Get the given certificate type as string. |
static Object |
getInstance(Session session,
long objectHandle)
The getInstance method of the Object class uses this method to create an instance of a PKCS#11 certificate. |
BooleanAttribute |
getTrusted()
Gets the trusted attribute of the PKCS#11 certificate. |
protected static Object |
getUnknownCertificate(Session session,
long objectHandle)
Try to create a certificate which has no or an unkown certificate type attribute. |
static Certificate.VendorDefinedCertificateBuilder |
getVendorDefinedCertificateBuilder()
Get the currently set vendor-defined certificate builder. |
int |
hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable. |
protected static void |
putAttributesInTable(Certificate object)
Put all attributes of the given object into the attributes table of this object. |
void |
readAttributes(Session session)
Read the values of the attributes of this object from the token. |
static void |
setVendorDefinedCertificateBuilder(Certificate.VendorDefinedCertificateBuilder builder)
Set a vendor-defined certificate builder that should be called to create an instance of an vendor-defined PKCS#11 certificate; i.e. an instance of a vendor defined sub-class of this class. |
String |
toString()
This method returns a string representation of the current object. |
| Methods inherited from class iaik.pkcs.pkcs11.objects.Storage |
getLabel, getModifiable, getPrivate, getToken, putAttributesInTable |
| Methods inherited from class iaik.pkcs.pkcs11.objects.Object |
getAttributeTable, getAttributeValue, getObjectClass, getObjectClassName, getObjectHandle, getSetAttributes, getSetAttributes, getUnknownObject, getVendorDefinedObjectBuilder, putAttributesInTable, setObjectHandle, setVendorDefinedObjectBuilder |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static Certificate.VendorDefinedCertificateBuilder vendorCertificateBuilder_
protected CertificateTypeAttribute certificateType_
protected BooleanAttribute trusted_
| Constructor Detail |
public Certificate()
protected Certificate(Session session,
long objectHandle)
throws TokenException
session - The session to use for reading attributes.
This session must have the appropriate rights; i.e.
it must be a user-session, if it is a private object.objectHandle - The object handle as given from the PKCS#111 module.
TokenException - If getting the attributes failed.| Method Detail |
public static String getCertificateTypeName(Long certificateType)
certificateType - The certificate type to get as string.
public static Object getInstance(Session session,
long objectHandle)
throws TokenException
session - The session to use for reading attributes.
This session must have the appropriate rights; i.e.
it must be a user-session, if it is a private object.objectHandle - The object handle as given from the PKCS#111 module.
TokenException - If getting the attributes failed.
protected static Object getUnknownCertificate(Session session,
long objectHandle)
throws TokenException
Certificate .
session - The session to use.objectHandle - The handle of the object
TokenException - If no object could be created.public static void setVendorDefinedCertificateBuilder(Certificate.VendorDefinedCertificateBuilder builder)
builder - The vendor-defined certificate builder. Null to clear any
previously installed vendor-defined builder.public static Certificate.VendorDefinedCertificateBuilder getVendorDefinedCertificateBuilder()
protected static void putAttributesInTable(Certificate object)
object - The object to handle.protected void allocateAttributes()
allocateAttributes in class Storagepublic Object clone()
clone in class Storagepublic boolean equals(Object otherObject)
equals in class StorageotherObject - The other object to compare to.
public LongAttribute getCertificateType()
public BooleanAttribute getTrusted()
public int hashCode()
hashCode in class Storage
public void readAttributes(Session session)
throws TokenException
readAttributes in class Storagesession - The session handle to use for reading attributes.
This session must have the appropriate rights; i.e.
it must be a user-session, if it is a private object.
TokenException - If getting the attributes failed.public String toString()
toString in class Storage
|
IAIK PKCS#11 Wrapper version 1.2.16 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||