4 class JksTruststoreValidator:
6 def get_truststore(self, truststore_path, password_path):
7 truststore = jks.KeyStore.load(truststore_path, open(password_path, 'rb').read())
8 return truststore.certs
10 def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
11 result_certs = self.get_truststore(result_truststore_path, password_path)
12 expected_certs = self.get_truststore(expected_truststore_path, password_path)
13 if len(result_certs) != len(expected_certs):
15 for k in result_certs:
16 if not (k in expected_certs and result_certs[k].cert == expected_certs[k].cert):