From f44e1a7a987bfe024fbd18cf4ca0e867112edcfd Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Thu, 20 Aug 2015 12:06:32 -0700 Subject: Internet Explorer 11 not working browser warning. Related to ticket #1575 Internet Explorer 11: caUserCert request submission fails using the EE page. This patch will only do the following: Detect IE when IE11 is being used. Before this IE11 was mistaken for Firefox. Detect IE11 specifically and warn the user that there is no support. This ticket will live to se we can fix this properly by porting the current VBS script to Javascript to support cert enrollment on IE 11. (cherry picked from commit 0baf14ad496d18991a83f211b4b60d1811e21fb3) --- .../shared/webapps/ca/ee/ca/ProfileSelect.template | 49 +++++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) (limited to 'base/ca') diff --git a/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template b/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template index 2c01b9a41..01b94abc8 100644 --- a/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template +++ b/base/ca/shared/webapps/ca/ee/ca/ProfileSelect.template @@ -47,6 +47,27 @@ var key = new Object(); key.type = "EC"; keyList[1] = key; +function isIE() { + if ( "ActiveXObject" in window ) { + return true; + } + return false; + } + + function isIE11() { + + if ( !(window.ActiveXObject) && "ActiveXObject" in window ) { + return true; + } + return false; + } + +function getIE11Warning() { + document.write('

Warning: Internet Explore Version 11 is not currently supported for certain enrollment operations. Please use an earlier version of the browser.

'); + document.write('
'); +} + + function getKeyStrengthTableForKeyGen() { document.writeln(""); @@ -145,7 +166,7 @@ function keyTypeOptions (keyPurpose) if (keyFound == 0) { keyType = "RSA"; } - if ((navigator.appName == "Microsoft Internet Explorer") && + if ((isIE()) && ((navigator.appVersion).indexOf("NT 6.") == -1)) { keyType = "RSA"; } @@ -156,7 +177,7 @@ function keyTypeOptions (keyPurpose) function translateCurveName (name) { var translated = ""; - if (navigator.appName == "Microsoft Internet Explorer") { + if (isIE()) { if (name == "nistp256" || name == "ECDSA_P256") { translated = "ECDSA_P256"; } else if (name == "nistp384" || name == "ECDSA_P384") { @@ -207,7 +228,7 @@ function keyLengthsCurvesOptions (keyPurpose) } } } - if ((navigator.appName == "Microsoft Internet Explorer") && + if ((isIE()) && ((navigator.appVersion).indexOf("NT 6.") == -1)) { keyType = "RSA"; } @@ -222,7 +243,7 @@ function keyLengthsCurvesOptions (keyPurpose) if (keyType != "EC" && !isNumeric(value)) { included = false; } else if (keyType == "EC" && - navigator.appName == "Microsoft Internet Explorer" && + isIE() && value != "nistp256" && value != "nistp384" && value != "nistp521" & value != "ECDSA_P256" && value != "ECDSA_P384" && value != "ECDSA_P521") { included = false; @@ -245,7 +266,7 @@ function keyLengthsCurvesOptions (keyPurpose) if (keyType != "EC") { options = '
KeyGen Key Strength Info
Key Type High Grade Medium Grade