def test_succeeds(self): self.assertEqual(True, HAS_OPENSSL) credentials = self._make_signed_jwt_creds() pem_contents = crypt.pkcs12_key_as_pem(credentials.private_key, credentials.private_key_password) pkcs12_key_as_pem = datafile('pem_from_pkcs12.pem') pkcs12_key_as_pem = crypt._parse_pem_key(pkcs12_key_as_pem) self.assertEqual(pem_contents, pkcs12_key_as_pem)
def test_succeeds(self): self.assertEqual(True, HAS_OPENSSL) credentials = self._make_signed_jwt_creds() pem_contents = crypt.pkcs12_key_as_pem(credentials.private_key, credentials.private_key_password) pkcs12_key_as_pem = datafile('pem_from_pkcs12.pem') pkcs12_key_as_pem = crypt._parse_pem_key(pkcs12_key_as_pem) alternate_pem = datafile('pem_from_pkcs12_alternate.pem') self.assertTrue(pem_contents in [pkcs12_key_as_pem, alternate_pem])