Class SignedMailValidator

java.lang.Object
org.bouncycastle.mail.smime.validator.SignedMailValidator

public class SignedMailValidator extends Object
  • Constructor Details

    • SignedMailValidator

      public SignedMailValidator(javax.mail.internet.MimeMessage message, PKIXParameters param) throws SignedMailValidatorException
      Validates the signed MimeMessage message. The PKIXParameters from param are used for the certificate path validation. The actual PKIXParameters used for the certificate path validation is a copy of param with the followin changes:
      - The validation date is changed to the signature time
      - A CertStore with certificates and crls from the mail message is added to the CertStores.

      In param it's also possible to add additional CertStores with intermediate Certificates and/or CRLs which then are also used for the validation.
      Parameters:
      message - the signed MimeMessage
      param - the parameters for the certificate path validation
      Throws:
      SignedMailValidatorException - if the message is no signed message or if an exception occurs reading the message
    • SignedMailValidator

      public SignedMailValidator(javax.mail.internet.MimeMessage message, PKIXParameters param, Class certPathReviewerClass) throws SignedMailValidatorException
      Validates the signed MimeMessage message. The PKIXParameters from param are used for the certificate path validation. The actual PKIXParameters used for the certificate path validation is a copy of param with the followin changes:
      - The validation date is changed to the signature time
      - A CertStore with certificates and crls from the mail message is added to the CertStores.

      In param it's also possible to add additional CertStores with intermediate Certificates and/or CRLs which then are also used for the validation.
      Parameters:
      message - the signed MimeMessage
      param - the parameters for the certificate path validation
      certPathReviewerClass - a subclass of PKIXCertPathReviewer. The SignedMailValidator uses objects of this type for the cert path vailidation. The class must have an empty constructor.
      Throws:
      SignedMailValidatorException - if the message is no signed message or if an exception occurs reading the message
      IllegalArgumentException - if the certPathReviewerClass is not a subclass of PKIXCertPathReviewer or objects of certPathReviewerClass can not be instantiated
  • Method Details