URL: https://github.com/freeipa/freeipa/pull/935
Author: stlaz
 Title: #935: ca: TypeError fix
Action: opened

PR body:
"""
We were trying to load a certificate as a string even though it
was an object already.

https://pagure.io/freeipa/issue/4985
------------
Please push this before it gets to our integration test suite.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/935/head:pr935
git checkout pr935
From 37eacd32bcde75de35227ab20c1e8fe43798dca4 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Thu, 27 Jul 2017 12:05:19 +0200
Subject: [PATCH] ca: TypeError fix

We were trying to load a certificate as a string even though it
was an object already.

https://pagure.io/freeipa/issue/4985
---
 ipaserver/install/ca.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/ca.py b/ipaserver/install/ca.py
index 0616e755b8..c68390e7ed 100644
--- a/ipaserver/install/ca.py
+++ b/ipaserver/install/ca.py
@@ -30,7 +30,7 @@
 from ipaplatform.paths import paths
 from ipaserver.install import installutils, certs
 from ipaserver.install.replication import replica_conn_check
-from ipalib import api, errors, x509
+from ipalib import api, errors
 from ipapython.dn import DN
 
 from . import conncheck, dogtag
@@ -196,7 +196,7 @@ def install_check(standalone, replica_config, options):
                 cert = db.get_cert_from_db(nickname)
                 if not cert:
                     continue
-                subject = DN(x509.load_pem_x509_certificate(cert).subject)
+                subject = DN(cert.subject)
                 if subject == DN(options._ca_subject):
                     raise ScriptError(
                         "Certificate with subject %s is present in %s, "
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to