projects
/
gssweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f65a5c
)
Add comments, rearrange variable declaration order
author
Mark Donnelly
<mark@painless-security.com>
Tue, 21 Oct 2014 02:44:51 +0000
(22:44 -0400)
committer
Mark Donnelly
<mark@painless-security.com>
Tue, 21 Oct 2014 02:44:51 +0000
(22:44 -0400)
chrome/app/navigator.gss.js
patch
|
blob
|
history
diff --git
a/chrome/app/navigator.gss.js
b/chrome/app/navigator.gss.js
index
96c189f
..
0c4ec32
100644
(file)
--- a/
chrome/app/navigator.gss.js
+++ b/
chrome/app/navigator.gss.js
@@
-1,4
+1,4
@@
-console.log('Loading navigator.gss.js - #
7
');
+console.log('Loading navigator.gss.js - #
8
');
/* This file gets injected into the web page verbatim */
/* This file gets injected into the web page verbatim */
@@
-85,13
+85,19
@@
var GSSEap = (function ()
GSSEap.prototype.import_name = function (params)
{
/* variables */
GSSEap.prototype.import_name = function (params)
{
/* variables */
+ // internal variables
var nonce;
var nonce;
+
+ // Required parameters
var name = params.name;
var name = params.name;
- var name_type = params.name_type || "{1 2 840 113554 1 2 1 4 }";
var callback = params.success;
var callback = params.success;
+
+ // Optional & defaulted parameters
+ var name_type = params.name_type || "{1 2 840 113554 1 2 1 4 }";
var error = params.error || this.default_error;
var app_tag = params.app_tag || this.appTag;
var error = params.error || this.default_error;
var app_tag = params.app_tag || this.appTag;
+
/* Error checking */
// Call an error if we don't have the required parameters.
// - name
/* Error checking */
// Call an error if we don't have the required parameters.
// - name
@@
-104,11
+110,19
@@
var GSSEap = (function ()
);
return;
}
);
return;
}
+
+ /* Setup */
nonce = navigator.generateNonce();
nonce = navigator.generateNonce();
+
+
+ /* Main processing */
+ // Save our callback, method name, and error function
this.callbacks[nonce] = callback;
this.methods[nonce] = "gss_import_name";
this.errors[nonce] = error;
this.callbacks[nonce] = callback;
this.methods[nonce] = "gss_import_name";
this.errors[nonce] = error;
+
+ // Now pass the request on to the C code
window.postMessage({
"method":"gss_import_name",
"arguments":
window.postMessage({
"method":"gss_import_name",
"arguments":