|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-03 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
oracle.security.crypto.cms.CMSInputStream
oracle.security.crypto.cms.CMSSignedDataInputStream
public class CMSSignedDataInputStream
A CMSSignedDataInputStream
is used to read signed-data
CMS objects.
A CMSSignedDataInputStream
is essentially a input stream filter that unwraps the CMS signed-data
structure from the data read in.
You will be able to read a detached signed-data object using the CMSSignedDataInputStream
class but you will not be able to verify the signature.
IMPORTANT: This class processes large CMS signed-data Objects more efficiently (Java VM memory usage) than the CMSSignedDataContentInfo
class.
CMSInputConnector
, CMSSignedDataInputConnector
, CMSSignedDataContentInfo
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
CMSSignedDataInputStream(CMSInputConnector conn) Creates a CMSSignedDataInputStream . |
|
CMSSignedDataInputStream(java.io.InputStream in) Creates a CMSSignedDataInputStream . |
Method Summary | |
---|---|
int |
available() |
java.util.Vector |
getCertificates() Returns the list of certificates included with this signed data object. |
java.util.Vector |
getCRLs() Returns the list of CRLs included with this signed data object. |
java.util.Enumeration |
getDigestAlgIDs() Returns the list of Digest Algorithms. |
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType() Returns the content type of the signed content. |
CMSSignerInfo |
getSignerInfo(java.security.cert.X509Certificate signerCert) Return the SignerInfo corresponding to the signer certificate. |
oracle.security.crypto.asn1.ASN1Integer |
getVersion() Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber() |
java.math.BigInteger |
getVersionNumber() Returns the version number of this CMS Object. |
void |
mark(int readlimit) Not supported. |
boolean |
markSupported() Not Supported. |
int |
read() |
int |
read(byte[] buffer, int offset, int len) |
void |
reset() Not supported. |
java.util.Enumeration |
signers() Returns the enumeration of message signers. |
long |
skip(long n) Not supported. |
void |
terminate() Ensures that the CMS Object in the input stream has been completely read. |
void |
verifySignature(java.security.cert.X509Certificate signerCert) Verify the Signature. |
Methods inherited from class java.io.FilterInputStream |
---|
close, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMSSignedDataInputStream(java.io.InputStream in)
CMSSignedDataInputStream
.
in
- The underlying input stream.public CMSSignedDataInputStream(CMSInputConnector conn)
CMSSignedDataInputStream
.
conn
- The underlying input connector.Method Detail |
---|
public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType() throws java.io.IOException
getEnclosedContentType
in class CMSInputStream
java.io.IOException
- If the encoding is incorrect or an I/O error occurs.public java.util.Enumeration signers() throws java.io.IOException
CMSSignerInfo
objects.java.io.IOException
- An I/O error occurred or the input is incorrectly encoded.public java.util.Vector getCertificates() throws java.io.IOException
Vector
containing X509
objects or null
if no list of certificates is present.java.io.IOException
- An I/O error occurred or the input is incorrectly encoded.public java.util.Vector getCRLs() throws java.io.IOException
Vector
containing CRL
objects or null
if no list of CRLs is present.java.io.IOException
- An I/O error occurred or the input is incorrectly encoded.public CMSSignerInfo getSignerInfo(java.security.cert.X509Certificate signerCert) throws UnknownSignerException, java.io.IOException, java.security.cert.CertificateEncodingException, java.security.NoSuchAlgorithmException
Note the changes in the Method signature
Previouslypublic CMSSignerInfo getSignerInfo (X509)
Now public CMSSignerInfo getSignerInfo (X509Certificate)
Exceptions included -- NoSuchAlgorithmException ,CertificateEncodingException, IOException
signerCert
- The signer certificate.CMSSignerInfo
object.UnknownSignerException
- No SignerInfo matching the specified certificate.java.io.IOException
- IO error when creating a certificate from the input streamjava.security.cert.CertificateEncodingException
- Error while encoding the certificatejava.security.NoSuchAlgorithmException
- Algorithm not supportedpublic void verifySignature(java.security.cert.X509Certificate signerCert) throws oracle.security.crypto.core.AuthenticationException, UnknownSignerException
Note the changes in the Method signature
Previouslypublic void verifySignature (X509 )
Nowpublic void verifySignature (X509Certificate )
signerCert
- The signing certificate.oracle.security.crypto.core.AuthenticationException
- Signature is not valid.UnknownSignerException
- Could not find the matching SignerInfo.public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] buffer, int offset, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
IOException
.skip
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
false
.public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
- always (not supported).public void terminate() throws java.io.IOException
CMSInputStream
Must be called after all the content enclosed by the CMS Object has been read.
terminate
in class CMSInputStream
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public java.math.BigInteger getVersionNumber() throws java.io.IOException
java.io.IOException
- An I/O error occurred or the input is incorrectly encoded.public oracle.security.crypto.asn1.ASN1Integer getVersion() throws java.io.IOException
getVersionNumber()
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public java.util.Enumeration getDigestAlgIDs() throws java.io.IOException
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-03 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |