leehaut opened a new pull request, #9319: URL: https://github.com/apache/hop/pull/9319
Fix https://github.com/apache/hop/issues/9207 The PGP encrypt and decrypt workflow actions did not match the labels of the "if the destination exists" options, counted one folder failure twice, and could not sign a key that needs a passphrase. A missing GnuPG program on decrypt also aborted the workflow instead of following the error hop. - **Create file with unique name** now writes the encrypted or signed data to the new file. The existing destination is left unchanged, and the new file is the result file. - **Delete source file** encrypts or decrypts into the existing destination, then deletes the source. - **Move source file to folder** encrypts or decrypts into the existing destination, then moves the source. The result file is the encrypted or decrypted destination, not the moved source. - **Do nothing** still leaves an existing destination unchanged and does not add it. A destination that does not exist yet is created and, when requested, added to the result files. - A folder stops at the file that breaks the success condition, and that failure counts as one error. The success comparison is unchanged: "number of errors lesser than" is still met when `nrErrors <= limit`. - A missing or unusable GPG location on decrypt returns false and follows the error hop. The "GPG file not found" message includes the path. - **Sign** and **Sign and encrypt** take a passphrase. It is sent to GnuPG on standard input with `--pinentry-mode loopback` and `--passphrase-fd 0`, never on the command line. An empty passphrase does not add those arguments. The value is stored encrypted in the action XML and can be supplied as the seventh field of a previous-result row. ## Test plan - [x] `mvn -pl plugins/actions/pgpfiles test` (UI tests stay excluded by the `uitest` group) - [x] Unique name: existing destination kept, a new dated file written, that new file in the result - [x] Delete source: destination overwritten with the encrypted or decrypted output, source removed - [x] Move source: destination is the encrypted or decrypted output; the moved file is the source; the result file is the destination - [x] Do nothing on a new file adds that file; do nothing on an existing file writes nothing and adds no result file - [x] A folder with "errors lesser than 1" and one real failure finishes true with `Errors = 1` - [x] Decrypt with a missing GPG program follows the error hop and the workflow continues - [x] Sign and sign-and-encrypt with passphrase `secret` against a locked key; confirm the passphrase is not on the GnuPG command line -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
