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.pkcs10
Class CertificationRequest

    java.lang.Object
      |
      +--org.mozilla.jss.pkcs10.CertificationRequest

All Implemented Interfaces:
  ASN1Value

public class CertificationRequest
extends java.lang.Object
implements ASN1Value

A pkcs10 signed CertificationRequest.

Inner Class Summary
`static class` | `CertificationRequest.Template`

Field Summary
`private AlgorithmIdentifier` | `algId`
`private CertificationRequestInfo` | `info`
`private byte[]` | `infoEncoding`
`(package private) SEQUENCE` | `sequence`
`private byte[]` | `signature`
`private static Tag` | `TAG`
`private static CertificationRequest.Template` | `templateInstance`

Constructor Summary
`private` | `CertificationRequest()`
`(package private)` | `CertificationRequest(CertificationRequestInfo info, AlgorithmIdentifier algId, byte[] signature)`
`` | `CertificationRequest(CertificationRequestInfo info, java.security.PrivateKey privKey, SignatureAlgorithm signingAlg)` Creates and signs an X.509 CertificationRequest.

Method Summary
`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.
`CertificationRequestInfo` | `getInfo()` Returns the information (TBSCertificationRequest) contained in this CertificationRequest.
`Tag` | `getTag()` Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
`static CertificationRequest.Template` | `getTemplate()`
`static void` | `main(java.lang.String[] argv)`
`void` | `verify()` Verifies the signature on this CertificationRequest.
`void` | `verify(java.security.PublicKey key)` Verifies the signature on this CertificationRequest, using the given public key.
`void` | `verify(java.security.PublicKey key, CryptoToken token)` Verifies the signature on this CertificationRequest, using the given public key and CryptoToken.

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

Field Detail

### info

    private CertificationRequestInfo info

### infoEncoding

    private byte[] infoEncoding

### signature

    private byte[] signature

### algId

    private AlgorithmIdentifier algId

### sequence

    SEQUENCE sequence

### TAG

    private static final Tag TAG

### templateInstance

    private static final CertificationRequest.Template templateInstance

Constructor Detail

### CertificationRequest

    private CertificationRequest()

### CertificationRequest

    CertificationRequest(CertificationRequestInfo info,
                         AlgorithmIdentifier algId,
                         byte[] signature)
                   throws java.io.IOException

### CertificationRequest

    public CertificationRequest(CertificationRequestInfo info,
                                java.security.PrivateKey privKey,
                                SignatureAlgorithm signingAlg)
                         throws java.io.IOException,
                                CryptoManager.NotInitializedException,
                                TokenException,
                                java.security.NoSuchAlgorithmException,
                                java.security.cert.CertificateException,
                                java.security.InvalidKeyException,
                                java.security.SignatureException

  Creates and signs an X.509 CertificationRequest.
  Parameters:
    `info` - A CertificationRequestInfo (TBSCertificationRequest), which specifies the actual information of the CertificationRequest.
    `privKey` - The private key with which to sign the certificat.
    `signingAlg` - The algorithm to use to sign the CertificationRequest. It must match the algorithm specified in the CertificationRequestInfo.
  Throws:
    `java.io.IOException` - If an error occurred while encoding the CertificationRequest.
    `CryptoManager.NotInitializedException` - Because this operation involves cryptography (signing), CryptoManager must be initialized before calling it.
    `TokenException` - If an error occurs on a PKCS #11 token.
    `java.security.NoSuchAlgorithmException` - If the OID for the signing algorithm cannot be located.
    `java.security.cert.CertificateException` - If the signing algorithm specified as a parameter does not match the one in the CertificationRequest info.
    `java.security.InvalidKeyException` - If the key does not match the signing algorithm.
    `java.security.SignatureException` - If an error occurs while signing the CertificationRequest.

Method Detail

### verify

    public void verify()
                throws java.security.InvalidKeyException,
                       CryptoManager.NotInitializedException,
                       java.security.NoSuchAlgorithmException,
                       java.security.cert.CertificateException,
                       TokenException,
                       java.security.SignatureException,
                       InvalidKeyFormatException

  Verifies the signature on this CertificationRequest. Does not indicate that the CertificationRequest is valid at any specific time.

### verify

    public void verify(java.security.PublicKey key)
                throws java.security.InvalidKeyException,
                       CryptoManager.NotInitializedException,
                       java.security.NoSuchAlgorithmException,
                       java.security.cert.CertificateException,
                       TokenException,
                       java.security.SignatureException

  Verifies the signature on this CertificationRequest, using the given public key. Does not indicate the CertificationRequest is valid at any specific time.

### verify

    public void verify(java.security.PublicKey key,
                       CryptoToken token)
                throws java.security.NoSuchAlgorithmException,
                       java.security.cert.CertificateException,
                       TokenException,
                       java.security.SignatureException,
                       java.security.InvalidKeyException

  Verifies the signature on this CertificationRequest, using the given public key and CryptoToken. Does not indicate the CertificationRequest is valid at any specific time.

### getInfo

    public CertificationRequestInfo getInfo()

  Returns the information (TBSCertificationRequest) contained in this CertificationRequest.

### 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`

### getTemplate

    public static CertificationRequest.Template getTemplate()

### main

    public static void main(java.lang.String[] argv)

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