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.txt3
-rw-r--r--src/wrapped/generated/wrappednss3types.h1
-rw-r--r--src/wrapped/generated/wrapper.c6
-rw-r--r--src/wrapped/generated/wrapper.h2
-rwxr-xr-xsrc/wrapped/wrappednss3.c27
-rwxr-xr-xsrc/wrapped/wrappednss3_private.h82
6 files changed, 80 insertions, 41 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 0d3f7ca0..6179cf50 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -69,6 +69,7 @@
 #() lFl
 #() lFp
 #() LFv
+#() LFi
 #() LFu
 #() LFL
 #() LFp
@@ -1271,6 +1272,7 @@
 #() iFpLlpp
 #() iFpLLpp
 #() iFpLppi
+#() iFpLppp
 #() iFppiiu
 #() iFppiip
 #() iFppiup
@@ -3826,6 +3828,7 @@ wrappednspr4:
 wrappednss3:
 - vFp:
   - PK11_SetPasswordFunc
+  - PORT_SetUCS2_ASCIIConversionFunction
 - iFpp:
   - CERT_RegisterAlternateOCSPAIAInfoCallBack
 - iFpIppp:
diff --git a/src/wrapped/generated/wrappednss3types.h b/src/wrapped/generated/wrappednss3types.h
index 5681adf9..92ddfb0f 100644
--- a/src/wrapped/generated/wrappednss3types.h
+++ b/src/wrapped/generated/wrappednss3types.h
@@ -17,6 +17,7 @@ typedef int64_t (*iFpIppp_t)(void*, int64_t, void*, void*, void*);
 
 #define SUPER() ADDED_FUNCTIONS() \
 	GO(PK11_SetPasswordFunc, vFp_t) \
+	GO(PORT_SetUCS2_ASCIIConversionFunction, vFp_t) \
 	GO(CERT_RegisterAlternateOCSPAIAInfoCallBack, iFpp_t) \
 	GO(CERT_PKIXVerifyCert, iFpIppp_t)
 
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 10e56578..2393ddec 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -103,6 +103,7 @@ typedef intptr_t (*lFu_t)(uint64_t);
 typedef intptr_t (*lFl_t)(intptr_t);
 typedef intptr_t (*lFp_t)(void*);
 typedef uintptr_t (*LFv_t)(void);
+typedef uintptr_t (*LFi_t)(int64_t);
 typedef uintptr_t (*LFu_t)(uint64_t);
 typedef uintptr_t (*LFL_t)(uintptr_t);
 typedef uintptr_t (*LFp_t)(void*);
@@ -1305,6 +1306,7 @@ typedef int64_t (*iFpLiLi_t)(void*, uintptr_t, int64_t, uintptr_t, int64_t);
 typedef int64_t (*iFpLlpp_t)(void*, uintptr_t, intptr_t, void*, void*);
 typedef int64_t (*iFpLLpp_t)(void*, uintptr_t, uintptr_t, void*, void*);
 typedef int64_t (*iFpLppi_t)(void*, uintptr_t, void*, void*, int64_t);
+typedef int64_t (*iFpLppp_t)(void*, uintptr_t, void*, void*, void*);
 typedef int64_t (*iFppiiu_t)(void*, void*, int64_t, int64_t, uint64_t);
 typedef int64_t (*iFppiip_t)(void*, void*, int64_t, int64_t, void*);
 typedef int64_t (*iFppiup_t)(void*, void*, int64_t, uint64_t, void*);
@@ -2478,6 +2480,7 @@ void lFu(x64emu_t *emu, uintptr_t fcn) { lFu_t fn = (lFu_t)fcn; R_RAX=(intptr_t)
 void lFl(x64emu_t *emu, uintptr_t fcn) { lFl_t fn = (lFl_t)fcn; R_RAX=(intptr_t)fn((intptr_t)R_RDI); }
 void lFp(x64emu_t *emu, uintptr_t fcn) { lFp_t fn = (lFp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI); }
 void LFv(x64emu_t *emu, uintptr_t fcn) { LFv_t fn = (LFv_t)fcn; R_RAX=(uintptr_t)fn(); }
+void LFi(x64emu_t *emu, uintptr_t fcn) { LFi_t fn = (LFi_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI); }
 void LFu(x64emu_t *emu, uintptr_t fcn) { LFu_t fn = (LFu_t)fcn; R_RAX=(uintptr_t)fn((uint64_t)R_RDI); }
 void LFL(x64emu_t *emu, uintptr_t fcn) { LFL_t fn = (LFL_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI); }
 void LFp(x64emu_t *emu, uintptr_t fcn) { LFp_t fn = (LFp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI); }
@@ -3680,6 +3683,7 @@ void iFpLiLi(x64emu_t *emu, uintptr_t fcn) { iFpLiLi_t fn = (iFpLiLi_t)fcn; R_RA
 void iFpLlpp(x64emu_t *emu, uintptr_t fcn) { iFpLlpp_t fn = (iFpLlpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpLLpp(x64emu_t *emu, uintptr_t fcn) { iFpLLpp_t fn = (iFpLLpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpLppi(x64emu_t *emu, uintptr_t fcn) { iFpLppi_t fn = (iFpLppi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8); }
+void iFpLppp(x64emu_t *emu, uintptr_t fcn) { iFpLppp_t fn = (iFpLppp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFppiiu(x64emu_t *emu, uintptr_t fcn) { iFppiiu_t fn = (iFppiiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (uint64_t)R_R8); }
 void iFppiip(x64emu_t *emu, uintptr_t fcn) { iFppiip_t fn = (iFppiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8); }
 void iFppiup(x64emu_t *emu, uintptr_t fcn) { iFppiup_t fn = (iFppiup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8); }
@@ -4857,6 +4861,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &lFl) return 1;
 	if (fun == &lFp) return 1;
 	if (fun == &LFv) return 1;
+	if (fun == &LFi) return 1;
 	if (fun == &LFu) return 1;
 	if (fun == &LFL) return 1;
 	if (fun == &LFp) return 1;
@@ -5838,6 +5843,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpLlpp) return 1;
 	if (fun == &iFpLLpp) return 1;
 	if (fun == &iFpLppi) return 1;
+	if (fun == &iFpLppp) return 1;
 	if (fun == &iFppiiu) return 1;
 	if (fun == &iFppiip) return 1;
 	if (fun == &iFppiup) return 1;
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 309f0160..790b8224 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -102,6 +102,7 @@ void lFu(x64emu_t *emu, uintptr_t fnc);
 void lFl(x64emu_t *emu, uintptr_t fnc);
 void lFp(x64emu_t *emu, uintptr_t fnc);
 void LFv(x64emu_t *emu, uintptr_t fnc);
+void LFi(x64emu_t *emu, uintptr_t fnc);
 void LFu(x64emu_t *emu, uintptr_t fnc);
 void LFL(x64emu_t *emu, uintptr_t fnc);
 void LFp(x64emu_t *emu, uintptr_t fnc);
@@ -1304,6 +1305,7 @@ void iFpLiLi(x64emu_t *emu, uintptr_t fnc);
 void iFpLlpp(x64emu_t *emu, uintptr_t fnc);
 void iFpLLpp(x64emu_t *emu, uintptr_t fnc);
 void iFpLppi(x64emu_t *emu, uintptr_t fnc);
+void iFpLppp(x64emu_t *emu, uintptr_t fnc);
 void iFppiiu(x64emu_t *emu, uintptr_t fnc);
 void iFppiip(x64emu_t *emu, uintptr_t fnc);
 void iFppiup(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappednss3.c b/src/wrapped/wrappednss3.c
index 2b10bb41..00a0766f 100755
--- a/src/wrapped/wrappednss3.c
+++ b/src/wrapped/wrappednss3.c
@@ -119,6 +119,28 @@ static void* reverse_CERTChainVerifyCallbackFunc_Fct(library_t* lib, void* fct)
     #undef GO
     return (void*)AddBridge(lib->w.bridge, iFppp, fct, 0, NULL);
 }
+// PORTCharConversionWSwapFunc ...
+#define GO(A)   \
+static uintptr_t my_PORTCharConversionWSwapFunc_fct_##A = 0;                                                    \
+static int my_PORTCharConversionWSwapFunc_##A(int a, void* b, uint32_t c, void* d, uint32_t e, void* f, int g)  \
+{                                                                                                               \
+    return (int)RunFunction(my_context, my_PORTCharConversionWSwapFunc_fct_##A, 7, a, b, c, d, e, f, g);        \
+}
+SUPER()
+#undef GO
+static void* find_PORTCharConversionWSwapFunc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_PORTCharConversionWSwapFunc_fct_##A == (uintptr_t)fct) return my_PORTCharConversionWSwapFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_PORTCharConversionWSwapFunc_fct_##A == 0) {my_PORTCharConversionWSwapFunc_fct_##A = (uintptr_t)fct; return my_PORTCharConversionWSwapFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for nss3 PORTCharConversionWSwapFunc callback\n");
+    return NULL;
+}
 
 #undef SUPER
 
@@ -179,6 +201,11 @@ EXPORT int my_CERT_PKIXVerifyCert(x64emu_t* emu, void* cert, int64_t usages, my_
     return ret;
 }
 
+EXPORT void my_PORT_SetUCS2_ASCIIConversionFunction(x64emu_t* emu, void* f)
+{
+    my->PORT_SetUCS2_ASCIIConversionFunction(find_PORTCharConversionWSwapFunc_Fct(f));
+}
+
 #define CUSTOM_INIT \
     getMy(lib);
 
diff --git a/src/wrapped/wrappednss3_private.h b/src/wrapped/wrappednss3_private.h
index bbe3dbae..d45df766 100755
--- a/src/wrapped/wrappednss3_private.h
+++ b/src/wrapped/wrappednss3_private.h
@@ -29,7 +29,7 @@
 DATA(CERT_CertificateTemplate, 480)
 //GO(CERT_CertListFromCert, 
 //GO(CERT_CertTimesValid, 
-//GO(CERT_ChangeCertTrust, 
+GO(CERT_ChangeCertTrust, iFppp)
 //GO(CERT_CheckCertUsage, 
 GO(CERT_CheckCertValidTimes, iFpIi)
 //GO(CERT_CheckNameSpace, 
@@ -60,12 +60,12 @@ GO(CERT_CreateValidity, pFII)
 //GO(CERT_CRLCacheRefreshIssuer, 
 //DATA(CERT_CrlTemplate, 
 GO(CERT_DecodeAltNameExtension, pFpp)
-//GO(CERT_DecodeAuthInfoAccessExtension, 
-//GO(CERT_DecodeAuthKeyID, 
+GO(CERT_DecodeAuthInfoAccessExtension, pFpp)
+GO(CERT_DecodeAuthKeyID, pFpp)
 GO(CERT_DecodeAVAValue, pFp)
-//GO(CERT_DecodeBasicConstraintValue, 
+GO(CERT_DecodeBasicConstraintValue, iFpp)
 GO(CERT_DecodeCertificatePoliciesExtension, pFp)
-//GO(CERT_DecodeCRLDistributionPoints, 
+GO(CERT_DecodeCRLDistributionPoints, pFpp)
 //GO(__CERT_DecodeDERCertificate, 
 //GO(CERT_DecodeDERCrl, 
 //GO(CERT_DecodeDERCrlWithFlags, 
@@ -73,10 +73,10 @@ GO(CERT_DecodeCertificatePoliciesExtension, pFp)
 //GO(CERT_DecodeNameConstraintsExtension, 
 //GO(CERT_DecodeOCSPRequest, 
 //GO(CERT_DecodeOCSPResponse, 
-//GO(CERT_DecodeOidSequence, 
+GO(CERT_DecodeOidSequence, pFp)
 //GO(CERT_DecodePrivKeyUsagePeriodExtension, 
 //GO(CERT_DecodeTrustString, 
-//GO(CERT_DecodeUserNotice, 
+GO(CERT_DecodeUserNotice, pFp)
 //GO(CERT_DerNameToAscii, 
 //GO(CERT_DestroyCertArray, 
 GO(CERT_DestroyCertificate, vFp)
@@ -89,8 +89,8 @@ GO(CERT_DestroyCertList, vFp)
 //GO(CERT_DestroyOCSPCertID, 
 //GO(CERT_DestroyOCSPRequest, 
 //GO(CERT_DestroyOCSPResponse, 
-//GO(CERT_DestroyOidSequence, 
-//GO(CERT_DestroyUserNotice, 
+GO(CERT_DestroyOidSequence, vFp)
+GO(CERT_DestroyUserNotice, vFp)
 GO(CERT_DestroyValidity, vFp)
 //GO(CERT_DisableOCSPChecking, 
 //GO(CERT_DisableOCSPDefaultResponder, 
@@ -120,10 +120,10 @@ GO(CERT_ExtractPublicKey, pFp)
 //GO(CERT_FilterCertListByCANames, 
 //GO(CERT_FilterCertListByUsage, 
 //GO(CERT_FilterCertListForUserCerts, 
-//GO(CERT_FindCertByDERCert, 
+GO(CERT_FindCertByDERCert, pFpp)
 //GO(CERT_FindCertByIssuerAndSN, 
 //GO(CERT_FindCertByIssuerAndSNCX, 
-//GO(CERT_FindCertByName, 
+GO(CERT_FindCertByName, pFpp)
 //GO(CERT_FindCertByNickname, 
 //GO(CERT_FindCertByNicknameOrEmailAddr, 
 //GO(CERT_FindCertByNicknameOrEmailAddrCX, 
@@ -139,7 +139,7 @@ GO(CERT_FindCertExtension, iFppp)
 //GO(CERT_FindSMimeProfile, 
 //GO(CERT_FindSubjectKeyIDExtension, 
 //GO(CERT_FindUserCertByUsage, 
-//GO(CERT_FindUserCertsByUsage, 
+GO(CERT_FindUserCertsByUsage, pFpiiip)
 //GO(CERT_FinishCertificateRequestAttributes, 
 //GO(CERT_FinishExtensions, 
 //GO(CERT_ForcePostMethodForOCSP, 
@@ -158,7 +158,7 @@ GO(CERT_GetCertEmailAddress, pFp)
 //GO(CERT_GetCertIsTemp, 
 //GO(CERT_GetCertKeyType, 
 //GO(CERT_GetCertNicknames, 
-//GO(CERT_GetCertTimes, 
+GO(CERT_GetCertTimes, iFppp)
 GO(CERT_GetCertTrust, iFpp)
 GO(CERT_GetCertUid, pFp)
 //GO(CERT_GetClassicOCSPDisabledPolicy, 
@@ -171,7 +171,7 @@ GO(CERT_GetCountryName, pFp)
 GO(CERT_GetDefaultCertDB, pFv)
 GO(CERT_GetDomainComponentName, pFp)
 //GO(CERT_GetEncodedOCSPResponse, 
-//GO(CERT_GetFirstEmailAddress, 
+GO(CERT_GetFirstEmailAddress, pFp)
 //GO(CERT_GetGeneralNameTypeFromString, 
 //GO(CERT_GetImposedNameConstraints, 
 GO(CERT_GetLocalityName, pFp)
@@ -181,7 +181,7 @@ GO(CERT_GetNextGeneralName, pFp)
 //GO(CERT_GetOCSPAuthorityInfoAccessLocation, 
 //GO(CERT_GetOCSPResponseStatus, 
 //GO(CERT_GetOCSPStatusForCertID, 
-//GO(CERT_GetOidString, 
+GO(CERT_GetOidString, pFp)
 GO(CERT_GetOrgName, pFp)
 GO(CERT_GetOrgUnitName, pFp)
 //GO(CERT_GetPKIXVerifyNistRevocationPolicy, 
@@ -194,18 +194,18 @@ GO(CERT_GetStateName, pFp)
 //GO(CERT_GetSubjectPublicKeyDigest, 
 //GO(CERT_GetUsePKIXForValidation, 
 //GO(CERT_GetValidDNSPatternsFromCert, 
-//GO(CERT_Hexify, 
+GO(CERT_Hexify, pFpi)
 //GO(CERT_ImportCAChain, 
 //GO(CERT_ImportCAChainTrusted, 
 //GO(CERT_ImportCerts, 
 //GO(CERT_ImportCRL, 
-//GO(CERT_IsCACert, 
+GO(CERT_IsCACert, iFpp)
 //GO(CERT_IsCADERCert, 
 //GO(CERT_IsRootDERCert, 
 //DATA(CERT_IssuerAndSNTemplate, 
 //GO(CERT_IsUserCert, 
 //GO(CERT_KeyFromDERCrl, 
-//GO(CERT_MakeCANickname, 
+GO(CERT_MakeCANickname, pFp)
 //GO(CERT_MergeExtensions, 
 DATA(CERT_NameTemplate, 4*sizeof(void*))
 //GO(CERT_NameToAscii, 
@@ -241,9 +241,9 @@ DATA(CERT_SignedDataTemplate, 160)
 //GO(__CERT_TraversePermCertsForSubject, 
 //GO(CERT_UncacheCRL, 
 //GO(CERT_VerifyCACertForUsage, 
-//GO(CERT_VerifyCert, 
+GO(CERT_VerifyCert, iFpp)
 //GO(CERT_VerifyCertificate, 
-//GO(CERT_VerifyCertificateNow, 
+GO(CERT_VerifyCertificateNow, iFppiipp)
 //GO(CERT_VerifyCertName, 
 //GO(CERT_VerifyCertNow, 
 //GO(CERT_VerifyOCSPResponseSignature, 
@@ -402,7 +402,7 @@ GO(PK11_DestroyTokenObject, iFpL)
 //GO(PK11_DigestFinal, 
 //GO(PK11_DigestKey, 
 //GO(PK11_DigestOp, 
-//GO(PK11_DoesMechanism, 
+GO(PK11_DoesMechanism, iFpL)
 //GO(PK11_Encrypt, 
 //GO(PK11_ExportDERPrivateKeyInfo, 
 //GO(PK11_ExportEncryptedPrivateKeyInfo, 
@@ -419,7 +419,7 @@ GO(PK11_Finalize, iFp)
 GO(PK11_FindCertFromDERCertItem, pFppp)
 //GO(PK11_FindCertFromNickname, 
 //GO(PK11_FindCertFromURI, 
-//GO(PK11_FindCertInSlot, 
+GO(PK11_FindCertInSlot, LFppp)
 //GO(PK11_FindCertsFromEmailAddress, 
 //GO(PK11_FindCertsFromNickname, 
 //GO(PK11_FindCertsFromURI, 
@@ -436,7 +436,7 @@ GO(PK11_FindPrivateKeyFromCert, pFppp)
 //GO(PK11_FortezzaMapSig, 
 GO(PK11_FreeSlot, vFp)
 GO(PK11_FreeSlotList, vFp)
-//GO(PK11_FreeSlotListElement, 
+GO(PK11_FreeSlotListElement, iFpp)
 GO(PK11_FreeSymKey, vFp)
 //GO(PK11_GenerateFortezzaIV, 
 GO(PK11_GenerateKeyPair, pFpLppiip)
@@ -445,7 +445,7 @@ GO(PK11_GenerateKeyPair, pFpLppiip)
 //GO(PK11_GenerateNewParam, 
 //GO(PK11_GenerateRandom, 
 //GO(PK11_GenerateRandomOnSlot, 
-//GO(PK11_GetAllSlotsForCert, 
+GO(PK11_GetAllSlotsForCert, pFpp)
 GO(PK11_GetAllTokens, pFLiip)
 //GO(PK11_GetBestKeyLength, 
 //GO(PK11_GetBestSlot, 
@@ -475,7 +475,7 @@ GO(PK11_GetInternalKeySlot, pFv)
 //GO(PK11_GetMechanism, 
 //GO(PK11_GetMinimumPwdLength, 
 //GO(PK11_GetModInfo, 
-//GO(PK11_GetModule, 
+GO(PK11_GetModule, pFp)
 //GO(PK11_GetModuleID, 
 //GO(PK11_GetModuleURI, 
 //GO(PK11_GetNextGenericObject, 
@@ -507,7 +507,7 @@ GO(PK11_GetTokenName, pFp)
 //GO(PK11_GetWrapKey, 
 //GO(PK11_HasAttributeSet, 
 //GO(PK11_HashBuf, 
-//GO(PK11_HasRootCerts, 
+GO(PK11_HasRootCerts, iFp)
 GO(PK11_ImportCert, iFppLpi)
 //GO(PK11_ImportCertForKey, 
 //GO(PK11_ImportCertForKeyToSlot, 
@@ -531,7 +531,7 @@ GO(PK11_IsHW, iFp)
 GO(PK11_IsInternal, iFp)
 GO(PK11_IsInternalKeySlot, iFp)
 GO(PK11_IsLoggedIn, iFpp)
-//GO(PK11_IsPresent, 
+GO(PK11_IsPresent, iFp)
 GO(PK11_IsReadOnly, iFp)
 GO(PK11_IsRemovable, iFp)
 //GO(PK11_IVFromParam, 
@@ -552,7 +552,7 @@ GO(PK11_ListFixedKeysInSlot, pFppp)
 GO(PK11_MakeIDFromPubKey, pFp)
 //GO(PK11_MakeKEAPubKey, 
 //GO(PK11_MapPBEMechanismToCryptoMechanism, 
-//GO(PK11_MapSignKeyType, 
+GO(PK11_MapSignKeyType, LFi)
 //GO(PK11_MechanismToAlgtag, 
 //GO(PK11_MergeTokens, 
 //GO(PK11_MoveSymKey, 
@@ -613,7 +613,7 @@ GO(PK11_SetPublicKeyNickname, iFpp)
 //GO(PK11_SetWrapKey, 
 GO(PK11_Sign, iFppp)
 GO(PK11_SignatureLen, iFp)
-//GO(PK11_SignWithMechanism, 
+GO(PK11_SignWithMechanism, iFpLppp)
 //GO(PK11_SignWithSymKey, 
 //GO(PK11_SymKeyFromHandle, 
 GO(PK11_TokenExists, iFi)
@@ -640,8 +640,8 @@ GO(PK11_TokenExists, iFi)
 //GO(PK11_WrapPrivKey, 
 //GO(PK11_WrapSymKey, 
 GO(PK11_WriteRawAttribute, iFipLp)
-//GO(PORT_Alloc, 
-//GO(PORT_ArenaAlloc, 
+GO(PORT_Alloc, pFL)
+GO(PORT_ArenaAlloc, pFpL)
 //GO(PORT_ArenaGrow, 
 //GO(PORT_ArenaMark, 
 //GO(PORT_ArenaRelease, 
@@ -653,14 +653,14 @@ GO(PORT_FreeArena, vFpi)
 GO(PORT_GetError, iFv)
 GO(PORT_NewArena, pFL)
 //GO(PORT_Realloc, 
-//GO(PORT_SetError, 
-//GO(PORT_SetUCS2_ASCIIConversionFunction, 
+GO(PORT_SetError, vFi)
+GOM(PORT_SetUCS2_ASCIIConversionFunction, vFEp)
 //GO(PORT_SetUCS2_UTF8ConversionFunction, 
 //GO(PORT_SetUCS4_UTF8ConversionFunction, 
-//GO(PORT_Strdup, 
+GO(PORT_Strdup, pFp)
 //GO(PORT_UCS2_ASCIIConversion, 
-//GO(PORT_UCS2_UTF8Conversion, 
-//GO(PORT_ZAlloc, 
+GO(PORT_UCS2_UTF8Conversion, iFipupup)
+GO(PORT_ZAlloc, pFL)
 //GO(PORT_ZFree, 
 //GO(RSA_FormatBlock, 
 DATA(SEC_AnyTemplate, 4*sizeof(void*))    //R type
@@ -710,14 +710,14 @@ GO(SEC_DerSignData, iFpppipi)
 //GO(SEC_GetSignatureAlgorithmOidTag, 
 DATA(SEC_IA5StringTemplate, 4*sizeof(void*)) //R type
 //DATA(SEC_IntegerTemplate,     //R type
-//GO(SECITEM_AllocItem, 
+GO(SECITEM_AllocItem, pFppu)
 //GO(SECITEM_ArenaDupItem, 
-//GO(SECITEM_CompareItem, 
+GO(SECITEM_CompareItem, iFpp)
 //GO(SECITEM_CopyItem, 
 //GO(SECITEM_DupItem, 
 GO(SECITEM_FreeItem, iFpi)
 //GO(SECITEM_ItemsAreEqual, 
-//GO(SECITEM_ZfreeItem, 
+GO(SECITEM_ZfreeItem, vFpi)
 //GO(SECKEY_AddPrivateKeyToListTail, 
 //GO(SECKEY_BigIntegerBitLength, 
 //GO(SECKEY_CacheStaticFlags, 
@@ -733,7 +733,7 @@ GO(SECITEM_FreeItem, iFpi)
 //GO(SECKEY_CreateSubjectPublicKeyInfo, 
 //GO(SECKEY_DecodeDERSubjectPublicKeyInfo, 
 //GO(SECKEY_DestroyEncryptedPrivateKeyInfo, 
-//GO(SECKEY_DestroyPrivateKey, 
+GO(SECKEY_DestroyPrivateKey, vFp)
 //GO(SECKEY_DestroyPrivateKeyInfo, 
 //GO(SECKEY_DestroyPrivateKeyList, 
 GO(SECKEY_DestroyPublicKey, vFp)
@@ -744,7 +744,7 @@ GO(SECKEY_DestroyPublicKey, vFp)
 //GO(SECKEY_ECParamsToKeySize, 
 //GO(SECKEY_EncodeDERSubjectPublicKeyInfo, 
 DATA(SECKEY_EncryptedPrivateKeyInfoTemplate, 128)
-//GO(SECKEY_ExtractPublicKey, 
+GO(SECKEY_ExtractPublicKey, pFp)
 //GO(SECKEY_GetPrivateKeyType, 
 //GO(SECKEY_GetPublicKeyType, 
 //GO(SECKEY_HashPassword,