summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2012-07-24 23:46:08 +0200
committerMichael Tänzer <neo@nhng.de>2012-07-24 23:46:08 +0200
commit692181bc6f4d5abfe95dda4ef9c2357a9bc20397 (patch)
treebde8e342bf83d313375f96b255e3aa35622d269f /www
parentb89cdbe09dd9428f349b0e104f2d2d9d959908d1 (diff)
downloadcacert-devel-692181bc6f4d5abfe95dda4ef9c2357a9bc20397.tar.gz
cacert-devel-692181bc6f4d5abfe95dda4ef9c2357a9bc20397.tar.xz
cacert-devel-692181bc6f4d5abfe95dda4ef9c2357a9bc20397.zip
bug 964: Also show error code in hex on IE keygen
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www')
-rw-r--r--www/keygenIE.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/www/keygenIE.js b/www/keygenIE.js
index fa4bce6..5dc0f13 100644
--- a/www/keygenIE.js
+++ b/www/keygenIE.js
@@ -39,6 +39,16 @@
}
+ /// Show error message to user from exception
+ var showError = function (message, exception) {
+ window.alert(message +
+ "\n\nError: " + exception.message +
+ " (" + exception.number.toString(16) + " / " +
+ exception.number + ")");
+ }
+
+
+
// Get important elements from the DOM
var form = document.getElementById("CertReqForm");
var securityLevel = document.getElementById("SecurityLevel");
@@ -253,7 +263,7 @@
csr.value = enroll.CreateRequest(0x1); //XCN_CRYPT_STRING_BASE64
form.submit();
} catch (e) {
- window.alert(createRequestErrorChooseAlgorithm.innerHTML + "\n\nError: " + e.message);
+ showError(createRequestErrorChooseAlgorithm.innerHTML, e);
}
generatingKeyNotice.style.display = "none";
@@ -555,7 +565,7 @@
csr.value = cenroll.createPKCS10("", "1.3.6.1.5.5.7.3.2");
form.submit();
} catch (e) {
- window.alert(createRequestError.innerHTML + "\n\nError: " + e.message + " (" + e.number + ")");
+ showError(createRequestError.innerHTML, e);
}
generatingKeyNotice.style.display = "none";