|
Oracle Security Developer Tools S/MIME Java API Reference 11g (11.1.1) E10672-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.security.crypto.smime.SmimeSigned
public class SmimeSigned
A S/MIME Signed Message.
| Constructor Summary | |
|---|---|
SmimeSigned()Create an empty SmimeSigned. |
|
SmimeSigned(MimeBodyPart content)Create a SmimeSigned. |
|
SmimeSigned(MimeBodyPart content, boolean useCompression)Create a SmimeSigned. |
|
| Method Summary | |
|---|---|
void |
addCertificate(java.security.cert.X509Certificate cert)Add a Certificate. |
void |
addCRL(oracle.security.crypto.cert.CRL crl)Add a CRL. |
void |
addSignature(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID)Add a Signature. |
void |
addSignature(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, oracle.security.crypto.cert.AttributeSet signedAttributes)Add a Signature. |
void |
addSignature(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, java.util.Date timeStamp)Add a Signature. |
void |
addSignature(java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, java.util.Date timeStamp, SmimeCapabilities smimeCaps)Add a Signature. |
void |
addSignature(java.security.PrivateKey signerKey, java.security.cert.X509Certificate 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. |
MimeBodyPart |
getEnclosedBodyPart()Returns the message content that was signed. |
EquivalentLabels |
getEquivalentLabels(java.security.cert.X509Certificate signerCert)Returns the EquivalentLabels if present or null. |
ESSSecurityLabel |
getESSSecurityLabel(java.security.cert.X509Certificate signerCert)Returns the ESSSecurityLabel if present or null. |
MLExpansionHistory |
getMLExpansionHistory(java.security.cert.X509Certificate 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(java.security.cert.X509Certificate signerCert)Returns the ReceiptRequest if present or null. |
SigningCertificate |
getSigningCertificate(java.security.cert.X509Certificate 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, Address[] senderAddresses)Verify the Signature using the specified trust policy and list of email addresses. |
void |
verifySignature(java.security.cert.X509Certificate signerCert)Verify the Signature using the specified certificate. |
void |
verifySignature(java.security.cert.X509Certificate signerCert, 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(MimeBodyPart content)
throws MessagingException,
java.io.IOException
SmimeSigned.
content - The message content.MessagingException - An error occurred while setting the message content.java.io.IOException - The message content is empty.
public SmimeSigned(MimeBodyPart content,
boolean useCompression)
throws MessagingException,
java.io.IOException
SmimeSigned.
content - The message content.useCompression - Indicate if the content must be compressed.MessagingException - An error occurred while setting the message content.java.io.IOException - The message content is empty.| Method Detail |
|---|
public void addCertificate(java.security.cert.X509Certificate cert)
Note the change in the method signature
Previously : public void addCertificate (X509)
Now : public void addCertificate (X509Certificate )
cert - The X509 certificate.public void addCRL(oracle.security.crypto.cert.CRL crl)
crl - The CRL.
public void addSignature(java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID)
throws java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException,
java.io.IOException
The contentType and messageDigest must not be present in the AttributeSet signedAttributes.
Note the changes in the method signature
Previously :public void addSignature (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier)
Now :public void addSignature (java.security.PrivateKey , X509Certificate , AlgorithmIdentifier )
Note the changes in the exceptions
Exceptions introduced --NoSuchAlgorithmException, IOException,CertificateEncodingException,java.security.InvalidKeyException, java.security.SignatureException
Exceptions no longer thrown-- AlgorithmIdentifierException , oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.signatureException
signerKey - The private key of the signer.signerCert - The X509 certificate of the signer.digestAlgID - The digest algorithm.java.security.NoSuchAlgorithmException - The digest or signature algorithm is not supported.java.security.SignatureException - An error occurred during signature generation.java.security.InvalidKeyException - The private key is not valid.java.security.cert.CertificateEncodingException - Specifies an encoding errorjava.io.IOException - Input/Output Exception while instantiating X509 from an inputstream
public void addSignature(java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
java.util.Date timeStamp)
throws java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException,
java.io.IOException
The contentType and messageDigest must not be present in the AttributeSet signedAttributes.
Note the changes in the method signature
Previously :public void addSignature (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier ,Date)
Now :public void addSignature (java.security.PrivateKey , X509Certificate , AlgorithmIdentifier,Date )
Note the changes in the exceptions
Exceptions introduced --NoSuchAlgorithmException, IOException,CertificateEncodingException,java.security.InvalidKeyException, java.security.SignatureException
Exceptions no longer thrown-- AlgorithmIdentifierException , oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.signatureException
signerKey - The private key of the signer.signerCert - The X509 certificate of the signer.digestAlgID - The digest algorithm.timeStamp - The Signing Time.java.security.NoSuchAlgorithmException - The digest or signature algorithm is not supported.java.security.SignatureException - An error occurred during signature generation.java.security.InvalidKeyException - The private key is not valid.java.security.cert.CertificateEncodingException - Specifies an encoding errorjava.io.IOException - Input/Output Exception while instantiating X509 from an inputstream
public void addSignature(java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
SmimeCapabilities smimeCaps)
throws java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException,
java.io.IOException
The contentType and messageDigest must not be present in the AttributeSet signedAttributes.
Note the changes in the method signature
Previously :public void addSignature (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier ,SmimeCapabilities)
Now :public void addSignature (java.security.PrivateKey , X509Certificate , AlgorithmIdentifier,SmimeCapabilities )
Note the changes in the exceptions
Exceptions introduced --NoSuchAlgorithmException, IOException,CertificateEncodingException,java.security.InvalidKeyException, java.security.SignatureException
Exceptions no longer thrown-- AlgorithmIdentifierException , oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.signatureException
signerKey - The private key of the signer.signerCert - The X509 certificate of the signer.digestAlgID - The digest algorithm.smimeCaps - The Smime Capabilities.java.security.NoSuchAlgorithmException - The digest or signature algorithm is not supported.java.security.SignatureException - An error occurred during signature generation.java.security.InvalidKeyException - The private key is not valid.java.security.cert.CertificateEncodingException - Specifies an encoding errorjava.io.IOException - Input/Output Exception while instantiating X509 from an inputstream
public void addSignature(java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
java.util.Date timeStamp,
SmimeCapabilities smimeCaps)
throws java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException,
java.io.IOException
The contentType and messageDigest must not be present in the AttributeSet signedAttributes.
Note the changes in the method signature
Previously :public void addSignature (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier ,Date, SmimeCapabilities) p> Now :public void addSignature (java.security.PrivateKey , X509Certificate , AlgorithmIdentifier,Date, SmimeCapabilities )
Note the changes in the exceptions
Exceptions introduced --NoSuchAlgorithmException, IOException,CertificateEncodingException,java.security.InvalidKeyException, java.security.SignatureException
Exceptions no longer thrown-- AlgorithmIdentifierException , oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.signatureException
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.java.security.NoSuchAlgorithmException - The digest or signature algorithm is not supported.java.security.SignatureException - An error occurred during signature generation.java.security.InvalidKeyException - The private key is not valid.java.security.cert.CertificateEncodingException - Specifies an encoding errorjava.io.IOException - Input/Output Exception while instantiating X509 from an inputstream
public void addSignature(java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
oracle.security.crypto.cert.AttributeSet signedAttributes)
throws java.security.InvalidKeyException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.io.IOException,
java.security.cert.CertificateEncodingException
The contentType, messageDigest, signingTime and smimeCapabilities must not be present in the AttributeSet signedAttributes.
Note the changes in the method signature
Previously :public void addSignature (oracle.security.crypto.core.PrivateKey , X509, AlgorithmIdentifier ,AttributeSet) p> Now :public void addSignature (java.security.PrivateKey , X509Certificate , AlgorithmIdentifier,AttributeSet)
Note the changes in the exceptions
Exceptions introduced --NoSuchAlgorithmException, IOException,CertificateEncodingException,java.security.InvalidKeyException, java.security.SignatureException
Exceptions no longer thrown-- AlgorithmIdentifierException , oracle.security.crypto.core.InvalidKeyException, oracle.security.crypto.core.signatureException
signerKey - The private key of the signer.signerCert - The X509 certificate of the signer.digestAlgID - The digest algorithm.signedAttributes - The set of signed attributes.java.security.NoSuchAlgorithmException - The digest or signature algorithm is not supported.java.security.SignatureException - An error occurred during signature generation.java.security.InvalidKeyException - The private key is not valid.java.security.cert.CertificateEncodingException - Specifies an encoding errorjava.io.IOException - Input/Output Exception while instantiating X509 from an inputstreampublic oracle.security.crypto.cms.ESSReceipt getReceipt()
ESSReceipt if present or null otherwise.
public MimeBodyPart getEnclosedBodyPart()
throws oracle.security.crypto.util.InvalidInputException,
MessagingException
getEnclosedBodyPart in interface SmimeSignedObjectMimeBodyPart.oracle.security.crypto.util.InvalidInputException - The message content type is not correct.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 SmimeSignedObjectVector containing X509Certificate objects or null if no list of certificates is present.public java.util.Vector getCRLs()
getCRLs in interface SmimeSignedObjectVector containing CRL objects or null if no list of CRLs is present.public java.util.Enumeration signers()
signers in interface SmimeSignedObjectVector containing CMSSignerInfo objects.
public void verifySignature(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
Note the changes in the method signature
Previously :public void verifySignature (X509) p> Now :public void verifySignature (X509Certificate )
verifySignature in interface SmimeSignedObjectsignerCert - The X509 certificate.oracle.security.crypto.core.AuthenticationException - Signature verification failed.java.security.SignatureException - The specified certificate does not belong to any of the message signers.
public void verifySignature(java.security.cert.X509Certificate signerCert,
Address[] senderAddresses)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
Note the changes in the method signature
Previously :public void verifySignature (X509,Address[])
Now :public void verifySignature (X509Certificate ,Address[])
verifySignature in interface SmimeSignedObjectsignerCert - 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.java.security.SignatureException - 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 SmimeSignedObjecttrustPolicy - The certificate trust policy.oracle.security.crypto.core.AuthenticationException - Signature verification failed.
public void verify(oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy,
Address[] senderAddresses)
throws oracle.security.crypto.core.AuthenticationException
verify in interface SmimeSignedObjectsignerCert - The certificate trust policy.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(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
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.
Note the changes in the method signature
Previously : public ESSSecurityLabel getESSSecurityLabel(X509)
Now : public ESSSecurityLabel getESSSecurityLabel(X509Certificate )
getESSSecurityLabel in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.java.security.SignatureException - No valid security label could be found.
public EquivalentLabels getEquivalentLabels(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
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.
Note the changes in the method signature
Previously : public EquivalentLabels getEquivalentLabels(X509)
Now : public EquivalentLabels getEquivalentLabels(X509Certificate )
getEquivalentLabels in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.java.security.SignatureException - No valid equivalent labels could be found.
public SigningCertificate getSigningCertificate(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
SigningCertificate Attribute if present or null.
The signature of the SignerInfo that covers the SigningCertificate is verified.
Note the changes in the method signature
Previously : public SigningCertificate getSigningCertificate (X509)
Now : public SigningCertificate getSigningCertificate (X509Certificate )
getSigningCertificate in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.java.security.SignatureException - No valid signing certificate could be found.
public MLExpansionHistory getMLExpansionHistory(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
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.
Note the changes in the method signature
Previously : public MLExpansionHistory getMLExpansionHistory(X509)
Now : public MLExpansionHistory getMLExpansionHistory(X509Certificate )
getMLExpansionHistory in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.java.security.SignatureException - No valid mailing list expansion history could be found.
public ReceiptRequest getReceiptRequest(java.security.cert.X509Certificate signerCert)
throws oracle.security.crypto.core.AuthenticationException,
java.security.SignatureException
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.
Note the changes in the method signature
Previously : public ReceiptRequest getReceiptRequest(X509)
Now : public ReceiptRequest getReceiptRequest(X509Certificate )
getReceiptRequest in interface SmimeSignedObjectoracle.security.crypto.core.AuthenticationException - Signature verification did not succeed on any SignerInfo.java.security.SignatureException - No valid receipt request could be found.public java.lang.String generateContentType(boolean useStandardContentTypes)
generateContentType in interface SmimeObjectuseStandardContentTypes - 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,
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.java.io.IOException - An I/O error occurred.MessagingException - An error occurred while writing the smime message.
|
Oracle Security Developer Tools S/MIME Java API Reference 11g (11.1.1) E10672-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||