Class CleartextSignatureProcessor


  • public class CleartextSignatureProcessor
    extends java.lang.Object
    Processor for cleartext-signed messages.
    • Constructor Detail

      • CleartextSignatureProcessor

        public CleartextSignatureProcessor​(java.io.InputStream inputStream,
                                           ConsumerOptions options)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getVerificationStream

        public DecryptionStream getVerificationStream()
                                               throws java.io.IOException,
                                                      org.bouncycastle.openpgp.PGPException
        Perform the first pass of cleartext signed message processing: Unpack the message from the ascii armor and detach signatures. The plaintext message is being written to cache/disk according to the used MultiPassStrategy. The result of this method is a DecryptionStream which will perform the second pass. It again outputs the plaintext message and performs signature verification. The result of CloseForResultInputStream.getResult() contains information about the messages signatures.
        Returns:
        validated signature
        Throws:
        java.io.IOException - if the signature cannot be read.
        org.bouncycastle.openpgp.PGPException - if the signature cannot be initialized.
        SignatureValidationException - if the signature is invalid.