Oracle SMIME 6-5
void verify oracle.security.crypto.cert.CertificateTrustPolicy trustPolicy Returns normally if the signed contents include at least one valid signature according
to the specified trust policy, otherwise throws an AuthenticationException.
void verifySignature java.security.cert.X509Certificate signerCert Returns normally if the signed contents contain a signature which can be validated by
the given certificate, otherwise throws an AuthenticationException.
The method can throw a SignatureException, if no signature exists corresponding to the given certificate.
6.3.1.3 The oracle.security.crypto.smime.SmimeSigned Class
The oracle.security.crypto.smime.SmimeSigned class represents an SMIME signed message .implements SmimeSignedObject. You may use this class to
build a new message or parse an existing one.
Constructors and methods include: SmimeSigned javax.mail.internet.MimeBodyPart content
Creates a new SmimeSigned object, using the specified MIME body part for the contents to be signed.
SmimeSigned Creates a new empty SmimeSigned object, which is useful for building a
certificates-only SMIME message.
SmimeSigned InputStream is Creates a new SmimeSigned object by reading its encoding from the specified input
stream.
void addSignature java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID Adds a signature to the message, using the specified private key, certificate, and
message digest algorithm. void addSignature java.security.PrivateKey signerKey,
java.security.cert.X509Certificate signerCert, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
java.util.Date timeStamp Adds a signature to the message, including a time stamp.
void addSignature java.security.PrivateKey signerKey, java.security.cert.X509Certificate signerCert,
oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, SmimeCapabilities smimeCaps
Adds a signature to the message, including SMIME capabilities. javax.mail.internet.MimeBodyPart getEnclosedBodyPart
Returns the MIME body part that was signed. To build a new message, use any of these three constructors:
Create a new SMIME Signed Message SmimeSigned sig = new SmimeSigned;
-OR- Create a new SMIME Signed Message with a specified MIME body part
MimeBodyPart bp = new MimeBodyPart; bp.setTextHello from SendSignedMsg;
SmimeSigned sig1 = new SmimeSignedbp;
-OR-
6-6 Oracle Fusion Middleware Reference for Oracle Security Developer Tools
Create a new SMIME Signed Message with a specified MIME body part and a flag switching compression on or off
MimeBodyPart bp = new MimeBodyPart; bp.setTextHello from SendSignedMsg;
boolean useCompression = true; SmimeSigned sig2 = new SmimeSignedbp, useCompression;
To parse a message, use the constructor that takes a java.io.InputStream: InputStream is = Input stream containing message to be parsed
SmimeSigned sig = new SmimeSignedis;
6.3.1.4 The oracle.security.crypto.smime.SmimeEnveloped Class