summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/cert.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipaserver/plugins/cert.py')
-rw-r--r--ipaserver/plugins/cert.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index 5e85942dd..a534c4d26 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -379,10 +379,10 @@ class BaseCertObject(Object):
obj['valid_not_before'] = unicode(cert.valid_not_before_str)
obj['valid_not_after'] = unicode(cert.valid_not_after_str)
if full:
- obj['md5_fingerprint'] = unicode(
- nss.data_to_hex(nss.md5_digest(cert.der_data), 64)[0])
- obj['sha1_fingerprint'] = unicode(
- nss.data_to_hex(nss.sha1_digest(cert.der_data), 64)[0])
+ obj['md5_fingerprint'] = x509.to_hex_with_colons(
+ nss.md5_digest(cert.der_data))
+ obj['sha1_fingerprint'] = x509.to_hex_with_colons(
+ nss.sha1_digest(cert.der_data))
try:
ext_san = cert.get_extension(nss.SEC_OID_X509_SUBJECT_ALT_NAME)