This is related to my patch 924. Petr Viktorin noticed a couple of serial to hex conversions were wrong and it turns out they aren't needed at all. This patch removes them.

rob
>From 8d4f4c597fe6daba8c6f4a6b2b747d206bc274dc Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Thu, 15 Mar 2012 13:29:02 -0400
Subject: [PATCH] Remove unnecessary conversions of serial number to hex in
 dogtag backend.

These are not needed because they are internal calls. The response to the
user is already handled.

https://fedorahosted.org/freeipa/ticket/1991
---
 ipaserver/plugins/dogtag.py |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py
index b56e04f4d8675c34cc5e7db42a1b45402ef79084..c2b43596e47e0bbf5a9321985e9ca51e2caaf754 100644
--- a/ipaserver/plugins/dogtag.py
+++ b/ipaserver/plugins/dogtag.py
@@ -835,7 +835,6 @@ def parse_display_cert_xml(doc):
     if len(serial_number) == 1:
         serial_number = int(serial_number[0].text, 16) # parse as hex
         response['serial_number'] = serial_number
-        response['serial_number_hex'] = u'0x%X' % serial_number
 
     pkcs7_chain = doc.xpath('//xml/header/pkcs7ChainBase64[1]')
     if len(pkcs7_chain) == 1:
@@ -1028,7 +1027,6 @@ def parse_revoke_cert_xml(doc):
         if len(serial_number) == 1:
             serial_number = int(serial_number[0].text, 16) # parse as hex
             response_record['serial_number'] = serial_number
-            response['serial_number_hex'] = u'0x%X' % serial_number
 
         error_string = record.xpath('error[1]')
         if len(error_string) == 1:
@@ -1190,7 +1188,6 @@ def parse_unrevoke_cert_xml(doc):
     if len(serial_number) == 1:
         serial_number = int(serial_number[0].text, 16) # parse as hex
         response['serial_number'] = serial_number
-        response['serial_number_hex'] = u'0x%X' % serial_number
 
     return response
 
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to