|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.security.crypto.smime.SmimeSignedReceipt
This class encapsulates a wrapped signed receipt.
| Constructor Summary | |
SmimeSignedReceipt(oracle.security.crypto.cms.ESSReceipt receipt, byte[] msgSigDigest, javax.mail.Address[] receiptsToAddresses)Create a SmimeSignedReceipt. |
|
SmimeSignedReceipt(java.io.InputStream is)Create a SmimeSignedReceipt by reading the BER encoding from the specified input stream. |
|
SmimeSignedReceipt(SmimeSignedObject smimeObj)Create a SmimeSignedReceipt. |
|
SmimeSignedReceipt(SmimeSignedObject smimeSigned, oracle.security.crypto.cert.X509 signerCert, javax.mail.Address[] messageRecipientAddresses)Create a SmimeSignedReceipt using the signed message containing a receipt request. |
|
SmimeSignedReceipt(SmimeSignedObject smimeSigned, oracle.security.crypto.cert.X509 signerCert, javax.mail.Address[] messageRecipientAddresses, MLExpansionHistory mlExpansionHistory)Create a SmimeSignedReceipt using the signed message containing a receipt request. |
|
| Method Summary | |
void |
addCertificate(oracle.security.crypto.cert.X509 cert) |
void |
addCRL(oracle.security.crypto.cert.CRL crl) |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID) |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, oracle.security.crypto.cert.AttributeSet signedAttributes) |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, java.util.Date timeStamp) |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, java.util.Date timeStamp, SmimeCapabilities smimeCaps) |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, SmimeCapabilities smimeCaps) |
java.lang.String |
generateContentType()Returns the content type of this smime object. |
java.lang.String |
generateContentType(boolean useStandardContentTypes)Returns the content type of this smime object. |
java.util.Vector |
getCertificates()Returns the list of Certificates included with this signed data object, or null if no list of Certificates is present. |
java.util.Vector |
getCRLs()Returns the list of CRLs included with this signed data object, or null if no list of CRLs is present. |
javax.mail.internet.MimeBodyPart |
getEnclosedBodyPart()Returns a MimeBodyPart containing a DER encoded ESS Receipt. |
oracle.security.crypto.cms.ESSReceipt |
getEnclosedReceipt()Returns the ESS Receipt. |
EquivalentLabels |
getEquivalentLabels(oracle.security.crypto.cert.X509 signerCert)Returns the EquivalentLabels if present or null. |
ESSSecurityLabel |
getESSSecurityLabel(oracle.security.crypto.cert.X509 signerCert)Returns the ESSSecurityLabel if present or null. |
MLExpansionHistory |
getMLExpansionHistory(oracle.security.crypto.cert.X509 signerCert)Returns the MLExpansionHistory if present or null. |
ReceiptRequest |
getReceiptRequest(oracle.security.crypto.cert.X509 signerCert)Returns the ReceiptRequest if present or null. |
javax.mail.Address[] |
getReceiptsToAddresses()Returns the list of recipients to whom the receipt must be sent. |
SigningCertificate |
getSigningCertificate(oracle.security.crypto.cert.X509 signerCert)Returns the SigningCertificate Attribute if present or null. |
java.util.Enumeration |
signers()Returns the signatures on this signed data object, in the form of an enumeration, each element of which is an instance of CMSSignerInfo. |
void |
verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy)Returns normally if this CMS signed data object contains at least one valid signature, according to the given trust policy; otherwise throws an AuthenticationException. |
void |
verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy, javax.mail.Address[] senderAddresses)Does the same thing as verify(CertificateTrustPolicy), except that in addition, it checks to make sure that the terminating certificate of the validating certificate chain contains an email address which is present in the specified list of sender addresses. |
void |
verifyReceipt(SmimeSignedObject originalSmimeSignedObject, oracle.security.crypto.cert.X509 signerCert)Stores the SignerInfo object that contains the original receipt request that will be used to validate a received receipt |
void |
verifySignature(oracle.security.crypto.cert.X509 signerCert)Returns successfully if this CMS signed data object contains a signature which is validated by the given certificate; otherwise throws an AuthenticationException. |
void |
verifySignature(oracle.security.crypto.cert.X509 signerCert, javax.mail.Address[] senderAddresses)Does the same thing as verifySignature(X509), except that in addition, it checks to make sure that the email address in the given certificate is present in the specified list of sender addresses. |
void |
writeTo(java.io.OutputStream os, java.lang.String mimeType)Writes this SmimeSigned to the given output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SmimeSignedReceipt(SmimeSignedObject smimeSigned,
oracle.security.crypto.cert.X509 signerCert,
javax.mail.Address[] messageRecipientAddresses)
throws oracle.security.crypto.util.InvalidInputException,
ESSException
SmimeSignedReceipt using the signed message containing a receipt request.smimeSigned - A signed message (must not be a signed receipt).signerCert - The signer certificate that will be used to verify the signature.messageRecipientAddresses - Addresses of the message recipient.oracle.security.crypto.util.InvalidInputException - The receipt request attribute encoding was incorrect or multipe receipt request attribute were present or the input signed object is a receipt.ESSException - This message does not require a receipt be generated.
public SmimeSignedReceipt(SmimeSignedObject smimeSigned,
oracle.security.crypto.cert.X509 signerCert,
javax.mail.Address[] messageRecipientAddresses,
MLExpansionHistory mlExpansionHistory)
throws oracle.security.crypto.util.InvalidInputException,
ESSException
SmimeSignedReceipt using the signed message containing a receipt request.smimeSigned - A signed message (must not be a signed receipt).signerCert - The signer certificate that will be used to verify the signature.mlExpansionHistory - The MLExpansionHistory attribute present in the outermost signed-data block or null otherwise.messageRecipientAddresses - Addresses of the message recipient.oracle.security.crypto.util.InvalidInputException - The receipt request attribute encoding was incorrect or multipe receipt request attributes were present.ESSException - This message does not require a receipt be generated.
public SmimeSignedReceipt(SmimeSignedObject smimeObj)
throws oracle.security.crypto.util.InvalidInputException
SmimeSignedReceipt.smimeObj - The SmimeSignedObject containing a receipt.oracle.security.crypto.util.InvalidInputException - The signed object does not contain a receipt.
public SmimeSignedReceipt(oracle.security.crypto.cms.ESSReceipt receipt,
byte[] msgSigDigest,
javax.mail.Address[] receiptsToAddresses)
SmimeSignedReceipt.receipt - The pre-computed receipt to send.
public SmimeSignedReceipt(java.io.InputStream is)
throws java.io.IOException
SmimeSignedReceipt by reading the BER encoding from the specified input stream.is - The input stream.java.io.IOException - The input encoding is not correct or an I/O error occurred.| Method Detail |
public void addCertificate(oracle.security.crypto.cert.X509 cert)
public void addCRL(oracle.security.crypto.cert.CRL crl)
public void addSignature(oracle.security.crypto.core.PrivateKey signerKey,
oracle.security.crypto.cert.X509 signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.SignatureException,
oracle.security.crypto.core.InvalidKeyException
oracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.crypto.core.SignatureExceptionoracle.security.crypto.core.InvalidKeyException
public void addSignature(oracle.security.crypto.core.PrivateKey signerKey,
oracle.security.crypto.cert.X509 signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
java.util.Date timeStamp)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.SignatureException,
oracle.security.crypto.core.InvalidKeyException
oracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.crypto.core.SignatureExceptionoracle.security.crypto.core.InvalidKeyException
public void addSignature(oracle.security.crypto.core.PrivateKey signerKey,
oracle.security.crypto.cert.X509 signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
SmimeCapabilities smimeCaps)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.SignatureException,
oracle.security.crypto.core.InvalidKeyException
oracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.crypto.core.SignatureExceptionoracle.security.crypto.core.InvalidKeyException
public void addSignature(oracle.security.crypto.core.PrivateKey signerKey,
oracle.security.crypto.cert.X509 signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
java.util.Date timeStamp,
SmimeCapabilities smimeCaps)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.SignatureException,
oracle.security.crypto.core.InvalidKeyException
oracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.crypto.core.SignatureExceptionoracle.security.crypto.core.InvalidKeyException
public void addSignature(oracle.security.crypto.core.PrivateKey signerKey,
oracle.security.crypto.cert.X509 signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
oracle.security.crypto.cert.AttributeSet signedAttributes)
throws oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.crypto.core.SignatureException,
oracle.security.crypto.core.InvalidKeyException
oracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.crypto.core.SignatureExceptionoracle.security.crypto.core.InvalidKeyExceptionpublic javax.mail.Address[] getReceiptsToAddresses()
null.public oracle.security.crypto.cms.ESSReceipt getEnclosedReceipt()
public javax.mail.internet.MimeBodyPart getEnclosedBodyPart()
throws oracle.security.crypto.util.InvalidInputException,
javax.mail.MessagingException
getEnclosedBodyPart in interface SmimeSignedObjectMimeBodyPart.oracle.security.crypto.util.InvalidInputExceptionjavax.mail.MessagingExceptionpublic java.util.Vector getCertificates()
null if no list of Certificates is present.getCertificates in interface SmimeSignedObjectVector containing X509 objects or null if no list of certificates is present.public java.util.Vector getCRLs()
null if no list of CRLs is present.getCRLs in interface SmimeSignedObjectVector containing CRL objects or null if no list of CRLs is present.public java.util.Enumeration signers()
CMSSignerInfo.
This method never returns null.
signers in interface SmimeSignedObjectVector containing CMSSignerInfo objects.
public void verifySignature(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
SmimeSignedObjectAuthenticationException.
This method verifies the specified signature directly and ignores any certificates or CRLs which may be contained in this CMS object. A more complex verification process, which does make use of attached certificates and CRLs, is provided by the verify method.
verifySignature in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - if the signature is not valid, or could not be verified for some reason (e.g., the algorithm identifier is unrecognized)oracle.security.crypto.cms.UnknownSignerException - if no signature corresponding to the given certificate exists
public void verifySignature(oracle.security.crypto.cert.X509 signerCert,
javax.mail.Address[] senderAddresses)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
SmimeSignedObjectSmimeSignedObject.verifySignature(X509), except that in addition, it checks to make sure that the email address in the given certificate is present in the specified list of sender addresses.
The list of sender addresses should be obtained by invoking the getFrom() method on the instance of javax.mail.Message which contains this object as its content.
verifySignature in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationExceptionoracle.security.crypto.cms.UnknownSignerException
public void verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy)
throws oracle.security.crypto.core.AuthenticationException
SmimeSignedObjectAuthenticationException.
In order to be considered valid, there must be at least one signature on this CMS message which is validated by one of the certificates included with it; furthermore, the validating certificate must itself be valid according to the given certificate trust policy. This latter validation process may involve examining the other certificates or CRLs included with this object, if called for by the trust policy.
If a signature is encountered for which a certification path can be found, but is invalid, an AuthenticationException will be created, but will not be thrown until all other signatures have been checked. If another signature is found which is valid, then the method simply returns and no exception at all is thrown.
verify in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - if there is no valid signature
public void verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy,
javax.mail.Address[] senderAddresses)
throws oracle.security.crypto.core.AuthenticationException
SmimeSignedObjectSmimeSignedObject.verify(CertificateTrustPolicy), except that in addition, it checks to make sure that the terminating certificate of the validating certificate chain contains an email address which is present in the specified list of sender addresses.
The list of sender addresses should be obtained by invoking the getFrom() method on the instance of javax.mail.Message which contains this object as its content.
verify in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException
public void verifyReceipt(SmimeSignedObject originalSmimeSignedObject,
oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException
oracle.security.crypto.core.AuthenticationException
public ESSSecurityLabel getESSSecurityLabel(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
ESSSecurityLabel if present or null.
The signature of the SignerInfo that covers the ESSSecurityLabel is first verified. Then, it verifies that all the ESSSecurityLabel's in the signed message are identical.
getESSSecurityLabel in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.oracle.security.crypto.cms.UnknownSignerException - No valid security label could be found.
public EquivalentLabels getEquivalentLabels(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
EquivalentLabels if present or null.
The signature of the SignerInfo that covers the EquivalentLabels is first verified. Then, it verifies that all the EquivalentLabels in the signed message are identical.
getEquivalentLabels in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.oracle.security.crypto.cms.UnknownSignerException - No valid equivalent labels could be found.
public SigningCertificate getSigningCertificate(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
SigningCertificate Attribute if present or null.
The signature of the SignerInfo that covers the SigningCertificate is verified.
getSigningCertificate in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.oracle.security.crypto.cms.UnknownSignerException - No valid signing certificate could be found.
public MLExpansionHistory getMLExpansionHistory(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
MLExpansionHistory if present or null.
The signature of the SignerInfo that covers the MLExpansionHistory is first verified. Then, it verifies that all the MLExpansionHistory's in the signed message are identical.
getMLExpansionHistory in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.oracle.security.crypto.cms.UnknownSignerException - No valid mailing list expansion history could be found.
public ReceiptRequest getReceiptRequest(oracle.security.crypto.cert.X509 signerCert)
throws oracle.security.crypto.core.AuthenticationException,
oracle.security.crypto.cms.UnknownSignerException
ReceiptRequest if present or null.
NOTE: RFC 2634 prohibits the presence of a ReceiptRequest attribute in a signed receipt.
The signature of the SignerInfo that covers the ReceiptRequest is first verified. Then, it verifies that all the ReceiptRequest's in the signed message are identical.
getReceiptRequest in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.oracle.security.crypto.cms.UnknownSignerException - No valid receipt request could be found.public java.lang.String generateContentType(boolean useStandardContentTypes)
SmimeObjectgenerateContentType in interface SmimeObjectuseStandardContentTypes - If true the standard content type is generated; If false the experimental content type is generated.public java.lang.String generateContentType()
SmimeObjectgenerateContentType in interface SmimeObject
public void writeTo(java.io.OutputStream os,
java.lang.String mimeType)
throws java.io.IOException,
javax.mail.MessagingException
SmimeSigned to the given output stream. Relevant canonicalizations, such as transforming text line-breaks to CRLF, are applied.writeTo in interface SmimeObjectos - The output stream to which this SmimeEnveloped will be written.mimeType - Ignored.javax.mail.MessagingException - An error occurred while writing the smime message.java.io.IOException - An I/O error occurred.
|
Oracle Security Developer Tools S/MIME Java API Reference 10g (10.1.4.0.1) B28172-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||