|
Oracle Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
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
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. |
ASN1ObjectID |
getEnclosedContentType() Returns the content type of the signed content. |
CMSSignerInfo |
getSignerInfo(oracle.security.crypto.cert.X509 signerCert) Return the SignerInfo corresponding to the signer certificate. |
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(oracle.security.crypto.cert.X509 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 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(oracle.security.crypto.cert.X509 signerCert) throws UnknownSignerException
signerCert
- The signer certificate.CMSSignerInfo
object.UnknownSignerException
- No SignerInfo matching the specified certificate.public void verifySignature(oracle.security.crypto.cert.X509 signerCert) throws AuthenticationException, UnknownSignerException
signerCert
- The signing certificate.AuthenticationException
- Signature is not valid.UnknownSignerException
- Could not find the matching SignerInfo.public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] buffer, int offset, int len) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
java.io.IOException
public long skip(long n) throws java.io.IOException
IOException
.java.io.IOException
public boolean markSupported()
false
.public void mark(int readlimit)
public void reset() throws java.io.IOException
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 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 Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |