Package org.mozilla.jss.pkix.crmf
Class CertTemplate
- java.lang.Object
-
- org.mozilla.jss.pkix.crmf.CertTemplate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCertTemplate.TemplateA class for decoding CertTemplates.
-
Constructor Summary
Constructors Constructor Description CertTemplate()Creates an empty CertTemplate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(java.io.OutputStream ostream)Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag t, java.io.OutputStream ostream)Write this value's DER encoding to an output stream using an implicit tag.ExtensionextensionAt(int idx)Returns the ith extension.NamegetIssuer()Returns the issuer field of this CertTemplate.BIT_STRINGgetIssuerUID()Returns the issuerUID field of this CertTemplate.java.util.DategetNotAfter()Returns the notAfter field of this CertTemplate.java.util.DategetNotBefore()Returns the notBefore field of this CertTemplate.SubjectPublicKeyInfogetPublicKey()Returns the publicKey field of this CertTemplate.INTEGERgetSerialNumber()Returns the serialNumber field of this CertTemplate.AlgorithmIdentifiergetSigningAlg()Returns the signingAlg field of this CertTemplate.NamegetSubject()Sets the subject field of this CertTemplate.BIT_STRINGgetSubjectUID()Returns the subjectUID field of this CertTemplate.TaggetTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static CertTemplate.TemplategetTemplate()INTEGERgetVersion()Returns the version field of this CertTemplate.booleanhasExtensions()Returns true if the extensions field is present.booleanhasIssuer()Returns true if the issuer field is present.booleanhasIssuerUID()Returns true if the issuerUID field is present.booleanhasNotAfter()Returns true if the notAfter field is present.booleanhasNotBefore()Returns true if the notBefore field is present.booleanhasPublicKey()Returns true if the publicKey field is present.booleanhasSerialNumber()Returns true if the serialNumber field is present.booleanhasSigningAlg()Returns true if the signingAlg field is present.booleanhasSubject()Returns true if the subject field is present.booleanhasSubjectUID()Returns true if the subjectUID field is present.booleanhasVersion()Returns true if the version field is present.static voidmain(java.lang.String[] args)intnumExtensions()Returns the number of extensions present in the template.voidprint(java.io.PrintStream ps, int indentSpaces)voidsetExtensions(SEQUENCE extensions)Sets the extensions field of this CertTemplate.voidsetIssuer(Name issuer)Sets the issuer field of this CertTemplate.voidsetIssuerUID(BIT_STRING issuerUID)Sets the issuerUID field of this CertTemplate.voidsetNotAfter(java.util.Date date)Sets the notAfter field of this CertTemplate.voidsetNotBefore(java.util.Date date)Sets the version field of this CertTemplate.voidsetPublicKey(SubjectPublicKeyInfo publicKey)Sets the publicKey field of this CertTemplate.voidsetSerialNumber(INTEGER serialNumber)Sets the serialNumber field of this CertTemplate.voidsetSigningAlg(AlgorithmIdentifier signingAlg)Sets the signingAlg field of this CertTemplate.voidsetSubject(Name subject)Sets the subject field of this CertTemplate.voidsetSubjectUID(BIT_STRING subjectUID)Sets the subjectUID field of this CertTemplate.voidsetVersion(INTEGER version)Sets the version field of this CertTemplate.
-
-
-
Field Detail
-
TAG
public static final Tag TAG
-
-
Method Detail
-
hasVersion
public boolean hasVersion()
Returns true if the version field is present.
-
getVersion
public INTEGER getVersion()
Returns the version field of this CertTemplate.
-
setVersion
public void setVersion(INTEGER version)
Sets the version field of this CertTemplate.
-
hasSerialNumber
public boolean hasSerialNumber()
Returns true if the serialNumber field is present.
-
getSerialNumber
public INTEGER getSerialNumber()
Returns the serialNumber field of this CertTemplate.
-
setSerialNumber
public void setSerialNumber(INTEGER serialNumber)
Sets the serialNumber field of this CertTemplate.
-
hasSigningAlg
public boolean hasSigningAlg()
Returns true if the signingAlg field is present.
-
getSigningAlg
public AlgorithmIdentifier getSigningAlg()
Returns the signingAlg field of this CertTemplate.
-
setSigningAlg
public void setSigningAlg(AlgorithmIdentifier signingAlg)
Sets the signingAlg field of this CertTemplate.
-
hasIssuer
public boolean hasIssuer()
Returns true if the issuer field is present.
-
getIssuer
public Name getIssuer()
Returns the issuer field of this CertTemplate.
-
setIssuer
public void setIssuer(Name issuer)
Sets the issuer field of this CertTemplate.
-
hasNotBefore
public boolean hasNotBefore()
Returns true if the notBefore field is present.
-
getNotBefore
public java.util.Date getNotBefore()
Returns the notBefore field of this CertTemplate.
-
setNotBefore
public void setNotBefore(java.util.Date date)
Sets the version field of this CertTemplate.
-
hasNotAfter
public boolean hasNotAfter()
Returns true if the notAfter field is present.
-
getNotAfter
public java.util.Date getNotAfter()
Returns the notAfter field of this CertTemplate.
-
setNotAfter
public void setNotAfter(java.util.Date date)
Sets the notAfter field of this CertTemplate.
-
hasSubject
public boolean hasSubject()
Returns true if the subject field is present.
-
getSubject
public Name getSubject()
Sets the subject field of this CertTemplate.
-
setSubject
public void setSubject(Name subject)
Sets the subject field of this CertTemplate.
-
hasPublicKey
public boolean hasPublicKey()
Returns true if the publicKey field is present.
-
getPublicKey
public SubjectPublicKeyInfo getPublicKey()
Returns the publicKey field of this CertTemplate.
-
setPublicKey
public void setPublicKey(SubjectPublicKeyInfo publicKey)
Sets the publicKey field of this CertTemplate.
-
hasIssuerUID
public boolean hasIssuerUID()
Returns true if the issuerUID field is present.
-
getIssuerUID
public BIT_STRING getIssuerUID()
Returns the issuerUID field of this CertTemplate.
-
setIssuerUID
public void setIssuerUID(BIT_STRING issuerUID)
Sets the issuerUID field of this CertTemplate.
-
hasSubjectUID
public boolean hasSubjectUID()
Returns true if the subjectUID field is present.
-
getSubjectUID
public BIT_STRING getSubjectUID()
Returns the subjectUID field of this CertTemplate.
-
setSubjectUID
public void setSubjectUID(BIT_STRING subjectUID)
Sets the subjectUID field of this CertTemplate.
-
hasExtensions
public boolean hasExtensions()
Returns true if the extensions field is present.
-
setExtensions
public void setExtensions(SEQUENCE extensions)
Sets the extensions field of this CertTemplate.
-
numExtensions
public int numExtensions()
Returns the number of extensions present in the template. May be zero.
-
extensionAt
public Extension extensionAt(int idx)
Returns the ith extension.- Parameters:
idx- The index of the extension to retrieve. Must be in the range [ 0, numExtensions()-1 ].
-
print
public void print(java.io.PrintStream ps, int indentSpaces) throws InvalidBERException, java.io.IOException- Throws:
InvalidBERExceptionjava.io.IOException
-
getTag
public Tag getTag()
Description copied from interface:ASN1ValueReturns the base tag for this type, not counting any tags that may be imposed on it by its context.
-
encode
public void encode(java.io.OutputStream ostream) throws java.io.IOExceptionDescription copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.
-
encode
public void encode(Tag t, java.io.OutputStream ostream) throws java.io.IOException
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using an implicit tag.
-
getTemplate
public static CertTemplate.Template getTemplate()
-
main
public static void main(java.lang.String[] args)
-
-