projects
/
gssweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
086d59d
)
Removed no longer needed console logging upon bootup.
author
Mark Donnelly
<mark@painless-security.com>
Wed, 3 Dec 2014 21:42:41 +0000
(16:42 -0500)
committer
Mark Donnelly
<mark@painless-security.com>
Wed, 3 Dec 2014 21:42:41 +0000
(16:42 -0500)
firefox/lib/main.js
patch
|
blob
|
history
diff --git
a/firefox/lib/main.js
b/firefox/lib/main.js
index
f38786e
..
8060a3d
100644
(file)
--- a/
firefox/lib/main.js
+++ b/
firefox/lib/main.js
@@
-1,20
+1,12
@@
var tabs = require("sdk/tabs");
const {Cu} = require("chrome");
var tabs = require("sdk/tabs");
const {Cu} = require("chrome");
-for (i = 0; i < 10; i++) {
- console.log("");
-}
-
-console.log("About to load ctypes");
Cu.import("resource://gre/modules/ctypes.jsm");
Cu.import("resource://gre/modules/ctypes.jsm");
-console.log(" ... loaded.");
-
-var json_gssapi;
// TODO: detect which OS we're running, and proactively search for the
// correct library name.
// TODO: detect which OS we're running, and proactively search for the
// correct library name.
-
console.log("About to load libjsongssapi")
;
+
var json_gssapi
;
try {
json_gssapi = ctypes.open("libjsongssapi.so");
}
try {
json_gssapi = ctypes.open("libjsongssapi.so");
}
@@
-23,25
+15,20
@@
catch (e) {
json_gssapi = ctypes.open("libjsongssapi.dll");
}
catch (e) {
json_gssapi = ctypes.open("libjsongssapi.dll");
}
catch (e) {
- console.log("
...
" + e);
+ console.log("
Error loading the JSON GSS-API library:
" + e);
}
}
}
}
-console.log(" ... loaded.");
-console.log("Declaring the call_gss function:");
-const gss_request = json_gssapi.declare("gss_request",
+var gss_request = function(msg) { return "{\"error_message\":\"JSON GSS-API library was not loaded properly\"}"; }
+try {
+gss_request = json_gssapi.declare("gss_request",
ctypes.default_abi,
ctypes.char.ptr,
ctypes.char.ptr);
ctypes.default_abi,
ctypes.char.ptr,
ctypes.char.ptr);
-console.log(" ... declared.");
-
-/*
-console.log("Calling import_name");
-var reply;
-reply = call_gss("{\"method\":\"gss_import_name\",\"arguments\":{\"input_name\":\"HTTP@localhost\",\"input_name_type\":\"{1 2 840 113554 1 2 1 4 }\"}}");
-console.log(" ... Reply: " + reply.readString());
-*/
-
+}
+catch (e) {
+ console.log("Could not find the function 'gss_request' in the JSON GSS-API library: " + e);
+}
var self = require("sdk/self");
var data = require("sdk/self").data;
var self = require("sdk/self");
var data = require("sdk/self").data;