diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-12-12 04:10:54 +0100 |
---|---|---|
committer | Matthew Harmsen <mharmsen@pki.usersys.redhat.com> | 2016-02-22 20:19:47 -0700 |
commit | 2f7b4ce93db7df6985b1df8136c1af8132d8a962 (patch) | |
tree | 130ef68348d6385943c73e3c2fc737859f07791e /base/common | |
parent | 71d4bc1b5b73c34622adfacf3105d2fc8feb1aa1 (diff) | |
download | pki-2f7b4ce93db7df6985b1df8136c1af8132d8a962.tar.gz pki-2f7b4ce93db7df6985b1df8136c1af8132d8a962.tar.xz pki-2f7b4ce93db7df6985b1df8136c1af8132d8a962.zip |
Fixed external CA case for IPA compatibility.
The installation code for external CA case has been fixed such
that IPA can detect step 1 completion properly.
The code that handles certificate data conversion has been fixed
to reformat base-64 data for PEM output properly.
The installation summary for step 1 has been updated to provide
more accurate information.
https://fedorahosted.org/pki/ticket/456
(cherry picked from commit 449e4357e733a70e8f27f65f69ca8f0f7c8b5b21)
Diffstat (limited to 'base/common')
-rw-r--r-- | base/common/python/pki/nss.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/common/python/pki/nss.py b/base/common/python/pki/nss.py index 196fe462f..67fd90b4c 100644 --- a/base/common/python/pki/nss.py +++ b/base/common/python/pki/nss.py @@ -43,9 +43,13 @@ def convert_data(data, input_format, output_format, header=None, footer=None): if input_format == 'base64' and output_format == 'pem': - # split a single line into multiple lines - data = data.rstrip('\r\n') + # join base-64 data into a single line + data = data.replace('\r', '').replace('\n', '') + + # re-split the line into fixed-length lines lines = [data[i:i+64] for i in range(0, len(data), 64)] + + # add header and footer return '%s\n%s\n%s\n' % (header, '\n'.join(lines), footer) if input_format == 'pem' and output_format == 'base64': |