make tarfile.py error out on invalid crypto modes and combos
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 24 Feb 2017 09:50:03 +0000 (10:50 +0100)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 24 Feb 2017 09:50:34 +0000 (10:50 +0100)
commitcc06e5f0e8724d7e5664b1232f5244334e1fa1fb
tree22a006707b6cc1c7aa85e3f89e5ded727300c45d
parenta513b9d9695717937bf5596d537ee142067816c4
make tarfile.py error out on invalid crypto modes and combos

The tarfile stream ctor will simply gloss over encryption
requested by the caller unless it happens to exactly match the
string (!) “aes”. Furthermore, with non-gzip compression the
encryption will be ignored altogether.

Instead of deceiving the user about the encryption being applied,
have the ctor fail immediately on invalid combinations.
deltatar/tarfile.py