Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK CMP Java API Reference 10g Release 3 (10.1.3) B25373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.cmp
Class CertReqMsg

`java.lang.Object
oracle.security.crypto.cmp.CertReqMsg`

All Implemented Interfaces:
  oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class CertReqMsg
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

CRMF certification request.

Instances consist of the following elements:

- The certificate request itself, represented as an instance of `CertRequest`.
- An optional proof of possession value, represented as an instance of `ProofOfPossession`.
- An optional sequence of `RegistrationInfo` attributes, represented as an `AttributeTypeAndValueList`.

Note: The CRMF specification explicitly requires that proof of possession be performed. Thus omitting the proof of possession value is only permissible if an out-of-band mechanism for POP is in place.

See Also:
  `ProofOfPossession`, `CertReqMessages`

Constructor Summary
`CertReqMsg()` Creates a new, empty `CertReqMsg`.
`CertReqMsg(CertRequest certReq)` Creates a new `CertReqMsg` from a certificate request, with no proof-of-possesion (assumes out-of-band POP will be done).
`CertReqMsg(CertRequest certReq, ProofOfPossession pop)` Creates a new CRMF `CertReqMsg` from a certificate request, with the given proof-of-possession (not a `SignaturePOP`).
`CertReqMsg(CertRequest certReq, SignaturePOP pop, oracle.security.crypto.core.PrivateKey privKey)` Creates a new CRMF `CertReqMsg` from a certificate request, with the given signature proof-of-possession.
`CertReqMsg(CertRequest certReq, SignaturePOP pop, oracle.security.crypto.core.PrivateKey privKey, oracle.security.crypto.core.RandomBitsSource rbs)` Creates a new CRMF `CertReqMsg` from a certificate request, with the given signature proof-of-possession.
`CertReqMsg(java.io.InputStream is)`

Method Summary
`void` | `addRegInfo(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)` Adds the specified type-and-value pair to the registration info.
`void` | `addRegInfo(RegistrationInfo ri)` Adds the given `RegistrationInfo` to this `CertReqMsg`.
`void` | `assertSigPOPRules()` Checks the Signature POP rules are as per RFC 2511bis Section 4.4 comment text.
`CertRequest` | `getCertRequest()` Returns the certificate request contained in this message.
`ProofOfPossession` | `getPOP()` Returns the proof of possession value, or `null` if it is not present in this message.
`oracle.security.crypto.cert.AttributeTypeAndValueList` | `getRegInfo()` Returns the sequence of registration info, or `null` if none are defined.
`void` | `input(java.io.InputStream is)`
`int` | `length()`
`void` | `output(java.io.OutputStream os)`
`java.lang.String` | `toString()`

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

Constructor Detail

### CertReqMsg

    public CertReqMsg()

  Creates a new, empty `CertReqMsg`. Since a valid instance must contain (at least) a `CertRequest`, this constructor is intended primarily for use with the `input(java.io.InputStream)` method.

### CertReqMsg

    public CertReqMsg(CertRequest certReq)

  Creates a new `CertReqMsg` from a certificate request, with no proof-of-possesion (assumes out-of-band POP will be done).

### CertReqMsg

    public CertReqMsg(CertRequest certReq,
                      ProofOfPossession pop)

  Creates a new CRMF `CertReqMsg` from a certificate request, with the given proof-of-possession (not a `SignaturePOP`).

  Note: This constructor must not be used with a signature POP; instead use `CertReqMsg(CertRequest, SignaturePOP, PrivateKey)`.

### CertReqMsg

    public CertReqMsg(CertRequest certReq,
                      SignaturePOP pop,
                      oracle.security.crypto.core.PrivateKey privKey)
               throws oracle.security.crypto.core.SignatureException

  Creates a new CRMF `CertReqMsg` from a certificate request, with the given signature proof-of-possession. If the signature has not yet been computed, it is computed here using the given private key.

### CertReqMsg

    public CertReqMsg(CertRequest certReq,
                      SignaturePOP pop,
                      oracle.security.crypto.core.PrivateKey privKey,
                      oracle.security.crypto.core.RandomBitsSource rbs)
               throws oracle.security.crypto.core.SignatureException

  Creates a new CRMF `CertReqMsg` from a certificate request, with the given signature proof-of-possession. If the signature has not yet been computed, it is computed here using the given private key.

### CertReqMsg

    public CertReqMsg(java.io.InputStream is)
               throws java.io.IOException

Method Detail

### getCertRequest

    public CertRequest getCertRequest()

  Returns the certificate request contained in this message.

### getPOP

    public ProofOfPossession getPOP()

  Returns the proof of possession value, or `null` if it is not present in this message.

### assertSigPOPRules

    public void assertSigPOPRules()
                           throws oracle.security.crypto.util.InvalidInputException

  Checks the Signature POP rules are as per RFC 2511bis Section 4.4 comment text.
  Throws:
    `oracle.security.crypto.util.InvalidInputException` - If the certTemplate contains both the subjectName and publicKey, and a POPOSigningKeyInput is present; or if the certTemplate is missing one or both of subjectName and publicKey, and the POPOSigningKeyInput is missing as well.

### addRegInfo

    public void addRegInfo(RegistrationInfo ri)

  Adds the given `RegistrationInfo` to this `CertReqMsg`.

### addRegInfo

    public void addRegInfo(oracle.security.crypto.asn1.ASN1ObjectID type,
                           oracle.security.crypto.asn1.ASN1Object value)

  Adds the specified type-and-value pair to the registration info.
  Parameters:
    `type` - the type OID.
    `value` - the value.

### getRegInfo

    public oracle.security.crypto.cert.AttributeTypeAndValueList getRegInfo()

  Returns the sequence of registration info, or `null` if none are defined.

### toString

    public java.lang.String toString()

### input

    public void input(java.io.InputStream is)
               throws java.io.IOException

  Specified by:
    `input` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### output

    public void output(java.io.OutputStream os)
                throws java.io.IOException

  Specified by:
    `output` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### length

    public int length()

  Specified by:
    `length` in interface `oracle.security.crypto.util.Streamable`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK CMP Java API Reference 10g Release 3 (10.1.3) B25373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.