org.mozilla.jss.pkcs10

Class CertificationRequestInfo

Implemented Interfaces:
ASN1Value

public class CertificationRequestInfo
extends java.lang.Object
implements ASN1Value

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

Nested Class Summary

static class
CertificationRequestInfo.Template
Template class for decoding a CertificationRequestInfo.

Constructor Summary

CertificationRequestInfo(INTEGER version, Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, SET attributes)
Creates a CertificationRequestInfo with the required fields.

Method Summary

void
encode(OutputStream ostream)
void
encode(Tag implicitTag, OutputStream ostream)
SET
getAttributes()
Name
getSubject()
SubjectPublicKeyInfo
getSubjectPublicKeyInfo()
Tag
getTag()
static CertificationRequestInfo.Template
getTemplate()
INTEGER
getVersion()
void
print(PrintStream ps)
void
setAttributes(SET attributes)
void
setSubject(Name subject)
void
setSubjectPublicKeyInfo(PublicKey pubk)
Extracts the SubjectPublicKeyInfo from the given public key and stores it in the CertificationRequestInfo.
void
setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo)
void
setVersion(INTEGER version)

Constructor Details

CertificationRequestInfo

public CertificationRequestInfo(INTEGER version,
                                Name subject,
                                SubjectPublicKeyInfo subjectPublicKeyInfo,
                                SET attributes)
Creates a CertificationRequestInfo with the required fields.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

getAttributes

public SET getAttributes()

getSubject

public Name getSubject()

getSubjectPublicKeyInfo

public SubjectPublicKeyInfo getSubjectPublicKeyInfo()

getTag

public Tag getTag()
Specified by:
getTag in interface ASN1Value

getTemplate

public static CertificationRequestInfo.Template getTemplate()

getVersion

public INTEGER getVersion()

print

public void print(PrintStream ps)
            throws IOException,
                   InvalidBERException

setAttributes

public void setAttributes(SET attributes)

setSubject

public void setSubject(Name subject)

setSubjectPublicKeyInfo

public void setSubjectPublicKeyInfo(PublicKey pubk)
            throws InvalidBERException,
                   IOException
Extracts the SubjectPublicKeyInfo from the given public key and stores it in the CertificationRequestInfo.
Throws:
InvalidBERException - If an error occurs decoding the the information extracted from the public key.

setSubjectPublicKeyInfo

public void setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo)

setVersion

public void setVersion(INTEGER version)