Skip navigation links

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

E10667-04


oracle.security.crypto.cms
Class CMSEnvelopedDataInputConnector

java.lang.Object
  extended by oracle.security.crypto.cms.CMSEnvelopedDataInputConnector

All Implemented Interfaces:
CMSInputConnector

public class CMSEnvelopedDataInputConnector
extends java.lang.Object
implements CMSInputConnector

A CMSEnvelopedDataInputConnector is used in place of a CMSEnvelopedDataInputStream when reading nested CMS objects containing enveloped-data structures.

A CMSEnvelopedDataInputConnector is essentially a input stream filter that unwraps the CMS enveloped-data structure from the data read in. A CMSEnvelopedDataInputConnector expects the Content field of the CMS ContentInfo structure i.e. the underlying input stream must be positioned just after the explicit [0] tag wrapper.

See Also:
CMSInputConnector, CMSEnvelopedDataInputStream

Constructor Summary
CMSEnvelopedDataInputConnector(CMSInputConnector conn, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert)
          Creates a CMSEnvelopedDataInputConnector.
CMSEnvelopedDataInputConnector(java.io.InputStream in, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert)
          Creates a CMSEnvelopedDataInputConnector.

 

Method Summary
 oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
          Returns the content type of the encrypted content.
 java.io.InputStream getInputStream()
          Returns the input stream governing this input connector.

 

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

 

Constructor Detail

CMSEnvelopedDataInputConnector

public CMSEnvelopedDataInputConnector(java.io.InputStream in,
                                      java.security.PrivateKey recipientPrivateKey,
                                      java.security.cert.X509Certificate recipientCert)
                               throws java.io.IOException,
                                      java.security.cert.CertificateEncodingException,
                                      java.security.NoSuchAlgorithmException
Creates a CMSEnvelopedDataInputConnector.

Assumes that Key Encryption Key Recipient Information is used.

Note the changes in the Method signature

Previously public CMSEnvelopedDataInputConnector (InputStream ,oracle.security.crypto.core.PrivateKey , X509)

Nowpublic CMSEnvelopedDataInputConnector (InputStream , java.security.PrivateKey , X509Certificate )

Note the changes in exceptions Exceptions introduced -- IOException,CertificateEncodingException,NoSuchAlgorithmException

Parameters:
in - The underlying input stream.
recipientPrivateKey - The private key of the recipient.
recipientCert - The recipient's certificate.
Throws:
java.security.NoSuchAlgorithmException - Algorithm Not supported
java.security.cert.CertificateEncodingException - Specifies an encoding error
java.io.IOException - Input/Output Exception while instantiating X509 from an inputstream

CMSEnvelopedDataInputConnector

public CMSEnvelopedDataInputConnector(CMSInputConnector conn,
                                      java.security.PrivateKey recipientPrivateKey,
                                      java.security.cert.X509Certificate recipientCert)
                               throws java.io.IOException
Creates a CMSEnvelopedDataInputConnector.

Assumes that Key Encryption Key Recipient Information is used.

Note the changes in the Method signature

Previously public CMSEnvelopedDataInputConnector (CMSInputConnector ,oracle.security.crypto.core.PrivateKey , X509)

Nowpublic CMSEnvelopedDataInputConnector (CMSInputConnector , java.security.PrivateKey , X509Certificate )

Note the changes in exceptions Exceptions introduced -- IOException

Parameters:
conn - The underlying input connector.
recipientPrivateKey - The private key of the recipient.
recipientCert - The recipient's certificate.
Throws:
java.io.IOException - Input/Output Exception while instantiating X509 from an inputstream

Method Detail

getEnclosedContentType

public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
                                                                throws java.io.IOException
Returns the content type of the encrypted content.
Specified by:
getEnclosedContentType in interface CMSInputConnector
Returns:
The content type identifier.
Throws:
java.io.IOException - If the encoding is incorrect or an I/O error occurs.

getInputStream

public java.io.InputStream getInputStream()
Returns the input stream governing this input connector.
Specified by:
getInputStream in interface CMSInputConnector
Returns:
The underlying input stream.

Skip navigation links

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

E10667-04


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