Package network.oxalis.as2.util
Class SMimeMessageFactory
- java.lang.Object
-
- network.oxalis.as2.util.SMimeMessageFactory
-
public class SMimeMessageFactory extends Object
Creates signed Mime messages
-
-
Constructor Summary
Constructors Constructor Description SMimeMessageFactory(PrivateKey privateKey, X509Certificate ourCertificate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.mail.internet.MimeMessagecreateSignedMimeMessage(InputStream inputStream, javax.activation.MimeType mimeType, SMimeDigestMethod digestMethod)Creates a new S/MIME message having the supplied MimeType as the "content-type"javax.mail.internet.MimeMessagecreateSignedMimeMessage(String msg, javax.activation.MimeType mimeType, SMimeDigestMethod digestMethod)Creates an S/MIME message from the supplied String, having the supplied MimeType as the "content-type".javax.mail.internet.MimeMessagecreateSignedMimeMessage(javax.mail.internet.MimeBodyPart mimeBodyPart, SMimeDigestMethod digestMethod)Creates an S/MIME message using the supplied MimeBodyPart.javax.mail.internet.MimeMessagecreateSignedMimeMessageNew(javax.mail.internet.MimeBodyPart mimeBodyPart, network.oxalis.vefa.peppol.common.model.Digest digest, SMimeDigestMethod digestMethod)
-
-
-
Constructor Detail
-
SMimeMessageFactory
@Inject public SMimeMessageFactory(PrivateKey privateKey, X509Certificate ourCertificate)
-
-
Method Detail
-
createSignedMimeMessage
public javax.mail.internet.MimeMessage createSignedMimeMessage(String msg, javax.activation.MimeType mimeType, SMimeDigestMethod digestMethod) throws network.oxalis.api.lang.OxalisTransmissionException
Creates an S/MIME message from the supplied String, having the supplied MimeType as the "content-type".- Parameters:
msg- holds the payload of the messagemimeType- the MIME type to be used as the "Content-Type"- Throws:
network.oxalis.api.lang.OxalisTransmissionException
-
createSignedMimeMessage
public javax.mail.internet.MimeMessage createSignedMimeMessage(InputStream inputStream, javax.activation.MimeType mimeType, SMimeDigestMethod digestMethod) throws network.oxalis.api.lang.OxalisTransmissionException
Creates a new S/MIME message having the supplied MimeType as the "content-type"- Throws:
network.oxalis.api.lang.OxalisTransmissionException
-
createSignedMimeMessage
public javax.mail.internet.MimeMessage createSignedMimeMessage(javax.mail.internet.MimeBodyPart mimeBodyPart, SMimeDigestMethod digestMethod) throws network.oxalis.api.lang.OxalisTransmissionExceptionCreates an S/MIME message using the supplied MimeBodyPart. The signature is generated using the private key as supplied in the constructor. Our certificate, which is required to verify the signature is enclosed.- Throws:
network.oxalis.api.lang.OxalisTransmissionException
-
createSignedMimeMessageNew
public javax.mail.internet.MimeMessage createSignedMimeMessageNew(javax.mail.internet.MimeBodyPart mimeBodyPart, network.oxalis.vefa.peppol.common.model.Digest digest, SMimeDigestMethod digestMethod) throws network.oxalis.api.lang.OxalisTransmissionException- Throws:
network.oxalis.api.lang.OxalisTransmissionException
-
-