aboutsummaryrefslogtreecommitdiffstats
path: root/common/iobuf.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-01-24 12:45:05 +0000
committerWerner Koch <[email protected]>2018-01-24 12:45:05 +0000
commitff1bdc23d9f1693c1add7c1fe8d218b7bf743e31 (patch)
treeb4d831af02681bd7cbf7531d9a1d3eb9cd39e8e0 /common/iobuf.h
parentgpg: Rename a variable in decrypt-data for clarity. (diff)
downloadgnupg-ff1bdc23d9f1693c1add7c1fe8d218b7bf743e31.tar.gz
gnupg-ff1bdc23d9f1693c1add7c1fe8d218b7bf743e31.zip
gpg: Fix AEAD encryption for chunk sizes other than 64 KiB.
* g10/cipher-aead.c (do_flush): Init ERR. Fix remaining chunklen computation. (do_free): Add dummy encryption. Close the cipher handle. * g10/decrypt-data.c (aead_underflow): Rewrite. -- Until we have integrated test into the test suite extensive tests can also be done with a script like this: --8<---------------cut here---------------start------------->8--- #!/bin/sh set -e GPG="../g10/gpg --rfc4880bis --pinentry-mode=loopback" GPG="$GPG --passphrase abc --batch" MKTDATA="$HOME/b/gnupg-2.0/tools/mk-tdata" for chunksize in 6 7 12 13 14 30; do for count in $(seq 1 200) $(seq 8100 8200) \ $(seq 16350 16400) $(seq 20000 20100); do if [ ! -f "testfile-$count" ]; then $MKTDATA $count >"testfile-$count" fi echo "testing chunk size 2^$chunksize with $count bytes" $GPG --force-aead --aead-algo ocb --s2k-mode 0 --cipher AES -v -z 0 \ -c --chunk-size $chunksize \ <"testfile-$count" >"testfile-$count.gpg" 2>/dev/null $GPG -vd <"testfile-$count.gpg" >"testfile-$count.out" 2>/dev/null if ! cmp "testfile-$count" "testfile-$count.out"; then echo "FAILED comparing count $count" >&2 exit 1 fi done done echo All good --8<---------------cut here---------------end--------------->8--- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/iobuf.h')
0 files changed, 0 insertions, 0 deletions