Skip to content

Commit 2c43f84

Browse files
author
Peter Eckersley
committed
Merge pull request EFForg#315 from mhemantha/master
Initialize Convergence's NSS.js with nss library path (EFForg#8314)
2 parents 8996348 + 2422b3d commit 2c43f84

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/chrome/content/code/NSS.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ NSS.initialize = function(nssPath) {
3131
try {
3232
sharedLib = ctypes.open(nssPath);
3333
} catch (e) {
34-
dump("Failed to find nss3 in installed directory, checking system paths.\n");
35-
sharedLib = ctypes.open(ctypes.libraryName("nss3"));
34+
Components.utils.import("resource://gre/modules/Services.jsm");
35+
var nssFile = Services.dirsvc.get("GreD", Ci.nsILocalFile);
36+
nssFile.append(ctypes.libraryName("nss3"));
37+
sharedLib = ctypes.open(nssFile.path);
3638
}
3739

3840
NSS.types = new Object();

src/components/ssl-observatory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function SSLObservatory() {
137137
this.setupASNWatcher();
138138

139139
try {
140-
NSS.initialize("");
140+
NSS.initialize(ctypes.libraryName("nss3"));
141141
} catch(e) {
142142
this.log(WARN, "Failed to initialize NSS component:" + e);
143143
}

0 commit comments

Comments
 (0)