summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiranjan MR <mrniranjan@fedoraproject.org>2015-10-27 01:22:05 +0530
committerTomas Babej <tbabej@redhat.com>2015-11-11 15:02:56 +0100
commit0152d16820e527060be3363f590c49544b51b710 (patch)
treec175e861ebee3bd547781fd448494bdbfb95693a
parent0043065598f8e7767b45922806f14ed17a18508c (diff)
downloadfreeipa-0152d16820e527060be3363f590c49544b51b710.tar.gz
freeipa-0152d16820e527060be3363f590c49544b51b710.tar.xz
freeipa-0152d16820e527060be3363f590c49544b51b710.zip
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@fedoraproject.org> Reviewed-By: Tomas Babej <tbabej@redhat.com>
-rw-r--r--ipapython/certdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/certdb.py b/ipapython/certdb.py
index d6de01100..704bae528 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)