From 3ea044fb59bf6ada2c0e9b507c1d6c4dfd8aaa23 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 3 May 2010 17:38:39 -0400 Subject: Handle CSRs whether they have NEW in the header or not Also consolidate some duplicate code --- ipaserver/install/cainstance.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ipaserver/install/cainstance.py') diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 9e55333db..375676ae7 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -36,6 +36,7 @@ import urllib import xml.dom.minidom import stat from ipapython import dogtag +from ipalib import pkcs10 import subprocess from nss.error import NSPRError @@ -911,9 +912,7 @@ class CAInstance(service.Service): finally: os.remove(noise_name) - csr = stdout.find("-----BEGIN NEW CERTIFICATE REQUEST-----") - if csr >= 0: - csr = stdout[csr:] + csr = pkcs10.strip_header(stdout) # Send the request to the CA conn = httplib.HTTPConnection(self.host_name, 9180) -- cgit