com.dstc.security.cms
Interface VerificationResult


public interface VerificationResult

An interface to the result of verification of data signed according to CMS.

In JCSI's default mode of operation, verification is successful if an instance of VerificationResult is returned as a result of calling verify() on a CMSSignature instance. Data that is read from the InputStream associated with this VerificationResult can be considered "verified". However, the signature verification process is such that the data purported to be signed will have had to have been read and buffered so that it can be subsequently returned, with obvious memory implications if the amount of data signed is large.

In order to support one-pass processing without data buffering for memory-sensitive applications, JCSI supports a second mode of operation (enabled by setting the system property jcsi.cms.delayverify=true) in which actual verification is delayed until reading till end-of-file from the InputStream obtained by getVerified() followed by a call to getCMSSignedData(). In other words, data read from the InputStream is not "verified" and must be treated with care until the above described sequence completes successfully.

See Also:
CMSTypedDataInputStream, SignedData

Method Summary
 SignedData getCMSSignedData()
          Returns a SignedData instance for the signed message which can be queried for signer and signing information.
 CMSTypedDataInputStream getVerified()
          Returns a CMSTypedInputStream from which can be read the data that was purported to be signed (and in the default mode of operation -- see above -- the signature on which was verified successfully).
 

Method Detail

getVerified

public CMSTypedDataInputStream getVerified()
Returns a CMSTypedInputStream from which can be read the data that was purported to be signed (and in the default mode of operation -- see above -- the signature on which was verified successfully).

getCMSSignedData

public SignedData getCMSSignedData()
                            throws CMSException
Returns a SignedData instance for the signed message which can be queried for signer and signing information.