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
有帮助吗?

解决方案

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".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top