[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] remove extra space from Base 64 encoded cert displays



Please review the attached patch which addresses the following issue:

I have tested a number of the displays, and have found no issues.

Thanks,
-- Matt

From 0765a0ea6b1ebdcf6c3a3279b911e3c3e7cd52e4 Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen redhat com>
Date: Fri, 31 Jul 2015 17:28:57 -0600
Subject: [PATCH] remove extra space from Base 64 encoded cert displays

- PKI TRAC Ticket #1522 - CA UI adds extra space in Base 64 encoded
  certificate display
---
 base/ca/shared/webapps/ca/agent/ca/displayBySerial.template     | 8 ++++----
 base/ca/shared/webapps/ca/agent/ca/displayBySerial2.template    | 4 ++--
 base/ca/shared/webapps/ca/ee/ca/displayBySerial.template        | 8 ++++----
 base/ca/shared/webapps/ca/ee/ca/displayBySerial2.template       | 4 ++--
 base/ca/shared/webapps/ca/ee/ca/displayCaCert.template          | 8 ++++----
 base/kra/shared/webapps/kra/agent/kra/displayBySerial2.template | 4 ++--
 6 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/base/ca/shared/webapps/ca/agent/ca/displayBySerial.template b/base/ca/shared/webapps/ca/agent/ca/displayBySerial.template
index 2bb2bfa..3b58a47 100644
--- a/base/ca/shared/webapps/ca/agent/ca/displayBySerial.template
+++ b/base/ca/shared/webapps/ca/agent/ca/displayBySerial.template
@@ -179,11 +179,11 @@ The following format can be used to install this certificate into a server.
 Base 64 encoded certificate
 </font>
 <p><pre>
------BEGIN CERTIFICATE-----
 <SCRIPT type="text/javascript">
+document.writeln('-----BEGIN CERTIFICATE-----');
 document.write(result.header.certChainBase64);
+document.writeln('-----END CERTIFICATE-----');
 </SCRIPT>
------END CERTIFICATE-----
 </pre>
 
 <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
@@ -191,11 +191,11 @@ document.write(result.header.certChainBase64);
 Base 64 encoded certificate with CA certificate chain in pkcs7 format
 </font>
 <p><pre>
------BEGIN CERTIFICATE CHAIN-----
 <SCRIPT type="text/javascript">
+document.writeln('-----BEGIN CERTIFICATE CHAIN-----');
 document.write(result.header.pkcs7ChainBase64);
+document.writeln('-----END CERTIFICATE CHAIN-----');
 </SCRIPT>
------END CERTIFICATE CHAIN-----
 </pre>
 
 <br><p>
diff --git a/base/ca/shared/webapps/ca/agent/ca/displayBySerial2.template b/base/ca/shared/webapps/ca/agent/ca/displayBySerial2.template
index 4a193e3..7923f41 100644
--- a/base/ca/shared/webapps/ca/agent/ca/displayBySerial2.template
+++ b/base/ca/shared/webapps/ca/agent/ca/displayBySerial2.template
@@ -97,11 +97,11 @@ The following format can be used to install this certificate into a server.
 Base 64 encoded certificate
 </font>
 <p><pre>
------BEGIN CERTIFICATE CHAIN-----
 <SCRIPT type="text/javascript">
+document.writeln('-----BEGIN CERTIFICATE CHAIN-----');
 document.write(result.header.certChainBase64);
+document.writeln('-----END CERTIFICATE CHAIN-----');
 </SCRIPT>
------END CERTIFICATE CHAIN-----
 </pre>
 
 <br><p>
diff --git a/base/ca/shared/webapps/ca/ee/ca/displayBySerial.template b/base/ca/shared/webapps/ca/ee/ca/displayBySerial.template
index e9b4d72..d1e65fa 100644
--- a/base/ca/shared/webapps/ca/ee/ca/displayBySerial.template
+++ b/base/ca/shared/webapps/ca/ee/ca/displayBySerial.template
@@ -104,11 +104,11 @@ The following format can be used to install this certificate into a server.
 Base 64 encoded certificate
 </font>
 <p><pre>
------BEGIN CERTIFICATE-----
 <SCRIPT LANGUAUGE="JavaScript">
+document.writeln('-----BEGIN CERTIFICATE-----');
 document.write(result.header.certChainBase64);
+document.writeln('-----END CERTIFICATE-----');
 </SCRIPT>
------END CERTIFICATE-----
 </pre>
 
 <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
@@ -116,11 +116,11 @@ document.write(result.header.certChainBase64);
 Base 64 encoded certificate with CA certificate chain in pkcs7 format
 </font>
 <p><pre>
------BEGIN CERTIFICATE-----
 <SCRIPT LANGUAUGE="JavaScript">
+document.writeln('-----BEGIN CERTIFICATE CHAIN-----');
 document.write(result.header.pkcs7ChainBase64);
+document.writeln('-----END CERTIFICATE CHAIN-----');
 </SCRIPT>
------END CERTIFICATE-----
 </pre>
 
 <br><p>
diff --git a/base/ca/shared/webapps/ca/ee/ca/displayBySerial2.template b/base/ca/shared/webapps/ca/ee/ca/displayBySerial2.template
index f8f3064..7e6678f 100644
--- a/base/ca/shared/webapps/ca/ee/ca/displayBySerial2.template
+++ b/base/ca/shared/webapps/ca/ee/ca/displayBySerial2.template
@@ -97,11 +97,11 @@ The following format can be used to install this certificate into a server.
 Base 64 encoded certificate
 </font>
 <p><pre>
------BEGIN CERTIFICATE-----
 <SCRIPT LANGUAUGE="JavaScript">
+document.writeln('-----BEGIN CERTIFICATE-----');
 document.write(result.header.certChainBase64);
+document.writeln('-----END CERTIFICATE-----');
 </SCRIPT>
------END CERTIFICATE-----
 </pre>
 
 <br><p>
diff --git a/base/ca/shared/webapps/ca/ee/ca/displayCaCert.template b/base/ca/shared/webapps/ca/ee/ca/displayCaCert.template
index 4e93919..49a91af 100644
--- a/base/ca/shared/webapps/ca/ee/ca/displayCaCert.template
+++ b/base/ca/shared/webapps/ca/ee/ca/displayCaCert.template
@@ -43,9 +43,9 @@ if (result.header.displayFormat == "chain") {
     document.writeln('<center><b>' + result.header.subjectdn);
     document.writeln('</b></center><p></font><br>');
     document.writeln('<pre>');
-    document.writeln('-----BEGIN CERTIFICATE-----');
-    document.writeln(result.header.chainBase64);
-    document.writeln('-----END CERTIFICATE-----');
+    document.writeln('-----BEGIN CERTIFICATE CHAIN-----');
+    document.write(result.header.chainBase64);
+    document.writeln('-----END CERTIFICATE CHAIN-----');
     document.writeln('</pre>');
 } else if (result.header.displayFormat == "individual") {
     if (result.recordSet.length == 0) {
@@ -86,7 +86,7 @@ function displayCertificate(cert,i)
     document.writeln('');
     document.writeln('<pre>');
     document.writeln('-----BEGIN CERTIFICATE-----');
-    document.writeln(cert.base64);
+    document.write(cert.base64);
     document.writeln('-----END CERTIFICATE-----');
     document.writeln('</pre>');
     document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
diff --git a/base/kra/shared/webapps/kra/agent/kra/displayBySerial2.template b/base/kra/shared/webapps/kra/agent/kra/displayBySerial2.template
index 30af980..06bef2f 100644
--- a/base/kra/shared/webapps/kra/agent/kra/displayBySerial2.template
+++ b/base/kra/shared/webapps/kra/agent/kra/displayBySerial2.template
@@ -92,11 +92,11 @@ The following format can be used to install this certificate into a server.
 Base 64 encoded certificate
 </font>
 <p><pre>
------BEGIN CERTIFICATE-----
 <SCRIPT LANGUAUGE="JavaScript">
+document.writeln('-----BEGIN CERTIFICATE-----');
 document.write(result.header.certChainBase64);
+document.writeln('-----END CERTIFICATE-----');
 </SCRIPT>
------END CERTIFICATE-----
 </pre>
 
 <br><p>
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]