summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2012-08-08 00:16:42 +0200
committerMichael Tänzer <neo@nhng.de>2012-08-08 00:30:33 +0200
commit567efe68327ca4568ecc4de0c6c597d247b17a2c (patch)
treedf8ebe687b9a5214c377426e8c202d91be553da8 /www
parentb65f5c60cd9d546584977504770c937254c68690 (diff)
downloadcacert-devel-567efe68327ca4568ecc4de0c6c597d247b17a2c.tar.gz
cacert-devel-567efe68327ca4568ecc4de0c6c597d247b17a2c.tar.xz
cacert-devel-567efe68327ca4568ecc4de0c6c597d247b17a2c.zip
bug 964: Show an explicit error message for non-connected crypto devices
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www')
-rw-r--r--www/keygenIE.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/www/keygenIE.js b/www/keygenIE.js
index c311b85..5e2b8c0 100644
--- a/www/keygenIE.js
+++ b/www/keygenIE.js
@@ -84,6 +84,7 @@ var CAcert_keygen_IE = function () {
var generatingKeyNotice = document.getElementById("generatingKeyNotice");
var createRequestErrorChooseAlgorithm = document.getElementById("createRequestErrorChooseAlgorithm");
var createRequestErrorConfirmDialogue = document.getElementById("createRequestErrorConfirmDialogue");
+ var createRequestErrorConnectDevice = document.getElementById("createRequestErrorConnectDevice"));
var createRequestError = document.getElementById("createRequestError");
var invalidKeySizeError = document.getElementById("invalidKeySizeError");
var unsupportedPlatformError = document.getElementById("unsupportedPlatformError");
@@ -593,7 +594,11 @@ var CAcert_keygen_IE = function () {
form.submit();
} catch (e) {
if (e.number === -2147023673) {
+ // 0x800704c7 => dialogue declined
showError(createRequestErrorConfirmDialogue.innerHTML, e);
+ } else if (e.number === -2146435043) {
+ // 0x8010001d => crypto-device not connected
+ showError(createRequestErrorConnectDevice.innerHTML, e);
} else {
showError(createRequestError.innerHTML, e);
}