about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt6
-rw-r--r--src/wrapped/generated/wrappednspr4types.h6
-rw-r--r--src/wrapped/generated/wrappednss3types.h1
-rw-r--r--src/wrapped/generated/wrapper.c2
-rw-r--r--src/wrapped/generated/wrapper.h1
-rw-r--r--src/wrapped/wrappednspr4.c73
-rw-r--r--src/wrapped/wrappednspr4_private.h28
-rw-r--r--src/wrapped/wrappednss3.c27
-rw-r--r--src/wrapped/wrappednss3_private.h22
-rw-r--r--src/wrapped/wrappednssutil3_private.h60
10 files changed, 170 insertions, 56 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 6318aaed..184560af 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -2365,6 +2365,7 @@
 #() pFfiiiiid
 #() pFdiiiIiI
 #() pFpiiiiid
+#() pFpiiippp
 #() pFpiiUdii
 #() pFpipippp
 #() pFpCuwwWW
@@ -4864,12 +4865,17 @@ wrappedmpg123:
 wrappednotify:
 wrappednsl:
 wrappednspr4:
+- iFpp:
+  - PR_CallOnce
+- iFppp:
+  - PR_CallOnceWithArg
 wrappednss3:
 - vFp:
   - PK11_SetPasswordFunc
   - PORT_SetUCS2_ASCIIConversionFunction
 - iFpp:
   - CERT_RegisterAlternateOCSPAIAInfoCallBack
+  - NSS_RegisterShutdown
 - iFpIppp:
   - CERT_PKIXVerifyCert
 wrappednssutil3:
diff --git a/src/wrapped/generated/wrappednspr4types.h b/src/wrapped/generated/wrappednspr4types.h
index f1df2b71..92b8ac31 100644
--- a/src/wrapped/generated/wrappednspr4types.h
+++ b/src/wrapped/generated/wrappednspr4types.h
@@ -11,7 +11,11 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef int32_t (*iFpp_t)(void*, void*);
+typedef int32_t (*iFppp_t)(void*, void*, void*);
 
-#define SUPER() ADDED_FUNCTIONS()
+#define SUPER() ADDED_FUNCTIONS() \
+	GO(PR_CallOnce, iFpp_t) \
+	GO(PR_CallOnceWithArg, iFppp_t)
 
 #endif // __wrappednspr4TYPES_H_
diff --git a/src/wrapped/generated/wrappednss3types.h b/src/wrapped/generated/wrappednss3types.h
index 665f0cc2..3bd73d9c 100644
--- a/src/wrapped/generated/wrappednss3types.h
+++ b/src/wrapped/generated/wrappednss3types.h
@@ -19,6 +19,7 @@ typedef int32_t (*iFpIppp_t)(void*, int64_t, void*, void*, void*);
 	GO(PK11_SetPasswordFunc, vFp_t) \
 	GO(PORT_SetUCS2_ASCIIConversionFunction, vFp_t) \
 	GO(CERT_RegisterAlternateOCSPAIAInfoCallBack, iFpp_t) \
+	GO(NSS_RegisterShutdown, iFpp_t) \
 	GO(CERT_PKIXVerifyCert, iFpIppp_t)
 
 #endif // __wrappednss3TYPES_H_
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index e70a3853..0c9d1d0e 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -2401,6 +2401,7 @@ typedef void* (*pFuupupup_t)(uint32_t, uint32_t, void*, uint32_t, void*, uint32_
 typedef void* (*pFfiiiiid_t)(float, int32_t, int32_t, int32_t, int32_t, int32_t, double);
 typedef void* (*pFdiiiIiI_t)(double, int32_t, int32_t, int32_t, int64_t, int32_t, int64_t);
 typedef void* (*pFpiiiiid_t)(void*, int32_t, int32_t, int32_t, int32_t, int32_t, double);
+typedef void* (*pFpiiippp_t)(void*, int32_t, int32_t, int32_t, void*, void*, void*);
 typedef void* (*pFpiiUdii_t)(void*, int32_t, int32_t, uint64_t, double, int32_t, int32_t);
 typedef void* (*pFpipippp_t)(void*, int32_t, void*, int32_t, void*, void*, void*);
 typedef void* (*pFpCuwwWW_t)(void*, uint8_t, uint32_t, int16_t, int16_t, uint16_t, uint16_t);
@@ -5391,6 +5392,7 @@ void pFuupupup(x64emu_t *emu, uintptr_t fcn) { pFuupupup_t fn = (pFuupupup_t)fcn
 void pFfiiiiid(x64emu_t *emu, uintptr_t fcn) { pFfiiiiid_t fn = (pFfiiiiid_t)fcn; R_RAX=(uintptr_t)fn(emu->xmm[0].f[0], (int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, emu->xmm[1].d[0]); }
 void pFdiiiIiI(x64emu_t *emu, uintptr_t fcn) { pFdiiiIiI_t fn = (pFdiiiIiI_t)fcn; R_RAX=(uintptr_t)fn(emu->xmm[0].d[0], (int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int64_t)R_RCX, (int32_t)R_R8, (int64_t)R_R9); }
 void pFpiiiiid(x64emu_t *emu, uintptr_t fcn) { pFpiiiiid_t fn = (pFpiiiiid_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, emu->xmm[0].d[0]); }
+void pFpiiippp(x64emu_t *emu, uintptr_t fcn) { pFpiiippp_t fn = (pFpiiippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpiiUdii(x64emu_t *emu, uintptr_t fcn) { pFpiiUdii_t fn = (pFpiiUdii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint64_t)R_RCX, emu->xmm[0].d[0], (int32_t)R_R8, (int32_t)R_R9); }
 void pFpipippp(x64emu_t *emu, uintptr_t fcn) { pFpipippp_t fn = (pFpipippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpCuwwWW(x64emu_t *emu, uintptr_t fcn) { pFpCuwwWW_t fn = (pFpCuwwWW_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (int16_t)R_RCX, (int16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8)); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 0dfcde42..2b08a4a6 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -2402,6 +2402,7 @@ void pFuupupup(x64emu_t *emu, uintptr_t fnc);
 void pFfiiiiid(x64emu_t *emu, uintptr_t fnc);
 void pFdiiiIiI(x64emu_t *emu, uintptr_t fnc);
 void pFpiiiiid(x64emu_t *emu, uintptr_t fnc);
+void pFpiiippp(x64emu_t *emu, uintptr_t fnc);
 void pFpiiUdii(x64emu_t *emu, uintptr_t fnc);
 void pFpipippp(x64emu_t *emu, uintptr_t fnc);
 void pFpCuwwWW(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappednspr4.c b/src/wrapped/wrappednspr4.c
index 07240fce..d1d93e0e 100644
--- a/src/wrapped/wrappednspr4.c
+++ b/src/wrapped/wrappednspr4.c
@@ -6,13 +6,86 @@
 
 #include "wrappedlibs.h"
 
+#include "debug.h"
 #include "wrapper.h"
 #include "bridge.h"
 #include "librarian/library_private.h"
 #include "x64emu.h"
+#include "emu/x64emu_private.h"
+#include "callback.h"
+#include "librarian.h"
+#include "box64context.h"
+#include "emu/x64emu_private.h"
+#include "myalign.h"
 
 const char* nspr4Name = "libnspr4.so";
 #define LIBNAME nspr4
 
+#include "generated/wrappednspr4types.h"
+
+#include "wrappercallback.h"
+
+#define SUPER() \
+GO(0)   \
+GO(1)   \
+GO(2)   \
+GO(3)   \
+GO(4)
+
+// PRCallOnceFN ...
+#define GO(A)   \
+static uintptr_t my_PRCallOnceFN_fct_##A = 0;           \
+static int my_PRCallOnceFN_##A()                        \
+{                                                       \
+    return RunFunctionFmt(my_PRCallOnceFN_fct_##A, ""); \
+}
+SUPER()
+#undef GO
+static void* find_PRCallOnceFN_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_PRCallOnceFN_fct_##A == (uintptr_t)fct) return my_PRCallOnceFN_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_PRCallOnceFN_fct_##A == 0) {my_PRCallOnceFN_fct_##A = (uintptr_t)fct; return my_PRCallOnceFN_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for nspr4 PRCallOnceFN callback\n");
+    return NULL;
+}
+// PRCallOnceWithArgFN ...
+#define GO(A)   \
+static uintptr_t my_PRCallOnceWithArgFN_fct_##A = 0;                \
+static int my_PRCallOnceWithArgFN_##A(void* a)                      \
+{                                                                   \
+    return RunFunctionFmt(my_PRCallOnceWithArgFN_fct_##A, "p", a);  \
+}
+SUPER()
+#undef GO
+static void* find_PRCallOnceWithArgFN_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_PRCallOnceWithArgFN_fct_##A == (uintptr_t)fct) return my_PRCallOnceWithArgFN_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_PRCallOnceWithArgFN_fct_##A == 0) {my_PRCallOnceWithArgFN_fct_##A = (uintptr_t)fct; return my_PRCallOnceWithArgFN_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for nspr4 PRCallOnceWithArgFN callback\n");
+    return NULL;
+}
+#undef SUPER
+
+EXPORT int my_PR_CallOnce(x64emu_t* emu, void* once, void* f)
+{
+    return my->PR_CallOnce(once, find_PRCallOnceFN_Fct(f));
+}
+EXPORT int my_PR_CallOnceWithArg(x64emu_t* emu, void* once, void* f, void* data)
+{
+    return my->PR_CallOnceWithArg(once, find_PRCallOnceWithArgFN_Fct(f), data);
+}
+
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappednspr4_private.h b/src/wrapped/wrappednspr4_private.h
index 47100da7..b74883e7 100644
--- a/src/wrapped/wrappednspr4_private.h
+++ b/src/wrapped/wrappednspr4_private.h
@@ -32,8 +32,8 @@ GO(PR_AttachSharedMemory, pFpi)
 //GO(PR_BlockClockInterrupts, 
 //GO(PR_BlockInterrupt, 
 GO(PR_Calloc, pFuu)
-//GO(PR_CallOnce, 
-//GO(PR_CallOnceWithArg, 
+GOM(PR_CallOnce, iFEpp)
+GOM(PR_CallOnceWithArg, iFEppp)
 //GO(PR_CancelJob, 
 //GO(PR_CancelWaitFileDesc, 
 //GO(PR_CancelWaitGroup, 
@@ -59,7 +59,7 @@ GO(PR_ConvertIPv4AddrToIPv6, vFup)
 //GO(PR_CreateCounter, 
 //GO(PR_CreateFileMap, 
 //GO(PR_CreateIOLayer, 
-//GO(PR_CreateIOLayerStub, 
+GO(PR_CreateIOLayerStub, pFip)
 GO(PR_CreateMWaitEnumerator, pFp)
 //GO(PR_CreateOrderedLock, 
 GO(PR_CreatePipe, iFpp)
@@ -81,8 +81,8 @@ GO(PR_DeleteSharedMemory, iFp)
 //GO(PR_DestroyAlarm, 
 GO(PR_DestroyCondVar, vFp)
 //GO(PR_DestroyCounter, 
-//GO(PR_DestroyLock, 
-//GO(PR_DestroyMonitor, 
+GO(PR_DestroyLock, vFp)
+GO(PR_DestroyMonitor, vFp)
 GO(PR_DestroyMWaitEnumerator, iFp)
 //GO(PR_DestroyOrderedLock, 
 //GO(PR_DestroyPollableEvent, 
@@ -102,7 +102,7 @@ GO(PR_DuplicateEnvironment, pFv)
 GO(PR_EmulateAcceptRead, iFppppiu)
 GO(PR_EmulateSendFile, iFppiu)
 //GO(PR_EnableClockInterrupts, 
-//GO(PR_EnterMonitor, 
+GO(PR_EnterMonitor, vFp)
 GO(PR_EnumerateAddrInfo, pFppWp)
 GO(PR_EnumerateHostEnt, iFipWp)
 //GO(PR_EnumerateThreads, 
@@ -112,7 +112,7 @@ GO(PR_ErrorInstallTable, iFp)
 GO(PR_ErrorLanguages, pFv)
 GO(PR_ErrorToName, pFi)
 GO(PR_ErrorToString, pFiu)
-//GO(PR_ExitMonitor, 
+GO(PR_ExitMonitor, iFp)
 //GO(PR_ExplodeTime, 
 GO(PR_ExportFileMapAsString, iFpLp)
 //GO(PR_FD_CLR, 
@@ -146,7 +146,7 @@ GO(PR_GetCanonNameFromAddrInfo, pFp)
 //GO(PR_GetCounterHandleFromName, 
 //GO(PR_GetCounterNameFromHandle, 
 GO(PR_GetCurrentThread, pFv)
-//GO(PR_GetDefaultIOMethods, 
+GO(PR_GetDefaultIOMethods, pFv)
 //GO(PR_GetDescType, 
 //GO(PR_GetDirectorySeparator, 
 //GO(PR_GetDirectorySepartor, 
@@ -161,7 +161,7 @@ GO(PR_GetFileInfo64, iFpp)
 //GO(PR_GetGCRegisters, 
 GO(PR_GetHostByAddr, iFppip)
 GO(PR_GetHostByName, iFppip)
-//GO(PR_GetIdentitiesLayer, 
+GO(PR_GetIdentitiesLayer, pFpi)
 //GO(PR_GetInheritedFD, 
 //GO(PR_GetInheritedFileMap, 
 GO(PR_GetIPNodeByName, iFpWipip)
@@ -185,7 +185,7 @@ GO(PR_GetPhysicalMemorySize, LFv)
 GO(PR_GetProtoByName, iFppip)
 GO(PR_GetProtoByNumber, iFipip)
 GO(PR_GetRandomNoise, LFpL)
-//GO(PR_GetSocketOption, 
+GO(PR_GetSocketOption, iFpp)
 //GO(PR_GetSockName, 
 //GO(PR_GetSP, 
 //GO(PR_GetSpecialFD, 
@@ -238,7 +238,7 @@ GO(PR_KillProcess, iFp)
 //GO(PR_LoadLibraryWithFlags, 
 //GO(PR_LoadStaticLibrary, 
 //GO(PR_LocalTimeParameters, 
-//GO(PR_Lock, 
+GO(PR_Lock, vFp)
 //GO(PR_LockFile, 
 //GO(PR_LockOrderedLock, 
 //GO(PR_LogFlush, 
@@ -248,7 +248,7 @@ GO(PR_Malloc, pFu)
 //GO(PR_MemMap, pFplu)  // needs wrapping
 //GO(PR_MemUnmap, iFpu) // needs wrapping
 GO(PR_MicrosecondsToInterval, uFu)
-//GO(PR_MillisecondsToInterval, 
+GO(PR_MillisecondsToInterval, uFu)
 //GO(PR_MkDir, 
 GO(PR_NetAddrToString, iFppu)
 GO(PR_NewCondVar, pFp)
@@ -289,7 +289,7 @@ GO(PR_ParseTimeStringToExplodedTime, iFpip)
 //GO(PRP_NakedWait, 
 //GO(PRP_NewNakedCondVar, 
 //GO(PR_Poll, 
-//GO(PR_PopIOLayer, 
+GO(PR_PopIOLayer, pFpi)
 //GO(PR_PostSem, 
 //GO(PR_PostSemaphore, 
 GO(PR_ProcessAttrSetCurrentDirectory, iFpp)
@@ -298,7 +298,7 @@ GO(PR_ProcessAttrSetInheritableFileMap, iFppp)
 //GO(PR_ProcessAttrSetStdioRedirect, 
 //GO(PR_ProcessExit, 
 //GO(PRP_TryLock, 
-//GO(PR_PushIOLayer, 
+GO(PR_PushIOLayer, iFpip)
 //GO(_pr_push_ipv6toipv4_layer, 
 //GO(PR_QueueJob, 
 //GO(PR_QueueJob_Accept, 
diff --git a/src/wrapped/wrappednss3.c b/src/wrapped/wrappednss3.c
index e64ac396..a655bebd 100644
--- a/src/wrapped/wrappednss3.c
+++ b/src/wrapped/wrappednss3.c
@@ -141,6 +141,28 @@ static void* find_PORTCharConversionWSwapFunc_Fct(void* fct)
     printf_log(LOG_NONE, "Warning, no more slot for nss3 PORTCharConversionWSwapFunc callback\n");
     return NULL;
 }
+// NSS_ShutdownFunc ...
+#define GO(A)   \
+static uintptr_t my_NSS_ShutdownFunc_fct_##A = 0;                           \
+static int my_NSS_ShutdownFunc_##A(void* a, void* b)                        \
+{                                                                           \
+    return (int)RunFunctionFmt(my_NSS_ShutdownFunc_fct_##A, "pp", a, b);    \
+}
+SUPER()
+#undef GO
+static void* find_NSS_ShutdownFunc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_NSS_ShutdownFunc_fct_##A == (uintptr_t)fct) return my_NSS_ShutdownFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_NSS_ShutdownFunc_fct_##A == 0) {my_NSS_ShutdownFunc_fct_##A = (uintptr_t)fct; return my_NSS_ShutdownFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for nss3 NSS_ShutdownFunc callback\n");
+    return NULL;
+}
 
 #undef SUPER
 
@@ -206,6 +228,11 @@ EXPORT void my_PORT_SetUCS2_ASCIIConversionFunction(x64emu_t* emu, void* f)
     my->PORT_SetUCS2_ASCIIConversionFunction(find_PORTCharConversionWSwapFunc_Fct(f));
 }
 
+EXPORT int my_NSS_RegisterShutdown(x64emu_t* emu, void* f, void* data)
+{
+    return my->NSS_RegisterShutdown(find_NSS_ShutdownFunc_Fct(f), data);
+}
+
 #define CUSTOM_INIT \
     getMy(lib);
 
diff --git a/src/wrapped/wrappednss3_private.h b/src/wrapped/wrappednss3_private.h
index 4571086e..e5df51e8 100644
--- a/src/wrapped/wrappednss3_private.h
+++ b/src/wrapped/wrappednss3_private.h
@@ -278,7 +278,7 @@ GO(HASH_GetHashObject, pFu)
 GO(HASH_GetHashObjectByOidTag, pFu)
 GO(HASH_GetHashOidTagByHashType, uFu)
 GO(HASH_GetHashTypeByOidTag, uFu)
-//GO(HASH_GetType, 
+GO(HASH_GetType, iFp)
 GO(HASH_HashBuf, iFuppu)
 GO(HASH_ResultLen, uFu)
 GO(HASH_ResultLenByOidTag, uFu)
@@ -341,7 +341,7 @@ GO(NSS_NoDB_Init, iFp)
 //GO(NSS_OptionGet, 
 //GO(NSS_OptionSet, 
 //GO(NSS_PutEnv, 
-//GO(NSS_RegisterShutdown, 
+GOM(NSS_RegisterShutdown, iFEpp)
 //GO(NSSRWLock_Destroy, 
 GO(NSSRWLock_HaveWriteLock, iFp)
 //GO(NSSRWLock_LockRead, 
@@ -372,7 +372,7 @@ GO(PK11_ConvertSessionPrivKeyToTokenPrivKey, pFpp)
 GO(PK11_ConvertSessionSymKeyToTokenSymKey, pFpp)
 GO(PK11_CopySymKeyForSigning, pFpL)
 GO(PK11_CopyTokenPrivKeyToSessionPrivKey, pFpp)
-//GO(__PK11_CreateContextByRawKey, 
+GO(__PK11_CreateContextByRawKey, pFpiiippp)
 GO(PK11_CreateContextBySymKey, pFLLpp)
 GO(PK11_CreateDigestContext, pFu)
 GO(PK11_CreateGenericObject, pFppii)
@@ -398,7 +398,7 @@ GO(PK11_DestroyMergeLog, vFp)
 GO(PK11_DestroyObject, iFpL)
 GO(PK11_DestroyPBEParams, vFp)
 GO(PK11_DestroyTokenObject, iFpL)
-//GO(PK11_DigestBegin, 
+GO(PK11_DigestBegin, iFp)
 GO(PK11_DigestFinal, iFpppu)
 GO(PK11_DigestKey, iFpp)
 GO(PK11_DigestOp, iFppu)
@@ -487,7 +487,7 @@ GO(PK11_GetPBEIV, pFpp)
 GO(PK11_GetPQGParamsFromPrivateKey, pFp)
 GO(PK11_GetPrevGenericObject, pFp)
 GO(PK11_GetPrivateKeyNickname, pFp)
-//GO(PK11_GetPrivateModulusLen, 
+GO(PK11_GetPrivateModulusLen, iFp)
 GO(PK11_GetPublicKeyNickname, pFp)
 GO(PK11_GetSlotFromKey, pFp)
 GO(PK11_GetSlotFromPrivateKey, pFp)
@@ -495,7 +495,7 @@ GO(PK11_GetSlotID, LFp)
 GO(PK11_GetSlotInfo, iFpp)
 GO(PK11_GetSlotName, pFp)
 GO(PK11_GetSlotPWValues, vFppp)
-//GO(PK11_GetSlotSeries, 
+GO(PK11_GetSlotSeries, iFp)
 GO(PK11_GetSymKeyHandle, LFp)
 GO(PK11_GetSymKeyNickname, pFp)
 GO(PK11_GetSymKeyType, LFp)
@@ -580,12 +580,12 @@ GO(PK11_PQG_VerifyParams, iFppp)
 GO(PK11_PrivDecrypt, iFpLpppupu)
 GO(PK11_PrivDecryptPKCS1, iFpppupu)
 //GO(PK11_ProtectedAuthenticationPath, 
-//GO(PK11_PubDecryptRaw, 
+GO(PK11_PubDecryptRaw, iFpppupu)
 GO(PK11_PubDerive, pFppippLLLip)
 GO(PK11_PubDeriveWithKDF, pFppippLLLiLpp)
 GO(PK11_PubEncrypt, iFpLpppupup)
 GO(PK11_PubEncryptPKCS1, iFpppup)
-//GO(PK11_PubEncryptRaw, 
+GO(PK11_PubEncryptRaw, iFpppup)
 GO(PK11_PubUnwrapSymKey, pFppLLi)
 //GO(PK11_PubUnwrapSymKeyWithFlags, 
 GO(PK11_PubUnwrapSymKeyWithFlagsPerm, pFppLLiLi)
@@ -594,7 +594,7 @@ GO(PK11_RandomUpdate, iFpL)
 GO(PK11_RawPBEKeyGen, pFpLppip)
 GO(PK11_ReadRawAttribute, iFipLp)
 GO(PK11_ReferenceSlot, pFp)
-//GO(PK11_ReferenceSymKey, 
+GO(PK11_ReferenceSymKey, pFp)
 //GO(PK11_ResetToken, 
 GO(PK11_RestoreContext, iFppi)
 GO(PK11_SaveContext, iFpppi)
@@ -753,7 +753,7 @@ GO(SECKEY_NewPrivateKeyList, pFv)
 //DATA(SECKEY_PointerToEncryptedPrivateKeyInfoTemplate, 
 //DATA(SECKEY_PointerToPrivateKeyInfoTemplate, 
 DATA(SECKEY_PrivateKeyInfoTemplate, 192)
-//GO(SECKEY_PublicKeyStrength, 
+GO(SECKEY_PublicKeyStrength, uFp)
 GO(SECKEY_PublicKeyStrengthInBits, uFp)
 GO(SECKEY_RemovePrivateKeyListNode, vFp)
 //DATA(SECKEY_RSAPSSParamsTemplate, 
@@ -845,7 +845,7 @@ GO(SGN_End, iFpp)
 GO(SGN_NewContext, pFup)
 GO(SGN_NewContextWithAlgorithmID, pFpp)
 GO(SGN_Update, iFppu)
-//GO(VFY_Begin, 
+GO(VFY_Begin, iFp)
 GO(VFY_CreateContext, pFppup)
 GO(VFY_CreateContextDirect, pFppuupp)
 GO(VFY_CreateContextWithAlgorithmID, pFppppp)
diff --git a/src/wrapped/wrappednssutil3_private.h b/src/wrapped/wrappednssutil3_private.h
index aa819821..1605e440 100644
--- a/src/wrapped/wrappednssutil3_private.h
+++ b/src/wrapped/wrappednssutil3_private.h
@@ -62,14 +62,14 @@
 //GO(NSS_Get_sgn_DigestInfoTemplate_Util, 
 //GO(NSS_InitializePRErrorTable, 
 //GO(NSS_PutEnv_Util, 
-//GO(NSSRWLock_Destroy_Util, 
+GO(NSSRWLock_Destroy_Util, vFp)
 //GO(NSSRWLock_HaveWriteLock_Util, 
-//GO(NSSRWLock_LockRead_Util, 
-//GO(NSSRWLock_LockWrite_Util, 
-//GO(NSSRWLock_New_Util, 
-//GO(NSSRWLock_UnlockRead_Util, 
-//GO(NSSRWLock_UnlockWrite_Util, 
-//GO(NSS_SecureMemcmp, 
+GO(NSSRWLock_LockRead_Util, vFp)
+GO(NSSRWLock_LockWrite_Util, vFp)
+GO(NSSRWLock_New_Util, pFup)
+GO(NSSRWLock_UnlockRead_Util, vFp)
+GO(NSSRWLock_UnlockWrite_Util, vFp)
+GO(NSS_SecureMemcmp, iFppL)
 //GO(NSS_SecureMemcmpZero, 
 GO(NSS_SetAlgorithmPolicy, iFiuu)
 //GO(NSSUTIL_AddNSSFlagToModuleSpec, 
@@ -106,38 +106,38 @@ GO(NSS_SetAlgorithmPolicy, iFiuu)
 //GO(PK11URI_GetPathAttribute, 
 //GO(PK11URI_GetQueryAttribute, 
 //GO(PK11URI_ParseURI, 
-//GO(PORT_Alloc_Util, 
-//GO(PORT_ArenaAlloc_Util, 
+GO(PORT_Alloc_Util, pFL)
+GO(PORT_ArenaAlloc_Util, pFpL)
 //GO(PORT_ArenaGrow_Util, 
-//GO(PORT_ArenaMark_Util, 
-//GO(PORT_ArenaRelease_Util, 
+GO(PORT_ArenaMark_Util, pFp)
+GO(PORT_ArenaRelease_Util, vFpp)
 //GO(PORT_ArenaStrdup_Util, 
-//GO(PORT_ArenaUnmark_Util, 
-//GO(PORT_ArenaZAlloc_Util, 
+GO(PORT_ArenaUnmark_Util, vFpp)
+GO(PORT_ArenaZAlloc_Util, pFpL)
 //GO(PORT_DestroyCheapArena, 
-//GO(PORT_FreeArena_Util, 
-//GO(PORT_Free_Util, 
-//GO(PORT_GetError_Util, 
+GO(PORT_FreeArena_Util, vFpi)
+GO(PORT_Free_Util, vFp)
+GO(PORT_GetError_Util, iFv)
 //GO(PORT_InitCheapArena, 
 //GO(PORT_ISO88591_UTF8Conversion, 
 //GO(PORT_LoadLibraryFromOrigin, 
-//GO(PORT_NewArena_Util, 
-//GO(PORT_Realloc_Util, 
+GO(PORT_NewArena_Util, pFL)
+GO(PORT_Realloc_Util, pFpL)
 //GO(PORT_RegExpCaseSearch, 
 //GO(PORT_RegExpSearch, 
 //GO(PORT_RegExpValid, 
-//GO(PORT_SetError_Util, 
+GO(PORT_SetError_Util, vFi)
 //GO(PORT_SetUCS2_ASCIIConversionFunction_Util, 
 //GO(PORT_SetUCS2_UTF8ConversionFunction_Util, 
 //GO(PORT_SetUCS4_UTF8ConversionFunction_Util, 
-//GO(PORT_Strdup_Util, 
+GO(PORT_Strdup_Util, pFp)
 //GO(PORT_UCS2_ASCIIConversion_Util, 
 //GO(PORT_UCS2_UTF8Conversion_Util, 
 //GO(PORT_UCS4_UTF8Conversion, 
 //GO(PORT_ZAllocAlignedOffset_Util, 
 //GO(PORT_ZAllocAligned_Util, 
-//GO(PORT_ZAlloc_Util, 
-//GO(PORT_ZFree_Util, 
+GO(PORT_ZAlloc_Util, pFL)
+GO(PORT_ZFree_Util, vFpL)
 //DATA(SEC_AnyTemplate_Util, //R-type
 //GO(SEC_ASN1DecodeInteger_Util, 
 //GO(SEC_ASN1DecodeItem_Util, 
@@ -174,14 +174,14 @@ GO(NSS_SetAlgorithmPolicy, iFiuu)
 //DATA(SEC_IA5StringTemplate_Util, //R-type
 //DATA(SEC_IntegerTemplate_Util, //R-type
 //GO(SECITEM_AllocArray, 
-//GO(SECITEM_AllocItem_Util, 
+GO(SECITEM_AllocItem_Util, pFppu)
 //GO(SECITEM_ArenaDupItem_Util, 
-//GO(SECITEM_CompareItem_Util, 
-//GO(SECITEM_CopyItem_Util, 
+GO(SECITEM_CompareItem_Util, iFpp)
+GO(SECITEM_CopyItem_Util, iFppp)
 //GO(SECITEM_DupArray, 
 //GO(SECITEM_DupItem_Util, 
 //GO(SECITEM_FreeArray, 
-//GO(SECITEM_FreeItem_Util, 
+GO(SECITEM_FreeItem_Util, vFpi)
 //GO(SECITEM_Hash, 
 //GO(SECITEM_HashCompare, 
 //GO(SECITEM_ItemsAreEqual_Util, 
@@ -189,7 +189,7 @@ GO(NSS_SetAlgorithmPolicy, iFiuu)
 //GO(SECITEM_ReallocItem, 
 //GO(SECITEM_ReallocItemV2, 
 //GO(SECITEM_ZfreeArray, 
-//GO(SECITEM_ZfreeItem_Util, 
+GO(SECITEM_ZfreeItem_Util, vFpi)
 //DATA(SEC_NullTemplate_Util, //R-type
 //DATA(SEC_ObjectIDTemplate_Util, //R-type
 //DATA(SEC_OctetStringTemplate_Util, //R-type
@@ -199,11 +199,11 @@ GO(NSS_SetAlgorithmPolicy, iFiuu)
 //GO(SECOID_CopyAlgorithmID_Util, 
 //GO(SECOID_DestroyAlgorithmID_Util, 
 //GO(SECOID_FindOIDByMechanism, 
-//GO(SECOID_FindOIDByTag_Util, 
+GO(SECOID_FindOIDByTag_Util, pFi)
 //GO(SECOID_FindOIDTagDescription_Util, 
 //GO(SECOID_FindOIDTag_Util, 
-//GO(SECOID_FindOID_Util, 
-//GO(SECOID_GetAlgorithmTag_Util, 
+GO(SECOID_FindOID_Util, pFp)
+GO(SECOID_GetAlgorithmTag_Util, iFp)
 //GO(SECOID_Init, 
 //GO(SECOID_KnownCertExtenOID, 
 //GO(SECOID_SetAlgorithmID_Util,