Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.pkix.cert
Class CertificateInfo

    java.lang.Object
      |
      +--org.mozilla.jss.pkix.cert.CertificateInfo

All Implemented Interfaces:
  ASN1Value

public class CertificateInfo
extends java.lang.Object
implements ASN1Value

A TBSCertificate (to-be-signed certificate), the actual information in a certificate apart from the signature.

Inner Class Summary
`static class` | `CertificateInfo.Template` Template class for decoding a CertificateInfo.
`static class` | `CertificateInfo.Version` An X.509 Certificate version.

Field Summary
`private SEQUENCE` | `extensions`
`private Name` | `issuer`
`private BIT_STRING` | `issuerUniqueIdentifier`
`private java.util.Date` | `notAfter`
`private java.util.Date` | `notBefore`
`private INTEGER` | `serialNumber`
`private AlgorithmIdentifier` | `signatureAlgId`
`private Name` | `subject`
`private SubjectPublicKeyInfo` | `subjectPublicKeyInfo`
`private BIT_STRING` | `subjectUniqueIdentifier`
`(package private) static Tag` | `TAG`
`private static CertificateInfo.Template` | `templateInstance`
`(package private) static int` | `UTCTIME_CUTOFF_YEAR`
`static CertificateInfo.Version` | `v1`
`static CertificateInfo.Version` | `v2`
`static CertificateInfo.Version` | `v3`
`private CertificateInfo.Version` | `version`

Constructor Summary
`CertificateInfo(CertificateInfo.Version version, INTEGER serialNumber, AlgorithmIdentifier signatureAlgId, Name issuer, java.util.Date notBefore, java.util.Date notAfter, Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo)` Creates a CertificateInfo with the required fields.

Method Summary
`void` | `addExtension(Extension extension)`
`void` | `encode(java.io.OutputStream ostream)` Write this value's DER encoding to an output stream using its own base tag.
`void` | `encode(Tag implicitTag, java.io.OutputStream ostream)` Write this value's DER encoding to an output stream using an implicit tag.
`private static ASN1Value` | `encodeValidityDate(java.util.Date d)` Returns the correct ASN1Value (UTCTime or GeneralizedTime) to represent the given certificate validity date.
`SEQUENCE` | `getExtensions()` Returns the extensions of this certificate.
`Name` | `getIssuer()`
`BIT_STRING` | `getIssuerUniqueIdentifier()` Should only be called if this field is present.
`java.util.Date` | `getNotAfter()`
`java.util.Date` | `getNotBefore()`
`INTEGER` | `getSerialNumber()`
`AlgorithmIdentifier` | `getSignatureAlgId()`
`Name` | `getSubject()`
`SubjectPublicKeyInfo` | `getSubjectPublicKeyInfo()`
`BIT_STRING` | `getSubjectUniqueIdentifier()`
`Tag` | `getTag()` Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
`static CertificateInfo.Template` | `getTemplate()`
`CertificateInfo.Version` | `getVersion()`
`boolean` | `hasExtensions()`
`boolean` | `hasIssuerUniqueIdentifier()`
`boolean` | `hasSubjectUniqueIdentifier()`
`void` | `print(java.io.PrintStream ps)`
`void` | `setExtensions(SEQUENCE extensions)`
`void` | `setIssuer(Name issuer)`
`void` | `setIssuerUniqueIdentifier(BIT_STRING issuerUniqueIdentifier)`
`void` | `setNotAfter(java.util.Date notAfter)`
`void` | `setNotBefore(java.util.Date notBefore)`
`void` | `setSerialNumber(INTEGER serialNumber)`
`void` | `setSignatureAlgId(AlgorithmIdentifier signatureAlgId)`
`void` | `setSubject(Name subject)`
`void` | `setSubjectPublicKeyInfo(java.security.PublicKey pubk)` Extracts the SubjectPublicKeyInfo from the given public key and stores it in the CertificateInfo.
`void` | `setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo)`
`void` | `setSubjectUniqueIdentifier(BIT_STRING subjectUniqueIdentifier)`
`void` | `setVersion(CertificateInfo.Version version)`
`private void` | `verifyNotNull(java.lang.Object obj)`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### v1

    public static final CertificateInfo.Version v1

### v2

    public static final CertificateInfo.Version v2

### v3

    public static final CertificateInfo.Version v3

### UTCTIME_CUTOFF_YEAR

    static final int UTCTIME_CUTOFF_YEAR

### version

    private CertificateInfo.Version version

### serialNumber

    private INTEGER serialNumber

### signatureAlgId

    private AlgorithmIdentifier signatureAlgId

### issuer

    private Name issuer

### notBefore

    private java.util.Date notBefore

### notAfter

    private java.util.Date notAfter

### subject

    private Name subject

### subjectPublicKeyInfo

    private SubjectPublicKeyInfo subjectPublicKeyInfo

### issuerUniqueIdentifier

    private BIT_STRING issuerUniqueIdentifier

### subjectUniqueIdentifier

    private BIT_STRING subjectUniqueIdentifier

### extensions

    private SEQUENCE extensions

### TAG

    static final Tag TAG

### templateInstance

    private static final CertificateInfo.Template templateInstance

Constructor Detail

### CertificateInfo

    public CertificateInfo(CertificateInfo.Version version,
                           INTEGER serialNumber,
                           AlgorithmIdentifier signatureAlgId,
                           Name issuer,
                           java.util.Date notBefore,
                           java.util.Date notAfter,
                           Name subject,
                           SubjectPublicKeyInfo subjectPublicKeyInfo)

  Creates a CertificateInfo with the required fields.

Method Detail

### setVersion

    public void setVersion(CertificateInfo.Version version)

### getVersion

    public CertificateInfo.Version getVersion()

### setSerialNumber

    public void setSerialNumber(INTEGER serialNumber)

### getSerialNumber

    public INTEGER getSerialNumber()

### setSignatureAlgId

    public void setSignatureAlgId(AlgorithmIdentifier signatureAlgId)

### getSignatureAlgId

    public AlgorithmIdentifier getSignatureAlgId()

### setIssuer

    public void setIssuer(Name issuer)

### getIssuer

    public Name getIssuer()

### setNotBefore

    public void setNotBefore(java.util.Date notBefore)

### getNotBefore

    public java.util.Date getNotBefore()

### setNotAfter

    public void setNotAfter(java.util.Date notAfter)

### getNotAfter

    public java.util.Date getNotAfter()

### setSubject

    public void setSubject(Name subject)

### getSubject

    public Name getSubject()

### setSubjectPublicKeyInfo

    public void setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo)

### setSubjectPublicKeyInfo

    public void setSubjectPublicKeyInfo(java.security.PublicKey pubk)
                                 throws InvalidBERException,
                                        java.io.IOException

  Extracts the SubjectPublicKeyInfo from the given public key and stores it in the CertificateInfo.
  Throws:
    `InvalidBERException` - If an error occurs decoding the the information extracted from the public key.

### getSubjectPublicKeyInfo

    public SubjectPublicKeyInfo getSubjectPublicKeyInfo()

### setIssuerUniqueIdentifier

    public void setIssuerUniqueIdentifier(BIT_STRING issuerUniqueIdentifier)
                                   throws java.security.cert.CertificateException

  Throws:
    `java.security.cert.CertificateException` - If the certificate is a v1 certificate.

### hasIssuerUniqueIdentifier

    public boolean hasIssuerUniqueIdentifier()

### getIssuerUniqueIdentifier

    public BIT_STRING getIssuerUniqueIdentifier()

  Should only be called if this field is present.

### setSubjectUniqueIdentifier

    public void setSubjectUniqueIdentifier(BIT_STRING subjectUniqueIdentifier)
                                    throws java.security.cert.CertificateException

  Throws:
    `java.security.cert.CertificateException` - If the certificate is a v1 certificate.

### hasSubjectUniqueIdentifier

    public boolean hasSubjectUniqueIdentifier()

### getSubjectUniqueIdentifier

    public BIT_STRING getSubjectUniqueIdentifier()

### hasExtensions

    public boolean hasExtensions()

### getExtensions

    public SEQUENCE getExtensions()

  Returns the extensions of this certificate. The sequence may be empty, but this method will never return `null`.

### setExtensions

    public void setExtensions(SEQUENCE extensions)
                       throws java.security.cert.CertificateException

  Throws:
    `java.security.cert.CertificateException` - If the certificate is not a v3 certificate.

### addExtension

    public void addExtension(Extension extension)
                      throws java.security.cert.CertificateException

  Throws:
    `java.security.cert.CertificateException` - If the certificate is not a v3 certificate.

### verifyNotNull

    private void verifyNotNull(java.lang.Object obj)

### getTag

    public Tag getTag()

  Description copied from interface: `ASN1Value`
  Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
  Specified by:
    `getTag` in interface `ASN1Value`

### encode

    public void encode(java.io.OutputStream ostream)
                throws java.io.IOException

  Description copied from interface: `ASN1Value`
  Write this value's DER encoding to an output stream using its own base tag.
  Specified by:
    `encode` in interface `ASN1Value`

### encode

    public void encode(Tag implicitTag,
                       java.io.OutputStream ostream)
                throws java.io.IOException

  Description copied from interface: `ASN1Value`
  Write this value's DER encoding to an output stream using an implicit tag.
  Specified by:
    `encode` in interface `ASN1Value`

### encodeValidityDate

    private static ASN1Value encodeValidityDate(java.util.Date d)

  Returns the correct ASN1Value (UTCTime or GeneralizedTime) to represent the given certificate validity date.

### getTemplate

    public static CertificateInfo.Template getTemplate()

### print

    public void print(java.io.PrintStream ps)
               throws java.io.IOException,
                      InvalidBERException

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD