Blob Blame History Raw
commit e1eb261b467f6e19c7e6604fc7ecb03e8b1f8166
Author: Jack Magne <jmagne@localhost.localdomain>
Date:   Fri Jul 31 13:55:07 2015 -0700

    Firefox warning
    
    Ticket #1523
    
    Move the dire warning about the crypto object to sections where it applies.
    
    Also slightly changed the message due to context.

diff --git a/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template b/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template
index 5075962..2c01b9a 100644
--- a/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template
+++ b/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template
@@ -56,6 +56,11 @@ function getKeyStrengthTableForKeyGen() {
 
 }
 
+function getNoCryptoWarning() {
+     document.write('<p> <font color="red"> Warning: This version of Firefox no longer supports the crypto web object used to generate and archive keys from the browser.  As a result expect limited functionality in this area. </font> </p>');
+     document.write('<br>');
+}
+
 function getKeyTypesOptionsForKeyGen() {
     var keyTypesDef = "RSA";
     var keyTypes = null;
@@ -748,6 +753,7 @@ for (var m = 0; m < inputPluginListSet.length; m++) {
         document.writeln('<input type=hidden name=cert_request value="">');
       } else {
 
+        getNoCryptoWarning();
         getKeyStrengthTableForKeyGen();
 
         var keyTypesOptions = getKeyTypesOptionsForKeyGen();
@@ -770,6 +776,7 @@ for (var m = 0; m < inputPluginListSet.length; m++) {
       } else if (typeof(crypto) != "undefined" && typeof(crypto.version) != "undefined") {
         document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">crmf</FONT><input type=hidden name=' + inputListSet[n].inputId + ' value=crmf>');
       } else {
+        getNoCryptoWarning();
         document.writeln('Not Supported<input type=hidden name=' + inputListSet[n].inputId + ' value=>');
       }
     } else if ((inputListSet[n].inputSyntax == 'keygen_request_type') ||
diff --git a/base/ca/shared/webapps/ca/services.template b/base/ca/shared/webapps/ca/services.template
index 0ccbd1c..0e314b2 100644
--- a/base/ca/shared/webapps/ca/services.template
+++ b/base/ca/shared/webapps/ca/services.template
@@ -101,12 +101,6 @@ Certificate System CA Services Page
 </tr>
 <script language=javascript>
 
-if (typeof(crypto) != "undefined" && typeof(crypto.version) != "undefined") {
-} else {
-    document.write('<p> <font color="red"> Warning: This version of Firefox no longer supports the crypto web object used to generate and archive keys from the browser. Although Certificate System will continue to work, some of the functionality may no longer be supported. </font> </p>');
-    document.write('<br>');
-}
-
 for (var i=0; i<result.recordSet.length; ++i) {
     document.write('<tr valign="TOP">');
     document.write('<td>');
diff --git a/base/server/share/webapps/ROOT/index.jsp b/base/server/share/webapps/ROOT/index.jsp
index b79281b..ade01bc 100644
--- a/base/server/share/webapps/ROOT/index.jsp
+++ b/base/server/share/webapps/ROOT/index.jsp
@@ -84,15 +84,6 @@ $(function() {
 
 </div>
 
-<script>
-if (typeof(crypto) != "undefined" && typeof(crypto.version) != "undefined") {
-} else {
-    document.write('<p> <font color="red"> Warning: This version of Firefox no longer supports the crypto web object used to generate and archive keys from the browser. Although Certificate System will continue to work, some of the functionality may no longer be supported. </font> </p>');
-    document.write('<br>');
-}
-</script>
-
-
 <center>
 
 <br>