org.mozilla.jss.pkcs11

Class PK11Cert

Implemented Interfaces:
X509Certificate
Known Direct Subclasses:
PK11InternalCert, PK11TokenCert

public class PK11Cert
extends java.lang.Object
implements X509Certificate

Nested Class Summary

protected static class
PK11Cert.StringPrincipal
A class that implements Principal with a String.

Field Summary

protected org.mozilla.jss.pkcs11.CertProxy
certProxy

Method Summary

byte[]
getEncoded()
Principal
getIssuerDN()
protected String
getIssuerDNString()
String
getNickname()
protected CryptoToken
getOwningToken()
java.security.PublicKey
getPublicKey()
BigInteger
getSerialNumber()
protected byte[]
getSerialNumberByteArray()
Principal
getSubjectDN()
protected String
getSubjectDNString()
protected int
getTrust(int type)
Gets the trust flags for this cert.
protected byte[]
getUniqueID()
int
getVersion()
protected void
setTrust(int type, int trust)
Sets the trust flags for this cert.

Field Details

certProxy

protected org.mozilla.jss.pkcs11.CertProxy certProxy

Method Details

getEncoded

public byte[] getEncoded()
            throws CertificateEncodingException
Specified by:
getEncoded in interface X509Certificate

getIssuerDN

public Principal getIssuerDN()
Specified by:
getIssuerDN in interface X509Certificate

getIssuerDNString

protected String getIssuerDNString()

getNickname

public String getNickname()
Specified by:
getNickname in interface X509Certificate

getOwningToken

protected CryptoToken getOwningToken()

getPublicKey

public java.security.PublicKey getPublicKey()
Specified by:
getPublicKey in interface X509Certificate

getSerialNumber

public BigInteger getSerialNumber()
Specified by:
getSerialNumber in interface X509Certificate

getSerialNumberByteArray

protected byte[] getSerialNumberByteArray()

getSubjectDN

public Principal getSubjectDN()
Specified by:
getSubjectDN in interface X509Certificate

getSubjectDNString

protected String getSubjectDNString()

getTrust

protected int getTrust(int type)
Gets the trust flags for this cert.
Parameters:
type - SSL, EMAIL, or OBJECT_SIGNING.
Returns:
The trust flags for this type of trust.

getUniqueID

protected byte[] getUniqueID()

getVersion

public int getVersion()
Specified by:
getVersion in interface X509Certificate

setTrust

protected void setTrust(int type,
                        int trust)
Sets the trust flags for this cert.
Parameters:
type - SSL, EMAIL, or OBJECT_SIGNING.
trust - The trust flags for this type of trust.