[Freeipa-devel] [PATCH] enable pem=True in export_pem_cert function
Niranjan
mrniranjan at fedoraproject.org
Mon Oct 26 19:59:59 UTC 2015
Greetings,
export_pem_cert function from ipapython/certdb should export the certificate
in pem format but instead exports the cert in der format as it doesn't enable pem=True.
This patch specifies pem=True for export_pem_cert function
Regards
Niranjan
-------------- next part --------------
From 85c28405e80efbf65c013f3b615bdacee12856b5 Mon Sep 17 00:00:00 2001
From: Niranjan MR <mrniranjan at fedoraproject.org>
Date: Tue, 27 Oct 2015 01:22:05 +0530
Subject: [PATCH] enable pem=True in export_pem_cert function
export_pem_cert should export the certificate
in pem format but instead exports the cert in der
format as it doesn't enable pem=True.
This patch specifies pem=True for export_pem_cert function
Signed-off-by: Niranjan MR <mrniranjan at fedoraproject.org>
---
ipapython/certdb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipapython/certdb.py b/ipapython/certdb.py
index d6de01100f323c4aa318dc78aabd39b35501f008..704bae528b44a3a3b978d25982a7e75a8e3af0f6 100644
--- a/ipapython/certdb.py
+++ b/ipapython/certdb.py
@@ -417,7 +417,7 @@ class NSSDatabase(object):
def export_pem_cert(self, nickname, location):
"""Export the given cert to PEM file in the given location"""
- cert = self.get_cert(nickname)
+ cert = self.get_cert(nickname, pem=True)
with open(location, "w+") as fd:
fd.write(cert)
os.chmod(location, 0o444)
--
1.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 311 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151027/7b0cf956/attachment.sig>
More information about the Freeipa-devel
mailing list