Question

I was trying to get the default cert DB of firefox on android using ctypes and NSS(CERT_GetDefaultCertDB). But I was not able to open NSS on FF android. Is NSS available on FireFox on Android?

I tried the follwing:

   var ds = Services.dirsvc.get("GreD", Components.interfaces.nsILocalFile); 
   var libName = ctypes.libraryName("nss3"); 
   ds.append(libName); 

   var nsslib = ctypes.open(ds.path); // FAILS TO OPEN
Was it helpful?

Solution

First you have to initialize NSS, indirectly through the initialization of PSM (Personal Security Manager)

Components.classes["@mozilla.org/psm;1"].getService(Components.interfaces.nsISupports);

Also you should first try to open NSS library without applying a path, and if you catch an exception then try again with "GreD".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top