about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-10-04 08:25:18 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-10-04 08:25:29 +0200
commit46f71f39475fcf5b3a29cd4a1df526cec4f38c4e (patch)
tree5bea5db7f6ea08168406cc509804c2c03c6fcd84
parent0ba4b04078b2304c80765ec9f47b0dee5f89590c (diff)
downloadbox64-46f71f39475fcf5b3a29cd4a1df526cec4f38c4e.tar.gz
box64-46f71f39475fcf5b3a29cd4a1df526cec4f38c4e.zip
Added some more crypto and ssl wrapped functions (bedrock server starts now)
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrapper.c6
-rw-r--r--src/wrapped/generated/wrapper.h2
-rwxr-xr-xsrc/wrapped/wrappedcrypto_private.h45
4 files changed, 35 insertions, 20 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 19168bd1..e3afbfc3 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -141,6 +141,7 @@
 #() iFuu
 #() iFuL
 #() iFup
+#() iFUp
 #() iFli
 #() iFlp
 #() iFLu
@@ -1258,6 +1259,7 @@
 #() iFlpippp
 #() iFLppipp
 #() iFpiiiii
+#() iFpiiiip
 #() iFpiiipp
 #() iFpiippu
 #() iFpiippp
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 5d6f985e..ad0b9857 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -175,6 +175,7 @@ typedef int64_t (*iFui_t)(uint64_t, int64_t);
 typedef int64_t (*iFuu_t)(uint64_t, uint64_t);
 typedef int64_t (*iFuL_t)(uint64_t, uintptr_t);
 typedef int64_t (*iFup_t)(uint64_t, void*);
+typedef int64_t (*iFUp_t)(uint64_t, void*);
 typedef int64_t (*iFli_t)(intptr_t, int64_t);
 typedef int64_t (*iFlp_t)(intptr_t, void*);
 typedef int64_t (*iFLu_t)(uintptr_t, uint64_t);
@@ -1292,6 +1293,7 @@ typedef int64_t (*iFDipppL_t)(long double, int64_t, void*, void*, void*, uintptr
 typedef int64_t (*iFlpippp_t)(intptr_t, void*, int64_t, void*, void*, void*);
 typedef int64_t (*iFLppipp_t)(uintptr_t, void*, void*, int64_t, void*, void*);
 typedef int64_t (*iFpiiiii_t)(void*, int64_t, int64_t, int64_t, int64_t, int64_t);
+typedef int64_t (*iFpiiiip_t)(void*, int64_t, int64_t, int64_t, int64_t, void*);
 typedef int64_t (*iFpiiipp_t)(void*, int64_t, int64_t, int64_t, void*, void*);
 typedef int64_t (*iFpiippu_t)(void*, int64_t, int64_t, void*, void*, uint64_t);
 typedef int64_t (*iFpiippp_t)(void*, int64_t, int64_t, void*, void*, void*);
@@ -2056,6 +2058,7 @@ void iFui(x64emu_t *emu, uintptr_t fcn) { iFui_t fn = (iFui_t)fcn; R_RAX=(int64_
 void iFuu(x64emu_t *emu, uintptr_t fcn) { iFuu_t fn = (iFuu_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (uint64_t)R_RSI); }
 void iFuL(x64emu_t *emu, uintptr_t fcn) { iFuL_t fn = (iFuL_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (uintptr_t)R_RSI); }
 void iFup(x64emu_t *emu, uintptr_t fcn) { iFup_t fn = (iFup_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (void*)R_RSI); }
+void iFUp(x64emu_t *emu, uintptr_t fcn) { iFUp_t fn = (iFUp_t)fcn; R_RAX=(int64_t)fn((uint64_t)R_RDI, (void*)R_RSI); }
 void iFli(x64emu_t *emu, uintptr_t fcn) { iFli_t fn = (iFli_t)fcn; R_RAX=(int64_t)fn((intptr_t)R_RDI, (int64_t)R_RSI); }
 void iFlp(x64emu_t *emu, uintptr_t fcn) { iFlp_t fn = (iFlp_t)fcn; R_RAX=(int64_t)fn((intptr_t)R_RDI, (void*)R_RSI); }
 void iFLu(x64emu_t *emu, uintptr_t fcn) { iFLu_t fn = (iFLu_t)fcn; R_RAX=(int64_t)fn((uintptr_t)R_RDI, (uint64_t)R_RSI); }
@@ -3173,6 +3176,7 @@ void iFDipppL(x64emu_t *emu, uintptr_t fcn) { iFDipppL_t fn = (iFDipppL_t)fcn; R
 void iFlpippp(x64emu_t *emu, uintptr_t fcn) { iFlpippp_t fn = (iFlpippp_t)fcn; R_RAX=(int64_t)fn((intptr_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFLppipp(x64emu_t *emu, uintptr_t fcn) { iFLppipp_t fn = (iFLppipp_t)fcn; R_RAX=(int64_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpiiiii(x64emu_t *emu, uintptr_t fcn) { iFpiiiii_t fn = (iFpiiiii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); }
+void iFpiiiip(x64emu_t *emu, uintptr_t fcn) { iFpiiiip_t fn = (iFpiiiip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9); }
 void iFpiiipp(x64emu_t *emu, uintptr_t fcn) { iFpiiipp_t fn = (iFpiiipp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpiippu(x64emu_t *emu, uintptr_t fcn) { iFpiippu_t fn = (iFpiippu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint64_t)R_R9); }
 void iFpiippp(x64emu_t *emu, uintptr_t fcn) { iFpiippp_t fn = (iFpiippp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
@@ -3931,6 +3935,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFuu) return 1;
 	if (fun == &iFuL) return 1;
 	if (fun == &iFup) return 1;
+	if (fun == &iFUp) return 1;
 	if (fun == &iFli) return 1;
 	if (fun == &iFlp) return 1;
 	if (fun == &iFLu) return 1;
@@ -4868,6 +4873,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFlpippp) return 1;
 	if (fun == &iFLppipp) return 1;
 	if (fun == &iFpiiiii) return 1;
+	if (fun == &iFpiiiip) return 1;
 	if (fun == &iFpiiipp) return 1;
 	if (fun == &iFpiippu) return 1;
 	if (fun == &iFpiippp) return 1;
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 4b9fda9a..a50ffddc 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -174,6 +174,7 @@ void iFui(x64emu_t *emu, uintptr_t fnc);
 void iFuu(x64emu_t *emu, uintptr_t fnc);
 void iFuL(x64emu_t *emu, uintptr_t fnc);
 void iFup(x64emu_t *emu, uintptr_t fnc);
+void iFUp(x64emu_t *emu, uintptr_t fnc);
 void iFli(x64emu_t *emu, uintptr_t fnc);
 void iFlp(x64emu_t *emu, uintptr_t fnc);
 void iFLu(x64emu_t *emu, uintptr_t fnc);
@@ -1291,6 +1292,7 @@ void iFDipppL(x64emu_t *emu, uintptr_t fnc);
 void iFlpippp(x64emu_t *emu, uintptr_t fnc);
 void iFLppipp(x64emu_t *emu, uintptr_t fnc);
 void iFpiiiii(x64emu_t *emu, uintptr_t fnc);
+void iFpiiiip(x64emu_t *emu, uintptr_t fnc);
 void iFpiiipp(x64emu_t *emu, uintptr_t fnc);
 void iFpiippu(x64emu_t *emu, uintptr_t fnc);
 void iFpiippp(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedcrypto_private.h b/src/wrapped/wrappedcrypto_private.h
index 3aad639c..ca1c4d44 100755
--- a/src/wrapped/wrappedcrypto_private.h
+++ b/src/wrapped/wrappedcrypto_private.h
@@ -1431,7 +1431,7 @@ GO(EC_KEY_new_by_curve_name, pFi)
 //GO(EC_KEY_precompute_mult, 
 //GO(EC_KEY_print, 
 //GO(EC_KEY_print_fp, 
-//GO(EC_KEY_set_asn1_flag, 
+GO(EC_KEY_set_asn1_flag, vFpi)
 //GO(EC_KEY_set_conv_form, 
 //GO(EC_KEY_set_enc_flags, 
 //GO(EC_KEY_set_flags, 
@@ -1668,7 +1668,7 @@ GO(ERR_lib_error_string, pFu)
 //GO(ERR_load_COMP_strings, 
 //GO(ERR_load_CONF_strings, 
 GO(ERR_load_crypto_strings, vFv)
-//GO(ERR_load_CRYPTO_strings, 
+GO(ERR_load_CRYPTO_strings, vFv)
 //GO(ERR_load_DH_strings, 
 //GO(ERR_load_DSA_strings, 
 //GO(ERR_load_DSO_strings, 
@@ -1677,12 +1677,12 @@ GO(ERR_load_crypto_strings, vFv)
 //GO(ERR_load_EC_strings, 
 //GO(ERR_load_ENGINE_strings, 
 //GO(ERR_load_ERR_strings, 
-//GO(ERR_load_EVP_strings, 
+GO(ERR_load_EVP_strings, vFv)
 //GO(ERR_load_OBJ_strings, 
 //GO(ERR_load_OCSP_strings, 
 //GO(ERR_load_PEM_strings, 
 //GO(ERR_load_PKCS12_strings, 
-//GO(ERR_load_PKCS7_strings, 
+GO(ERR_load_PKCS7_strings, vFv)
 //GO(ERR_load_RAND_strings, 
 //GO(ERR_load_RSA_strings, 
 //GO(ERR_load_strings, 
@@ -1799,7 +1799,7 @@ GO(EVP_CIPHER_CTX_cleanup, iFp)
 //GO(EVP_CIPHER_CTX_copy, 
 GO(EVP_CIPHER_CTX_ctrl, iFpiip)
 //GO(EVP_CIPHER_CTX_flags, 
-//GO(EVP_CIPHER_CTX_free, 
+GO(EVP_CIPHER_CTX_free, vFp)
 //GO(EVP_CIPHER_CTX_get_app_data, 
 GO(EVP_CIPHER_CTX_init, vFp)
 //GO(EVP_CIPHER_CTX_iv_length, 
@@ -1896,14 +1896,18 @@ GO(EVP_md5, pFv)
 GO(EVP_MD_block_size, iFp)
 //GO(EVP_mdc2, 
 GO(EVP_MD_CTX_cleanup, iFp)
-//GO(EVP_MD_CTX_clear_flags, 
+GO(EVP_MD_CTX_clear_flags, vFpi)
 GO(EVP_MD_CTX_copy, iFpp)
 GO(EVP_MD_CTX_copy_ex, iFpp)
 //GO(EVP_MD_CTX_create, 
+GO(EVP_MD_CTX_ctrl, vFpiip)
 GO(EVP_MD_CTX_destroy, vFp)
+GO(EVP_MD_CTX_free, vFp)
 //GO(EVP_MD_CTX_init, 
 GO(EVP_MD_CTX_md, pFp)
-//GO(EVP_MD_CTX_set_flags, 
+GO(EVP_MD_CTX_new, pFv)
+GO(EVP_MD_CTX_reset, iFp)
+GO(EVP_MD_CTX_set_flags, vFpi)
 //GO(EVP_MD_CTX_test_flags, 
 //GO(EVP_MD_do_all, 
 //GO(EVP_MD_do_all_sorted, 
@@ -1948,21 +1952,21 @@ GO(EVP_PKEY_assign, iFpip)
 GO(EVP_PKEY_cmp, iFpp)
 GO(EVP_PKEY_cmp_parameters, iFpp)
 GO(EVP_PKEY_copy_parameters, iFpp)
-//GO(EVP_PKEY_CTX_ctrl, 
-//GO(EVP_PKEY_CTX_ctrl_str, 
-//GO(EVP_PKEY_CTX_dup, 
-//GO(EVP_PKEY_CTX_free, 
+GO(EVP_PKEY_CTX_ctrl, iFpiiiip)
+GO(EVP_PKEY_CTX_ctrl_str, iFppp)
+GO(EVP_PKEY_CTX_dup, pFp)
+GO(EVP_PKEY_CTX_free, vFp)
 //GO(EVP_PKEY_CTX_get0_peerkey, 
 //GO(EVP_PKEY_CTX_get0_pkey, 
-//GO(EVP_PKEY_CTX_get_app_data, 
+GO(EVP_PKEY_CTX_get_app_data, pFp)
 //GO(EVP_PKEY_CTX_get_cb, 
 //GO(EVP_PKEY_CTX_get_data, 
-//GO(EVP_PKEY_CTX_get_keygen_info, 
+GO(EVP_PKEY_CTX_get_keygen_info, iFpi)
 //GO(EVP_PKEY_CTX_get_operation, 
-//GO(EVP_PKEY_CTX_new, 
-//GO(EVP_PKEY_CTX_new_id, 
+GO(EVP_PKEY_CTX_new, pFpp)
+GO(EVP_PKEY_CTX_new_id, pFip)
 //GO(EVP_PKEY_CTX_set0_keygen_info, 
-//GO(EVP_PKEY_CTX_set_app_data, 
+GO(EVP_PKEY_CTX_set_app_data, vFpp)
 //GO(EVP_PKEY_CTX_set_cb, 
 //GO(EVP_PKEY_CTX_set_data, 
 //GO(EVP_PKEY_decrypt, 
@@ -1988,8 +1992,8 @@ GO(EVP_PKEY_get1_RSA, pFp)
 //GO(EVP_PKEY_get_attr_count, 
 //GO(EVP_PKEY_get_default_digest_nid, 
 //GO(EVP_PKEY_id, 
-//GO(EVP_PKEY_keygen, 
-//GO(EVP_PKEY_keygen_init, 
+GO(EVP_PKEY_keygen, iFpp)
+GO(EVP_PKEY_keygen_init, iFp)
 //GO(EVP_PKEY_meth_add0, 
 //GO(EVP_PKEY_meth_copy, 
 //GO(EVP_PKEY_meth_find, 
@@ -2013,8 +2017,8 @@ GO(EVP_PKEY_get1_RSA, pFp)
 GO(EVP_PKEY_missing_parameters, iFp)
 GO(EVP_PKEY_new, pFv)
 //GO(EVP_PKEY_new_mac_key, 
-//GO(EVP_PKEY_paramgen, 
-//GO(EVP_PKEY_paramgen_init, 
+GO(EVP_PKEY_paramgen, iFpp)
+GO(EVP_PKEY_paramgen_init, iFp)
 //GO(EVP_PKEY_print_params, 
 //GO(EVP_PKEY_print_private, 
 //GO(EVP_PKEY_print_public, 
@@ -2613,6 +2617,7 @@ GO(OPENSSL_config, vFp)
 //GO(OPENSSL_gmtime_diff, 
 //GO(OPENSSL_ia32cap_loc, 
 //GO(OPENSSL_init, 
+GO(OPENSSL_init_crypto, iFUp)
 //GO(OPENSSL_instrument_bus, 
 //GO(OPENSSL_instrument_bus2, 
 //GO(OPENSSL_isservice,