Package org.shredzone.acme4j.smime.email
Klasse EmailProcessor.Builder
java.lang.Object
org.shredzone.acme4j.smime.email.EmailProcessor.Builder
- Umschließende Klasse:
EmailProcessor
A builder for
EmailProcessor
.
Use EmailProcessor.builder()
to generate an instance.
- Seit:
- 2.16
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild
(jakarta.mail.Message message) Builds anEmailProcessor
for the givenMessage
using the current configuration.caCerts()
Uses the standard cacerts truststore for signature verification.certificate
(X509Certificate certificate) Uses the given certificate for signature verification.mailSession
(jakarta.mail.Session session) Uses the given mailSession
for accessing the signed message body.pkixParameters
(PKIXParameters param) Uses the givenPKIXParameters
.relaxed()
Performs relaxed checks.Skips signature and header verification.strict()
Performs strict checks.trustStore
(KeyStore trustStore) Uses the given truststore for signature verification.
-
Methodendetails
-
skipVerification
Skips signature and header verification. Use only if the message has already been verified in a previous stage (e.g. by the MTA) or for testing purposes. -
caCerts
Uses the standard cacerts truststore for signature verification. This is the default. -
trustStore
Uses the given truststore for signature verification.This is for self-signed certificates. No revocation checks will take place.
- Parameter:
trustStore
-KeyStore
of the truststore to be used.
-
certificate
Uses the given certificate for signature verification.This is for self-signed certificates. No revocation checks will take place.
- Parameter:
certificate
-X509Certificate
of the CA
-
pkixParameters
Uses the givenPKIXParameters
.- Parameter:
param
-PKIXParameters
to be used for signature verification.
-
mailSession
Uses the given mailSession
for accessing the signed message body. A simple default session is used otherwise, which is usually sufficient.- Parameter:
session
-Session
to be used for accessing the message body.
-
strict
Performs strict checks. Secured headers must exactly match their unsecured counterparts. This is the default. -
relaxed
Performs relaxed checks. Secured headers might differ in whitespaces or case of the field names. Use this if your MTA has mangled the envelope header. -
build
Builds anEmailProcessor
for the givenMessage
using the current configuration.- Parameter:
message
-Message
to create anEmailProcessor
for.- Gibt zurück:
- The generated
EmailProcessor
- Löst aus:
AcmeInvalidMessageException
- if the message fails to be verified. If this exception is thrown, the message MUST be rejected, and MUST NOT be used for certification.
-