Skip navigation links

Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10666-05


oracle.security.crypto.cmp
Class CertReqMsg

java.lang.Object
  extended by 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:

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, java.security.PrivateKey privKey)
          Creates a new CRMF CertReqMsg from a certificate request, with the given signature proof-of-possession.
CertReqMsg(CertRequest certReq, SignaturePOP pop, java.security.PrivateKey privKey, java.security.SecureRandom sr)
          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,
                  java.security.PrivateKey privKey)
           throws java.security.SignatureException,
                  java.security.NoSuchAlgorithmException
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.

Note the changes in the method signature

Previously public CertReqMsg (CertRequest, SignaturePOP , oracle.security.crypto.core.PrivateKey )

Nowpublic CertReqMsg (CertRequest , SignaturePOP , java.security.PrivateKey)

Note the change in the exceptions declared to be thrown.

Exceptions introduced -- NoSuchAlgorithmException,java.security.SignatureException

Throws:
java.security.SignatureException
java.security.NoSuchAlgorithmException

CertReqMsg

public CertReqMsg(CertRequest certReq,
                  SignaturePOP pop,
                  java.security.PrivateKey privKey,
                  java.security.SecureRandom sr)
           throws java.security.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.

Note the changes in the method signature

Previously public CertReqMsg (CertRequest, SignaturePOP , oracle.security.crypto.core.PrivateKey , RandomBitsSource)

Nowpublic CertReqMsg (CertRequest , SignaturePOP , java.security.PrivateKey ,SecureRandom)

Note the change in the exceptions declared to be thrown.

Exceptions introduced -- java.security.SignatureException

Throws:
java.security.SignatureException

CertReqMsg

public CertReqMsg(java.io.InputStream is)
           throws java.io.IOException
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()
Overrides:
toString in class java.lang.Object

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

Skip navigation links

Oracle Fusion Middleware PKI SDK CMP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10666-05


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