diff options
author | kjaniak <kornel.janiak@nokia.com> | 2020-09-21 15:15:38 +0200 |
---|---|---|
committer | kjaniak <kornel.janiak@nokia.com> | 2020-09-21 15:23:47 +0200 |
commit | 97c946e21835cbc213f9974ed0df05ef702f4b88 (patch) | |
tree | 8b7112c5544f1c8f4ed6e5e4fd4f1cd7d271aec5 /tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py | |
parent | 1cb65312aebb6734a563cfc6495e59f65eafd750 (diff) |
Introduce real Kesystore check
Previous implementation for keystores was just comapring zero elements with zero elements,
since keystore doesnt contain any certs (just private keys). Small naming of keywords changes.
Change-Id: If8002e44ef3ced9f2203b94178f9713acd81e561
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Issue-ID: DCAEGEN2-2253
Diffstat (limited to 'tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py')
-rw-r--r-- | tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py b/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py deleted file mode 100644 index e18ca12c..00000000 --- a/tests/oom-platform-cert-service/truststoremerger/libraries/JksTruststoreValidator.py +++ /dev/null @@ -1,18 +0,0 @@ - -import jks - -class JksTruststoreValidator: - - def get_truststore(self, truststore_path, password_path): - truststore = jks.KeyStore.load(truststore_path, open(password_path, 'rb').read()) - return truststore.certs - - def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path): - result_certs = self.get_truststore(result_truststore_path, password_path) - expected_certs = self.get_truststore(expected_truststore_path, password_path) - if len(result_certs) != len(expected_certs): - return False - for k in result_certs: - if not (k in expected_certs and result_certs[k].cert == expected_certs[k].cert): - return False - return True |