public class CMSAuthenticatedDataInputConnector extends java.lang.Object implements CMSInputConnector
CMSAuthenticatedDataInputConnector
is used in place of a CMSAuthenticatedDataInputStream
when reading nested CMS objects containing authenticated-data
structures.
A CMSAuthenticatedDataInputConnector
is essentially a input stream filter that unwraps the CMS authenticated-data
structure from the data read in. A CMSAuthenticatedDataInputConnector
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.
CMSInputConnector
, CMSAuthenticatedDataInputStream
Constructor and Description |
---|
CMSAuthenticatedDataInputConnector(CMSInputConnector conn, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert)
Creates a
CMSAuthenticatedDataInputConnector . |
CMSAuthenticatedDataInputConnector(CMSInputConnector conn, javax.crypto.SecretKey keyEncryptionKey)
Creates a
CMSAuthenticatedDataInputConnector . |
CMSAuthenticatedDataInputConnector(java.io.InputStream in, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert)
Creates a
CMSAuthenticatedDataInputConnector . |
CMSAuthenticatedDataInputConnector(java.io.InputStream in, javax.crypto.SecretKey keyEncryptionKey)
Creates a
CMSAuthenticatedDataInputConnector . |
Modifier and Type | Method and Description |
---|---|
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType()
Returns the content type of the authenticated content.
|
java.io.InputStream |
getInputStream()
Returns the input stream governing this connector.
|
public CMSAuthenticatedDataInputConnector(java.io.InputStream in, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert) throws java.security.cert.CertificateEncodingException, java.security.NoSuchAlgorithmException, java.io.IOException
CMSAuthenticatedDataInputConnector
.
Note the changes in the Method signature
Previouslypublic CMSAuthenticatedDataInputConnector (InputStream, oracle.security.crypto.core.PrivateKey , X509 )
Nowpublic CMSAuthenticatedDataInputConnector (InputStream , java.security.PrivateKey , X509Certificate )
Note the changes in exceptions Exceptions introduced -- CertificateEncodingException ,NoSuchAlgorithmException, IOException
in
- The underlying input stream.recipientPrivateKey
- The recipient's private key.recipientCert
- The recipient's certificate.java.security.cert.CertificateEncodingException
- Error while encoding the certificatejava.security.NoSuchAlgorithmException
- Algorithm not supportedjava.io.IOException
- I/O exception while encoding the certificatepublic CMSAuthenticatedDataInputConnector(java.io.InputStream in, javax.crypto.SecretKey keyEncryptionKey)
CMSAuthenticatedDataInputConnector
.
Note the changes in the Method signature
Previously public CMSAuthenticatedDataInputConnector (InputStream , SymmetricKey )
Now public CMSAuthenticatedDataInputConnector (InputStream , SecretKey )
in
- The underlying input stream.keyEncryptionKey
- The recipient's key unwrap key.public CMSAuthenticatedDataInputConnector(CMSInputConnector conn, java.security.PrivateKey recipientPrivateKey, java.security.cert.X509Certificate recipientCert) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateEncodingException
CMSAuthenticatedDataInputConnector
.
Note the changes in the Method signature
Previouslypublic CMSAuthenticatedDataInputConnector (CMSInputConnector , oracle.security.crypto.core.PrivateKey , X509)
Nowpublic public CMSAuthenticatedDataInputConnector (CMSInputConnector conn, java.security.PrivateKey recipientPrivateKey, X509Certificate)
Note the changes in exceptions Exceptions introduced -- CertificateEncodingException ,NoSuchAlgorithmException, IOException
conn
- The underlying input connector.recipientPrivateKey
- The recipient's private key.recipientCert
- The recipient's certificate.java.security.cert.CertificateEncodingException
- Error while encoding the certificatejava.security.NoSuchAlgorithmException
- Algorithm not supportedjava.io.IOException
- I/O exception while encoding the certificatepublic CMSAuthenticatedDataInputConnector(CMSInputConnector conn, javax.crypto.SecretKey keyEncryptionKey)
CMSAuthenticatedDataInputConnector
. p>Note the changes in the Method signature
Previouslypublic CMSAuthenticatedDataInputConnector (CMSInputConnector , SymmetricKey )
Nowpublic CMSAuthenticatedDataInputConnector (CMSInputConnector , SecretKey )
conn
- The underlying input connector.keyEncryptionKey
- The recipient's key unwrap key.public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType() throws java.io.IOException
getEnclosedContentType
in interface CMSInputConnector
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public java.io.InputStream getInputStream()
getInputStream
in interface CMSInputConnector