diff options
author | Justus Winter <justus@g10code.com> | 2016-07-05 14:29:29 +0200 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-07-05 15:18:30 +0200 |
commit | 0b8a3358798b7028be872a923da2e275da67d592 (patch) | |
tree | 38b106f8ac507ab1d81839836ebae371626351ce /tests | |
parent | g10: Fix out-of-bounds read. (diff) | |
download | gnupg2-0b8a3358798b7028be872a923da2e275da67d592.tar.xz gnupg2-0b8a3358798b7028be872a923da2e275da67d592.zip |
tools/gpgtar: Provide --create and --extract.
* tools/gpgtar.c (cmd_and_opt_values): New values.
(opts): New actions.
(parse_arguments): Handle new actions.
* tests/openpgp/gpgtar.scm: Test new interface.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/openpgp/gpgtar.scm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/openpgp/gpgtar.scm b/tests/openpgp/gpgtar.scm index d406079f5..07f2fd7f7 100755 --- a/tests/openpgp/gpgtar.scm +++ b/tests/openpgp/gpgtar.scm @@ -47,7 +47,6 @@ (with-temporary-working-directory (call-check `(,(tool 'gpgtar) --gpg ,(tool 'gpg) --gpg-args ,gpgargs --tar-args --directory=. - --decrypt ,@extract-flags ,archive)) @@ -57,17 +56,21 @@ testfiles)))) (info "Checking gpgtar without encryption") -(do-test `(--skip-crypto --encrypt) '(--skip-crypto) '(--skip-crypto)) +(do-test '(--skip-crypto --encrypt) '(--skip-crypto) + '(--skip-crypto --decrypt)) + +(info "Checking gpgtar without encryption with nicer actions") +(do-test '(--create) '(--skip-crypto) '(--extract)) (info "Checking gpgtar with asymmetric encryption") -(do-test `(--encrypt --recipient ,usrname2) '() '()) +(do-test `(--encrypt --recipient ,usrname2) '() '(--decrypt)) (info "Checking gpgtar with asymmetric encryption and signature") (do-test `(--encrypt --recipient ,usrname2 --sign --local-user ,usrname3) - '() '()) + '() '(--decrypt)) (info "Checking gpgtar with signature") -(do-test `(--sign --local-user ,usrname3) '() '()) +(do-test `(--sign --local-user ,usrname3) '() '(--decrypt)) (lettmp (passphrasefile) (letfd ((fd (open passphrasefile (logior O_WRONLY O_CREAT O_BINARY) #o600))) @@ -76,13 +79,14 @@ (let ((ppflags `(--gpg-args ,(string-append "--passphrase-file=" passphrasefile)))) (info "Checking gpgtar with symmetric encryption") - (do-test `(,@ppflags --symmetric) ppflags ppflags) + (do-test `(,@ppflags --symmetric) ppflags (cons '--decrypt ppflags)) (info "Checking gpgtar with symmetric encryption and chosen cipher") (do-test `(,@ppflags --symmetric --gpg-args ,(string-append "--cipher=" (car all-cipher-algos))) - ppflags ppflags) + ppflags (cons '--decrypt ppflags)) (info "Checking gpgtar with both symmetric and asymmetric encryption") (do-test `(,@ppflags --symmetric --encrypt --recipient ,usrname2 - --sign --local-user ,usrname3) ppflags ppflags))) + --sign --local-user ,usrname3) + ppflags (cons '--decrypt ppflags)))) |