public class FullResponse
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object
This class assumes that the input CMSContentInfo object has been signed/encrypted in accordance with the CMC processing rules.
This class requires the users to use the CMS APIs directly on the underlying CMS objects to sign and/or encrypt.
| Constructor and Description |
|---|
FullResponse()
Create an empty
FullResponse instance. |
FullResponse(CMSContentInfo cms)
Create a
FullResponse instance with the specified value. |
FullResponse(java.io.InputStream is)
Create a new
FullResponse by reading from the specified input stream. |
| Modifier and Type | Method and Description |
|---|---|
CMSContentInfo |
getCMSContentInfo()
Returns the enrollment response.
|
ResponseBody |
getResponseBody()
Returns the full enrollment response underlying the CMS signed-data wrapper.
|
ResponseBody |
getResponseBody(oracle.security.crypto.core.PrivateKey privKey, X509 pubKey)
Returns the full enrollment response underlying the CMS enveloped-data wrapper.
|
void |
input(java.io.InputStream is)
Create a new full enrollment response by reading from the specified input stream.
|
int |
length()
Returns the length of this object's encoding.
|
void |
output(java.io.OutputStream os)
Outputs the full enrollment response to the specified output stream.
|
void |
setCMSContentInfo(CMSContentInfo cms)
Sets the enrollment response.
|
public FullResponse()
FullResponse instance.public FullResponse(CMSContentInfo cms) throws oracle.security.crypto.util.InvalidInputException
FullResponse instance with the specified value.cms - The enrollment response.oracle.security.crypto.util.InvalidInputException - The enrollment response must be of type id-signedData, id-envelopedData or id-cct-PKIResponse only.public FullResponse(java.io.InputStream is)
throws java.io.IOException
FullResponse by reading from the specified input stream.is - The input stream containing the encoded CMSSignedData or CMSEnvelopedData..java.io.IOException - The input encoding is incorrect or an I/O error occurs.public void setCMSContentInfo(CMSContentInfo cms) throws oracle.security.crypto.util.InvalidInputException
cms - The enrollment response.oracle.security.crypto.util.InvalidInputException - The enrollment response must be of type id-signedData, id-envelopedData or id-cct-PKIResponse only.public CMSContentInfo getCMSContentInfo()
public ResponseBody getResponseBody()
Please note that the presence or validity of a signature covering the enrollment response has not checked.
PKIData, or null if the underlying content is not a CMC response message or an error is encountered.public ResponseBody getResponseBody(oracle.security.crypto.core.PrivateKey privKey, X509 pubKey)
privKey - The recipient's private decryption key.pubKey - The recipient's public key certificate.
Please note that the presence or validity of a signature covering the enrollment response has not checked.
PKIData, or null if the underlying content is not a CMC response message or an error is encountered.public void input(java.io.InputStream is)
throws java.io.IOException
input in interface oracle.security.crypto.util.Streamableis - The input stream containing the encoded CMSContentInfo.java.io.IOException - The input encoding is incorrect or an I/O error occurs.public void output(java.io.OutputStream os)
throws java.io.IOException
output in interface oracle.security.crypto.util.Streamableos - The output stream.java.io.IOException - An I/O error occurs.public int length()
length in interface oracle.security.crypto.util.Streamable