From 8b088a223a3ac331753f605151db4faf0fe18aa9 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 23 Jun 2023 00:30:16 +0800 Subject: [PATCH] [WRAPPER] Added more symbols for nss3 --- src/wrapped/generated/functions_list.txt | 1 + src/wrapped/generated/wrapper.c | 3 +++ src/wrapped/generated/wrapper.h | 1 + src/wrapped/wrappednss3_private.h | 12 ++++++------ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 40d1bb89b..0218874d7 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -1024,6 +1024,7 @@ #() CFuuff #() CFpiii #() CFpupp +#() CFpLLi #() CFppip #() uFEipp #() uFEupp diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 6e853fe79..219119ec0 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1060,6 +1060,7 @@ typedef int64_t (*IFSIii_t)(void*, int64_t, int32_t, int32_t); typedef uint8_t (*CFuuff_t)(uint32_t, uint32_t, float, float); typedef uint8_t (*CFpiii_t)(void*, int32_t, int32_t, int32_t); typedef uint8_t (*CFpupp_t)(void*, uint32_t, void*, void*); +typedef uint8_t (*CFpLLi_t)(void*, uintptr_t, uintptr_t, int32_t); typedef uint8_t (*CFppip_t)(void*, void*, int32_t, void*); typedef uint32_t (*uFEipp_t)(x64emu_t*, int32_t, void*, void*); typedef uint32_t (*uFEupp_t)(x64emu_t*, uint32_t, void*, void*); @@ -3883,6 +3884,7 @@ void IFSIii(x64emu_t *emu, uintptr_t fcn) { IFSIii_t fn = (IFSIii_t)fcn; R_RAX=( void CFuuff(x64emu_t *emu, uintptr_t fcn) { CFuuff_t fn = (CFuuff_t)fcn; R_RAX=(unsigned char)fn((uint32_t)R_RDI, (uint32_t)R_RSI, emu->xmm[0].f[0], emu->xmm[1].f[0]); } void CFpiii(x64emu_t *emu, uintptr_t fcn) { CFpiii_t fn = (CFpiii_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); } void CFpupp(x64emu_t *emu, uintptr_t fcn) { CFpupp_t fn = (CFpupp_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } +void CFpLLi(x64emu_t *emu, uintptr_t fcn) { CFpLLi_t fn = (CFpLLi_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX); } void CFppip(x64emu_t *emu, uintptr_t fcn) { CFppip_t fn = (CFppip_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX); } void uFEipp(x64emu_t *emu, uintptr_t fcn) { uFEipp_t fn = (uFEipp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); } void uFEupp(x64emu_t *emu, uintptr_t fcn) { uFEupp_t fn = (uFEupp_t)fcn; R_RAX=(uint32_t)fn(emu, (uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); } @@ -6559,6 +6561,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &CFuuff) return 3; if (fun == &CFpiii) return 1; if (fun == &CFpupp) return 1; + if (fun == &CFpLLi) return 1; if (fun == &CFppip) return 1; if (fun == &uFiiii) return 1; if (fun == &uFiiuu) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 66934c984..8bd47ed10 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -1061,6 +1061,7 @@ void IFSIii(x64emu_t *emu, uintptr_t fnc); void CFuuff(x64emu_t *emu, uintptr_t fnc); void CFpiii(x64emu_t *emu, uintptr_t fnc); void CFpupp(x64emu_t *emu, uintptr_t fnc); +void CFpLLi(x64emu_t *emu, uintptr_t fnc); void CFppip(x64emu_t *emu, uintptr_t fnc); void uFEipp(x64emu_t *emu, uintptr_t fnc); void uFEupp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappednss3_private.h b/src/wrapped/wrappednss3_private.h index 9cc602b97..d82fd99c4 100755 --- a/src/wrapped/wrappednss3_private.h +++ b/src/wrapped/wrappednss3_private.h @@ -153,7 +153,7 @@ GO(CERT_GetCertEmailAddress, pFp) //GO(CERT_GetCertificateDer, //GO(CERT_GetCertificateNames, //GO(CERT_GetCertificateRequestExtensions, -//GO(CERT_GetCertIsPerm, +GO(CERT_GetCertIsPerm, uFpp) //GO(CERT_GetCertIssuerAndSN, //GO(CERT_GetCertIsTemp, //GO(CERT_GetCertKeyType, @@ -329,7 +329,7 @@ GO(HASH_Update, vFppu) //GO(NSS_Get_SEC_UTCTimeTemplate, //GO(NSS_Get_SEC_UTF8StringTemplate, //GO(NSS_Get_sgn_DigestInfoTemplate, -//GO(NSS_GetVersion, +GO(NSS_GetVersion, pFv) //GO(NSS_Init, //GO(NSS_InitContext, //GO(NSS_Initialize, @@ -393,7 +393,7 @@ GO(PK11_DeleteTokenCertAndKey, iFpp) //GO(PK11_DeriveWithTemplate, GO(PK11_DestroyContext, vFpi) //GO(PK11_DestroyGenericObject, -//GO(PK11_DestroyGenericObjects, +GO(PK11_DestroyGenericObjects, uFp) //GO(PK11_DestroyMergeLog, GO(PK11_DestroyObject, iFpL) //GO(PK11_DestroyPBEParams, @@ -424,7 +424,7 @@ GO(PK11_FindCertInSlot, LFppp) //GO(PK11_FindCertsFromNickname, //GO(PK11_FindCertsFromURI, GO(PK11_FindFixedKey, pFpipp) -//GO(PK11_FindGenericObjects, +GO(PK11_FindGenericObjects, pFpL) GO(PK11_FindKeyByAnyCert, pFpp) GO(PK11_FindKeyByDERCert, pFppp) GO(PK11_FindKeyByKeyID, pFppp) @@ -478,7 +478,7 @@ GO(PK11_GetInternalKeySlot, pFv) GO(PK11_GetModule, pFp) //GO(PK11_GetModuleID, //GO(PK11_GetModuleURI, -//GO(PK11_GetNextGenericObject, +GO(PK11_GetNextGenericObject, pFp) GO(PK11_GetNextSafe, pFppi) GO(PK11_GetNextSymKey, pFp) //GO(PK11_GetPadMechanism, @@ -505,7 +505,7 @@ GO(PK11_GetTokenName, pFp) //GO(PK11_GetTokenURI, //GO(PK11_GetWindow, //GO(PK11_GetWrapKey, -//GO(PK11_HasAttributeSet, +GO(PK11_HasAttributeSet, CFpLLi) //GO(PK11_HashBuf, GO(PK11_HasRootCerts, iFp) GO(PK11_ImportCert, iFppLpi)