Blob Blame History Raw
commit 6999197b067af920b53c75e17dc20181ba49e997
Author: Matthew Harmsen <mharmsen@redhat.com>
Date:   Fri Jul 31 17:28:57 2015 -0600

    remove extra space from Base 64 encoded cert displays
    
    - PKI TRAC Ticket #1522 - CA UI adds extra space in Base 64 encoded
      certificate display

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>