000026685 - How to add an email address into a certificates report

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000026685
Applies ToRSA Certificate Manager 6.9 build 554
IssueHow to add an email address into a certificates report
How to add an email address into a certificates report
Adding email address into a certificates report
From Certificate Operations workbench => Reporting - reports => click on 'Search and Report' button and then click on the CSV or HTML link, or the 'Generate Report' button is clicked to generate the report and then CSV or HTML link is clicked... the report does not include email address column.
Resolution
Although an email address is not included into a generated certificate report it can be added manually by modifying the file cert-report-results.xuda under /WebServer/admin-server/ca/cert-ops/
1) Adding email into the HTML output header.
 In the code around line 549 add the line !FPuts( HTMLFileName,"<TD><B>Email Address</B></TD>") like below:
    !if generateHTML="true"
      !FPuts( HTMLFileName,"<TABLE BORDER=1>")
      !FPuts( HTMLFileName,"<TR ALIGN=LEFT>")
      !FPuts( HTMLFileName,"<TD><B>Status</B></TD><TD><B>Serial Number</B></TD>")
      !FPuts( HTMLFileName,"<TD><B>Certificate DN</B></TD>")
      !FPuts( HTMLFileName,"<TD><B>Creation</B></TD><TD><B>Expiry</B></TD><TD><B>Certificate Profile Name</B></TD>")
<!--  ADDED HERE -->
      !FPuts( HTMLFileName,"<TD><B>Email Address</B></TD>")
<!-- ----------------- -->
      !FPuts( HTMLFileName,"</TR>")
    !endif
2) To add an email address field to CSV output add the following code in the if statement !if generateCSV="true" around line 592. For example:
!if generateCSV="true"
        !FPuts( CSVFileName, [cert_status] )
        !FPuts( CSVFileName, ',' )
        !FPuts( CSVFileName, [xuda_certificate.serial_no] )
        !FPuts( CSVFileName, ',"' )
        !FPuts( CSVFileName, [xuda_certificate.certdn] )
        !FPuts( CSVFileName, '",' )
        !FPuts( CSVFileName, [xuda_certificate.notbefore_dte] )
        !FPuts( CSVFileName, ',' )
        !FPuts( CSVFileName, [xuda_certificate.notafter_dte] )
        !if xuda_certificate.cert_profilename="DEFINED"
        !FPuts( CSVFileName, ',' )        
        !FPuts( CSVFileName, [xuda_certificate.cert_profilename])
        !else
!FPuts( CSVFileName, ',' )
        !endif
<!--  ADDED HERE -->
        !if xuda_certificate.email="DEFINED"
        !FPuts( CSVFileName, ',' )        
        !FPuts( CSVFileName, [xuda_certificate.email])
        !else
!FPuts( CSVFileName, ',' )
        !endif
<!-- ----------------- -->
        !FPuts( CSVFileName, newline )
!endif
3) In order to add an email address in the html output add the following code into the if statement !if generateHTML="true" around line 611.
You will end up with the following:
!if generateHTML="true"
        !FPuts( HTMLFileName,"<TR ALIGN=LEFT>")
        !FPuts( HTMLFileName, <TD>[cert_status]</TD>)
        !FPuts( HTMLFileName, <TD>[xuda_certificate.serial_no]</TD>)
        !FPuts( HTMLFileName, <TD>[xuda_certificate.certdn]</TD>)
        !FPuts( HTMLFileName, <TD>[xuda_certificate.notbefore_dte]</TD>)
        !FPuts( HTMLFileName, <TD>[xuda_certificate.notafter_dte]</TD>)
        !if xuda_certificate.cert_profilename="DEFINED"        
        !FPuts( HTMLFileName, <TD>[xuda_certificate.cert_profilename]</TD>)
       !else
        !FPuts( HTMLFileName, <TD><B> &nbsp</B></TD>)
        !endif
<!--  ADDED HERE -->
        !if xuda_certificate.email="DEFINED"        
!FPuts( HTMLFileName, <TD>[xuda_certificate.email]</TD>)
        !else
!FPuts( HTMLFileName, <TD><B> &nbsp</B></TD>)
        !endif
<!-- ----------------- -->
        !FPuts( HTMLFileName,"</TR>")
!endif
Notes
Note that the changes could be over-written by any future Hot Fix/patch.

CERTMGR-3842
CERTMGR-4322
Legacy Article IDa62654

Attachments

    Outcomes