|
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.SmimeSigned
A S/MIME Signed Message.
Constructor Summary | |
SmimeSigned() Create an empty SmimeSigned . |
|
SmimeSigned(java.io.InputStream is) Create a SmimeSigned . |
|
SmimeSigned(javax.mail.internet.MimeBodyPart content) Create a SmimeSigned . |
|
SmimeSigned(javax.mail.internet.MimeBodyPart content, boolean useCompression) Create a SmimeSigned . |
Method Summary | |
void |
addCertificate(oracle.security.crypto.cert.X509 cert) Add a Certificate. |
void |
addCRL(oracle.security.crypto.cert.CRL crl) Add a CRL. |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID) Add a Signature. |
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) Add a Signature. |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, java.util.Date timeStamp) Add a Signature. |
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) Add a Signature. |
void |
addSignature(oracle.security.crypto.core.PrivateKey signerKey, oracle.security.crypto.cert.X509 signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, SmimeCapabilities smimeCaps) Add a Signature. |
java.lang.String |
generateContentType() Returns the content type. |
java.lang.String |
generateContentType(boolean useStandardContentTypes) Returns the content type. |
java.util.Vector |
getCertificates() Returns the list of X509 certificates included with this signed data object. |
java.util.Vector |
getCRLs() Returns the list of CRLs included with this signed data object. |
javax.mail.internet.MimeBodyPart |
getEnclosedBodyPart() Returns the message content that was signed. |
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 . |
oracle.security.crypto.cms.ESSReceipt |
getReceipt() Returns the Receipt if this object is a signed receipt. |
ReceiptRequest |
getReceiptRequest(oracle.security.crypto.cert.X509 signerCert) Returns the ReceiptRequest if present or null . |
SigningCertificate |
getSigningCertificate(oracle.security.crypto.cert.X509 signerCert) Returns the SigningCertificate Attribute if present or null . |
boolean |
isSignedReceipt() Indicates if this Object is a signed receipt. |
java.util.Enumeration |
signers() Returns the list of signers. |
void |
verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy) Verify the Signature using the specified trust policy. |
void |
verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy, javax.mail.Address[] senderAddresses) Verify the Signature using the specified trust policy and list of email addresses. |
void |
verifySignature(oracle.security.crypto.cert.X509 signerCert) Verify the Signature using the specified certificate. |
void |
verifySignature(oracle.security.crypto.cert.X509 signerCert, javax.mail.Address[] senderAddresses) Verify the Signature using the specified certificate and list of email 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 SmimeSigned()
SmimeSigned
.public SmimeSigned(javax.mail.internet.MimeBodyPart content) throws javax.mail.MessagingException, java.io.IOException
SmimeSigned
.content
- The message content.javax.mail.MessagingException
- An error occurred while setting the message content.java.io.IOException
- The message content is empty.public SmimeSigned(javax.mail.internet.MimeBodyPart content, boolean useCompression) throws javax.mail.MessagingException, java.io.IOException
SmimeSigned
.content
- The message content.useCompression
- Indicate if the content must be compressed.javax.mail.MessagingException
- An error occurred while setting the message content.java.io.IOException
- The message content is empty.public SmimeSigned(java.io.InputStream is) throws java.io.IOException
SmimeSigned
.is
- The input stream.java.io.IOException
- An I/O error occurred or the input encoding was incorrect.Method Detail |
public void addCertificate(oracle.security.crypto.cert.X509 cert)
cert
- The X509 certificate.public void addCRL(oracle.security.crypto.cert.CRL crl)
crl
- The 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.InvalidKeyException, oracle.security.crypto.core.SignatureException, oracle.security.crypto.core.AlgorithmIdentifierException
signerKey
- The private key of the signer.signerCert
- The X509 certificate of the signer.digestAlgID
- The digest algorithm.oracle.security.crypto.core.AlgorithmIdentifierException
- The digest or signature algorithm is not supported.oracle.security.crypto.core.SignatureException
- An error occurred during signature generation.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.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.InvalidKeyException, oracle.security.crypto.core.SignatureException, oracle.security.crypto.core.AlgorithmIdentifierException
signerKey
- The private key of the signer.signerCert
- The X509 certificate of the signer.digestAlgID
- The digest algorithm.timeStamp
- The Signing Time.oracle.security.crypto.core.AlgorithmIdentifierException
- The digest or signature algorithm is not supported.oracle.security.crypto.core.SignatureException
- An error occurred during signature generation.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.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.InvalidKeyException, oracle.security.crypto.core.SignatureException, oracle.security.crypto.core.AlgorithmIdentifierException
signerKey
- The private key of the signer.signerCert
- The X509 certificate of the signer.digestAlgID
- The digest algorithm.smimeCaps
- The Smime Capabilities.oracle.security.crypto.core.AlgorithmIdentifierException
- The digest or signature algorithm is not supported.oracle.security.crypto.core.SignatureException
- An error occurred during signature generation.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.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.InvalidKeyException, oracle.security.crypto.core.SignatureException, oracle.security.crypto.core.AlgorithmIdentifierException
signerKey
- The private key of the signer.signerCert
- The X509 certificate of the signer.digestAlgID
- The digest algorithm.timeStamp
- The Signing Time.smimeCaps
- The Smime Capabilities.oracle.security.crypto.core.AlgorithmIdentifierException
- The digest or signature algorithm is not supported.oracle.security.crypto.core.SignatureException
- An error occurred during signature generation.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.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.InvalidKeyException, oracle.security.crypto.core.SignatureException, oracle.security.crypto.core.AlgorithmIdentifierException
The contentType, messageDigest, signingTime and smimeCapabilities must not be present in the AttributeSet signedAttributes.
signerKey
- The private key of the signer.signerCert
- The X509 certificate of the signer.digestAlgID
- The digest algorithm.signedAttributes
- The set of signed attributes.oracle.security.crypto.core.AlgorithmIdentifierException
- The digest or signature algorithm is not supported.oracle.security.crypto.core.SignatureException
- An error occurred during signature generation.oracle.security.crypto.core.InvalidKeyException
- The private key is not valid.public oracle.security.crypto.cms.ESSReceipt getReceipt()
ESSReceipt
if present or null
otherwise.public javax.mail.internet.MimeBodyPart getEnclosedBodyPart() throws oracle.security.crypto.util.InvalidInputException, javax.mail.MessagingException
getEnclosedBodyPart
in interface SmimeSignedObject
MimeBodyPart
.oracle.security.crypto.util.InvalidInputException
- The message content type is not correct.javax.mail.MessagingException
- An error occurred while initializing the content.public boolean isSignedReceipt()
If the S/MIME message content type parameters are missing, it will be treated as a signed message but the data content handler.
true
this object is wrapped; false
otherwise.public java.util.Vector getCertificates()
getCertificates
in interface SmimeSignedObject
Vector
containing X509
objects or null
if no list of certificates is present.public java.util.Vector getCRLs()
getCRLs
in interface SmimeSignedObject
Vector
containing CRL
objects or null
if no list of CRLs is present.public java.util.Enumeration signers()
signers
in interface SmimeSignedObject
Vector
containing CMSSignerInfo
objects.public void verifySignature(oracle.security.crypto.cert.X509 signerCert) throws oracle.security.crypto.core.AuthenticationException, oracle.security.crypto.cms.UnknownSignerException
verifySignature
in interface SmimeSignedObject
signerCert
- The X509 certificate.oracle.security.crypto.core.AuthenticationException
- Signature verification failed.oracle.security.crypto.cms.UnknownSignerException
- The specified certificate does not belong to any of the message signers.public void verifySignature(oracle.security.crypto.cert.X509 signerCert, javax.mail.Address[] senderAddresses) throws oracle.security.crypto.core.AuthenticationException, oracle.security.crypto.cms.UnknownSignerException
verifySignature
in interface SmimeSignedObject
signerCert
- The X509 certificate.oracle.security.crypto.core.AuthenticationException
- Signature verification failed or the email address in the certificate did not match any in the email address list.oracle.security.crypto.cms.UnknownSignerException
- The specified certificate does not belong to any of the message signers.public void verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy) throws oracle.security.crypto.core.AuthenticationException
verify
in interface SmimeSignedObject
trustPolicy
- The certificate trust policy.oracle.security.crypto.core.AuthenticationException
- Signature verification failed.public void verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy, javax.mail.Address[] senderAddresses) throws oracle.security.crypto.core.AuthenticationException
verify
in interface SmimeSignedObject
oracle.security.crypto.core.AuthenticationException
- Signature verification failed or the email address in the certificate did not match any in the email address list.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 SmimeSignedObject
oracle.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 SmimeSignedObject
oracle.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 SmimeSignedObject
oracle.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 SmimeSignedObject
oracle.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
.
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 SmimeSignedObject
oracle.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)
generateContentType
in interface SmimeObject
useStandardContentTypes
- If true
the standard content type is generated; If false
the experimental content type is generated.public java.lang.String generateContentType()
generateContentType
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 SmimeObject
os
- 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 |