diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-11-22 17:55:10 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-29 14:50:51 +0100 |
commit | a1f260d021bf5d018e634438fde6b7c81ebbbcef (patch) | |
tree | 29f979f42913f804514f92ada0cb953fdb6d095f /ipatests/test_ipapython/test_secrets.py | |
parent | 8e5d2c7014ff6371a3b306e666c301aea1f7a488 (diff) | |
download | freeipa-a1f260d021bf5d018e634438fde6b7c81ebbbcef.tar.gz freeipa-a1f260d021bf5d018e634438fde6b7c81ebbbcef.tar.xz freeipa-a1f260d021bf5d018e634438fde6b7c81ebbbcef.zip |
ipapython: move dnssec, p11helper and secrets to ipaserver
The dnssec and secrets subpackages and the p11helper module depend on
ipaplatform.
Move them to ipaserver as they are used only on the server.
https://fedorahosted.org/freeipa/ticket/6474
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipatests/test_ipapython/test_secrets.py')
-rw-r--r-- | ipatests/test_ipapython/test_secrets.py | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/ipatests/test_ipapython/test_secrets.py b/ipatests/test_ipapython/test_secrets.py deleted file mode 100644 index 9fbf825d2..000000000 --- a/ipatests/test_ipapython/test_secrets.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2015 FreeIPA Project Contributors - see LICENSE file - -from __future__ import print_function -from ipapython.secrets.store import iSecStore, NAME_DB_MAP, NSSCertDB -import os -import shutil -import subprocess -import unittest - - -def _test_password_callback(): - with open('test-ipa-sec-store/pwfile') as f: - password = f.read() - return password - - -class TestiSecStore(unittest.TestCase): - @classmethod - def setUpClass(cls): - try: - shutil.rmtree('test-ipa-sec-store') - except Exception: # pylint: disable=broad-except - pass - testdir = 'test-ipa-sec-store' - pwfile = os.path.join(testdir, 'pwfile') - os.mkdir(testdir) - with open(pwfile, 'w') as f: - f.write('testpw') - cls.certdb = os.path.join(testdir, 'certdb') - os.mkdir(cls.certdb) - cls.cert2db = os.path.join(testdir, 'cert2db') - os.mkdir(cls.cert2db) - seedfile = os.path.join(testdir, 'seedfile') - with open(seedfile, 'wb') as f: - seed = os.urandom(1024) - f.write(seed) - subprocess.call(['certutil', '-d', cls.certdb, '-N', '-f', pwfile]) - subprocess.call(['certutil', '-d', cls.cert2db, '-N', '-f', pwfile]) - subprocess.call(['certutil', '-d', cls.certdb, '-S', '-f', pwfile, - '-s', 'CN=testCA', '-n', 'testCACert', '-x', - '-t', 'CT,C,C', '-m', '1', '-z', seedfile]) - - def test_iSecStore(self): - iss = iSecStore({}) - - NAME_DB_MAP['test'] = { - 'type': 'NSSDB', - 'path': self.certdb, - 'handler': NSSCertDB, - 'pwcallback': _test_password_callback, - } - value = iss.get('keys/test/testCACert') - - NAME_DB_MAP['test']['path'] = self.cert2db - iss.set('keys/test/testCACert', value) |