aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2018-05-25 13:38:27 -0400
committerBryn M. Reeves <bmr@redhat.com>2018-07-12 14:36:39 +0100
commit7b475f1da0f843b20437896737be04cc1c7bbc0a (patch)
tree82d3040f2a793a5033c3e988c94eb0003a37e05c /tests
parent0a76861b9690889b59a95161af473e62c962c787 (diff)
downloadsos-7b475f1da0f843b20437896737be04cc1c7bbc0a.tar.gz
[sosreport] Add mechanism to encrypt final archive
Adds an option to encrypt the resulting archive that sos generates. There are two methods for doing so: --encrypt-key Uses a key-pair for asymmetric encryption --encrypt-pass Uses a password for symmetric encryption For key-pair encryption, the key-to-be-used must be imported into the root user's keyring, as gpg does not allow for the use of keyfiles. If the encryption process fails, sos will not abort as the unencrypted archive will have already been created. The assumption being that the archive is still of use and/or the user has another means of encrypting it. Resolves: #1320 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/archive_tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/archive_tests.py b/tests/archive_tests.py
index b4dd8d0f..e5b329b5 100644
--- a/tests/archive_tests.py
+++ b/tests/archive_tests.py
@@ -19,7 +19,8 @@ class TarFileArchiveTest(unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp()
- self.tf = TarFileArchive('test', self.tmpdir, Policy(), 1)
+ enc = {'encrypt': False}
+ self.tf = TarFileArchive('test', self.tmpdir, Policy(), 1, enc)
def tearDown(self):
shutil.rmtree(self.tmpdir)