|
JSS 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mozilla.jss.pkix.crmf.CertTemplate
This class models a CRMF CertTemplate structure.
Inner Class Summary | |
static class |
CertTemplate.Template
A class for decoding CertTemplates. |
Field Summary | |
private SEQUENCE |
extensions
|
private Name |
issuer
|
private BIT_STRING |
issuerUID
|
private java.util.Date |
notAfter
|
private java.util.Date |
notBefore
|
private SubjectPublicKeyInfo |
publicKey
|
private INTEGER |
serialNumber
|
private AlgorithmIdentifier |
signingAlg
|
private Name |
subject
|
private BIT_STRING |
subjectUID
|
static Tag |
TAG
|
private static CertTemplate.Template |
templateInstance
|
(package private) static int |
UTCTIME_CUTOFF_YEAR
|
private INTEGER |
version
|
Constructor Summary | |
(package private) |
CertTemplate()
|
Method Summary | |
private static TimeBase |
dateToASN1(java.util.Date d)
Converts a Date into a UTCTime or GeneralizedTime, depending on whether it falls before or after the cutoff date. |
void |
encode(java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag. |
void |
encode(Tag t,
java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag. |
Extension |
extensionAt(int idx)
Returns the ith extension. |
Name |
getIssuer()
Returns the issuer field of this CertTemplate. |
BIT_STRING |
getIssuerUID()
Returns the issuerUID field of this CertTemplate. |
java.util.Date |
getNotAfter()
Returns the notAfter field of this CertTemplate. |
java.util.Date |
getNotBefore()
Returns the notBefore field of this CertTemplate. |
SubjectPublicKeyInfo |
getPublicKey()
Returns the publicKey field of this CertTemplate. |
INTEGER |
getSerialNumber()
Returns the serialNumber field of this CertTemplate. |
AlgorithmIdentifier |
getSigningAlg()
Returns the signingAlg field of this CertTemplate. |
Name |
getSubject()
Sets the subject field of this CertTemplate. |
BIT_STRING |
getSubjectUID()
Returns the subjectUID field of this CertTemplate. |
Tag |
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. |
static CertTemplate.Template |
getTemplate()
|
INTEGER |
getVersion()
Returns the version field of this CertTemplate. |
boolean |
hasExtensions()
Returns true if the extensions field is present. |
boolean |
hasIssuer()
Returns true if the issuer field is present. |
boolean |
hasIssuerUID()
Returns true if the issuerUID field is present. |
boolean |
hasNotAfter()
Returns true if the notAfter field is present. |
boolean |
hasNotBefore()
Returns true if the notBefore field is present. |
boolean |
hasPublicKey()
Returns true if the publicKey field is present. |
boolean |
hasSerialNumber()
Returns true if the serialNumber field is present. |
boolean |
hasSigningAlg()
Returns true if the signingAlg field is present. |
boolean |
hasSubject()
Returns true if the subject field is present. |
boolean |
hasSubjectUID()
Returns true if the subjectUID field is present. |
boolean |
hasVersion()
Returns true if the version field is present. |
static void |
main(java.lang.String[] args)
|
int |
numExtensions()
Returns the number of extensions present in the template. |
void |
print(java.io.PrintStream ps,
int indentSpaces)
|
void |
setExtensions(SEQUENCE extensions)
Sets the extensions field of this CertTemplate. |
void |
setIssuer(Name issuer)
Sets the issuer field of this CertTemplate. |
void |
setIssuerUID(BIT_STRING issuerUID)
Sets the issuerUID field of this CertTemplate. |
void |
setNotAfter(java.util.Date date)
Sets the notAfter field of this CertTemplate. |
void |
setNotBefore(java.util.Date date)
Sets the version field of this CertTemplate. |
void |
setPublicKey(SubjectPublicKeyInfo publicKey)
Sets the publicKey field of this CertTemplate. |
void |
setSerialNumber(INTEGER serialNumber)
Sets the serialNumber field of this CertTemplate. |
void |
setSigningAlg(AlgorithmIdentifier signingAlg)
Sets the signingAlg field of this CertTemplate. |
void |
setSubject(Name subject)
Sets the subject field of this CertTemplate. |
void |
setSubjectUID(BIT_STRING subjectUID)
Sets the subjectUID field of this CertTemplate. |
void |
setVersion(INTEGER version)
Sets the version field of this CertTemplate. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private INTEGER version
private INTEGER serialNumber
private AlgorithmIdentifier signingAlg
private Name issuer
private java.util.Date notBefore
private java.util.Date notAfter
private Name subject
private SubjectPublicKeyInfo publicKey
private BIT_STRING issuerUID
private BIT_STRING subjectUID
private SEQUENCE extensions
public static final Tag TAG
static final int UTCTIME_CUTOFF_YEAR
private static CertTemplate.Template templateInstance
Constructor Detail |
CertTemplate()
Method Detail |
public boolean hasVersion()
public INTEGER getVersion()
public void setVersion(INTEGER version)
public boolean hasSerialNumber()
public INTEGER getSerialNumber()
public void setSerialNumber(INTEGER serialNumber)
public boolean hasSigningAlg()
public AlgorithmIdentifier getSigningAlg()
public void setSigningAlg(AlgorithmIdentifier signingAlg)
public boolean hasIssuer()
public Name getIssuer()
public void setIssuer(Name issuer)
public boolean hasNotBefore()
public java.util.Date getNotBefore()
public void setNotBefore(java.util.Date date)
public boolean hasNotAfter()
public java.util.Date getNotAfter()
public void setNotAfter(java.util.Date date)
public boolean hasSubject()
public Name getSubject()
public void setSubject(Name subject)
public boolean hasPublicKey()
public SubjectPublicKeyInfo getPublicKey()
public void setPublicKey(SubjectPublicKeyInfo publicKey)
public boolean hasIssuerUID()
public BIT_STRING getIssuerUID()
public void setIssuerUID(BIT_STRING issuerUID)
public boolean hasSubjectUID()
public BIT_STRING getSubjectUID()
public void setSubjectUID(BIT_STRING subjectUID)
public boolean hasExtensions()
public void setExtensions(SEQUENCE extensions)
public int numExtensions()
public Extension extensionAt(int idx)
idx
- The index of the extension to retrieve. Must be in the
range [ 0, numExtensions()-1 ].public void print(java.io.PrintStream ps, int indentSpaces) throws InvalidBERException, java.io.IOException
public Tag getTag()
ASN1Value
getTag
in interface ASN1Value
public void encode(java.io.OutputStream ostream) throws java.io.IOException
ASN1Value
encode
in interface ASN1Value
private static TimeBase dateToASN1(java.util.Date d)
public void encode(Tag t, java.io.OutputStream ostream) throws java.io.IOException
ASN1Value
encode
in interface ASN1Value
public static CertTemplate.Template getTemplate()
public static void main(java.lang.String[] args)
|
JSS 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |