diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedcrypto3types.h | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibssl3types.h | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 7 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 3 | ||||
| -rwxr-xr-x | src/wrapped/wrappedcrypto3.c | 19 | ||||
| -rwxr-xr-x | src/wrapped/wrappedcrypto3_private.h | 88 | ||||
| -rw-r--r-- | src/wrapped/wrappedicui18n67_private.h | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedicui18n72_private.h | 2 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibssl3.c | 29 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibssl3_private.h | 21 |
11 files changed, 159 insertions, 25 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index f3e43b90..9d5b7bb0 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -232,6 +232,7 @@ #() UFEp #() UFuu #() UFpi +#() UFpU #() UFpp #() fFEp #() fFif @@ -2166,6 +2167,7 @@ #() iFpiupppp #() iFpiLuupp #() iFpiLuppp +#() iFpipiiip #() iFpipipip #() iFpipippp #() iFpippLpp @@ -2371,6 +2373,7 @@ #() iFiiupiupi #() iFipippppp #() iFuuuuuuuu +#() iFpipiipip #() iFpippuuii #() iFpCCWWpWu #() iFpWCuWCuu @@ -2882,6 +2885,10 @@ wrappedcrypto3: - OPENSSL_sk_pop_free - iFppp: - ASN1_i2d_bio +- vFiipV: + - ERR_set_error +- vFiipA: + - ERR_vset_error - pFpppp: - ASN1_d2i_bio - PEM_read_bio_DSAPrivateKey @@ -4176,6 +4183,7 @@ wrappedlibssl3: - SSL_CTX_set_verify - SSL_set_verify - vFppp: + - SSL_CTX_set_alpn_select_cb - SSL_CTX_set_cert_verify_callback - SSL_CTX_set_next_proto_select_cb - lFpip: diff --git a/src/wrapped/generated/wrappedcrypto3types.h b/src/wrapped/generated/wrappedcrypto3types.h index 8958d348..4aafbf2a 100644 --- a/src/wrapped/generated/wrappedcrypto3types.h +++ b/src/wrapped/generated/wrappedcrypto3types.h @@ -15,6 +15,8 @@ typedef void (*vFp_t)(void*); typedef void (*vFpp_t)(void*, void*); typedef void* (*pFpp_t)(void*, void*); typedef int32_t (*iFppp_t)(void*, void*, void*); +typedef void (*vFiipV_t)(int32_t, int32_t, void*, ...); +typedef void (*vFiipA_t)(int32_t, int32_t, void*, va_list); typedef void* (*pFpppp_t)(void*, void*, void*, void*); typedef int32_t (*iFpiipp_t)(void*, int32_t, int32_t, void*, void*); typedef int32_t (*iFpplppi_t)(void*, void*, intptr_t, void*, void*, int32_t); @@ -26,6 +28,8 @@ typedef int32_t (*iFppppipp_t)(void*, void*, void*, void*, int32_t, void*, void* GO(X509_STORE_CTX_set_verify_cb, vFpp_t) \ GO(OPENSSL_sk_pop_free, pFpp_t) \ GO(ASN1_i2d_bio, iFppp_t) \ + GO(ERR_set_error, vFiipV_t) \ + GO(ERR_vset_error, vFiipA_t) \ GO(ASN1_d2i_bio, pFpppp_t) \ GO(PEM_read_bio_DSAPrivateKey, pFpppp_t) \ GO(PEM_read_bio_DSA_PUBKEY, pFpppp_t) \ diff --git a/src/wrapped/generated/wrappedlibssl3types.h b/src/wrapped/generated/wrappedlibssl3types.h index 531c8e66..250625e0 100644 --- a/src/wrapped/generated/wrappedlibssl3types.h +++ b/src/wrapped/generated/wrappedlibssl3types.h @@ -25,6 +25,7 @@ typedef int32_t (*iFlpppp_t)(intptr_t, void*, void*, void*, void*); GO(SSL_set_psk_client_callback, vFpp_t) \ GO(SSL_CTX_set_verify, vFpip_t) \ GO(SSL_set_verify, vFpip_t) \ + GO(SSL_CTX_set_alpn_select_cb, vFppp_t) \ GO(SSL_CTX_set_cert_verify_callback, vFppp_t) \ GO(SSL_CTX_set_next_proto_select_cb, vFppp_t) \ GO(SSL_CTX_callback_ctrl, lFpip_t) \ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 0196afd8..75c5a9da 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -268,6 +268,7 @@ typedef uint32_t (*uFpp_t)(void*, void*); typedef uint64_t (*UFEp_t)(x64emu_t*, void*); typedef uint64_t (*UFuu_t)(uint32_t, uint32_t); typedef uint64_t (*UFpi_t)(void*, int32_t); +typedef uint64_t (*UFpU_t)(void*, uint64_t); typedef uint64_t (*UFpp_t)(void*, void*); typedef float (*fFEp_t)(x64emu_t*, void*); typedef float (*fFif_t)(int32_t, float); @@ -2202,6 +2203,7 @@ typedef int32_t (*iFpiuLiii_t)(void*, int32_t, uint32_t, uintptr_t, int32_t, int typedef int32_t (*iFpiupppp_t)(void*, int32_t, uint32_t, void*, void*, void*, void*); typedef int32_t (*iFpiLuupp_t)(void*, int32_t, uintptr_t, uint32_t, uint32_t, void*, void*); typedef int32_t (*iFpiLuppp_t)(void*, int32_t, uintptr_t, uint32_t, void*, void*, void*); +typedef int32_t (*iFpipiiip_t)(void*, int32_t, void*, int32_t, int32_t, int32_t, void*); typedef int32_t (*iFpipipip_t)(void*, int32_t, void*, int32_t, void*, int32_t, void*); typedef int32_t (*iFpipippp_t)(void*, int32_t, void*, int32_t, void*, void*, void*); typedef int32_t (*iFpippLpp_t)(void*, int32_t, void*, void*, uintptr_t, void*, void*); @@ -2407,6 +2409,7 @@ typedef int32_t (*iFiiiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int typedef int32_t (*iFiiupiupi_t)(int32_t, int32_t, uint32_t, void*, int32_t, uint32_t, void*, int32_t); typedef int32_t (*iFipippppp_t)(int32_t, void*, int32_t, void*, void*, void*, void*, void*); typedef int32_t (*iFuuuuuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); +typedef int32_t (*iFpipiipip_t)(void*, int32_t, void*, int32_t, int32_t, void*, int32_t, void*); typedef int32_t (*iFpippuuii_t)(void*, int32_t, void*, void*, uint32_t, uint32_t, int32_t, int32_t); typedef int32_t (*iFpCCWWpWu_t)(void*, uint8_t, uint8_t, uint16_t, uint16_t, void*, uint16_t, uint32_t); typedef int32_t (*iFpWCuWCuu_t)(void*, uint16_t, uint8_t, uint32_t, uint16_t, uint8_t, uint32_t, uint32_t); @@ -3082,6 +3085,7 @@ void uFpp(x64emu_t *emu, uintptr_t fcn) { uFpp_t fn = (uFpp_t)fcn; R_RAX=(uint32 void UFEp(x64emu_t *emu, uintptr_t fcn) { UFEp_t fn = (UFEp_t)fcn; R_RAX=fn(emu, (void*)R_RDI); } void UFuu(x64emu_t *emu, uintptr_t fcn) { UFuu_t fn = (UFuu_t)fcn; R_RAX=fn((uint32_t)R_RDI, (uint32_t)R_RSI); } void UFpi(x64emu_t *emu, uintptr_t fcn) { UFpi_t fn = (UFpi_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI); } +void UFpU(x64emu_t *emu, uintptr_t fcn) { UFpU_t fn = (UFpU_t)fcn; R_RAX=fn((void*)R_RDI, (uint64_t)R_RSI); } void UFpp(x64emu_t *emu, uintptr_t fcn) { UFpp_t fn = (UFpp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI); } void fFEp(x64emu_t *emu, uintptr_t fcn) { fFEp_t fn = (fFEp_t)fcn; emu->xmm[0].f[0]=fn(emu, (void*)R_RDI); } void fFif(x64emu_t *emu, uintptr_t fcn) { fFif_t fn = (fFif_t)fcn; emu->xmm[0].f[0]=fn((int32_t)R_RDI, emu->xmm[0].f[0]); } @@ -5016,6 +5020,7 @@ void iFpiuLiii(x64emu_t *emu, uintptr_t fcn) { iFpiuLiii_t fn = (iFpiuLiii_t)fcn void iFpiupppp(x64emu_t *emu, uintptr_t fcn) { iFpiupppp_t fn = (iFpiupppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpiLuupp(x64emu_t *emu, uintptr_t fcn) { iFpiLuupp_t fn = (iFpiLuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } void iFpiLuppp(x64emu_t *emu, uintptr_t fcn) { iFpiLuppp_t fn = (iFpiLuppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } +void iFpipiiip(x64emu_t *emu, uintptr_t fcn) { iFpipiiip_t fn = (iFpipiiip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); } void iFpipipip(x64emu_t *emu, uintptr_t fcn) { iFpipipip_t fn = (iFpipipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); } void iFpipippp(x64emu_t *emu, uintptr_t fcn) { iFpipippp_t fn = (iFpipippp_t)fcn; R_RAX=(int32_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 iFpippLpp(x64emu_t *emu, uintptr_t fcn) { iFpippLpp_t fn = (iFpippLpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); } @@ -5221,6 +5226,7 @@ void iFiiiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiiiip_t fn = (iFiiiiiiip_t) void iFiiupiupi(x64emu_t *emu, uintptr_t fcn) { iFiiupiupi_t fn = (iFiiupiupi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); } void iFipippppp(x64emu_t *emu, uintptr_t fcn) { iFipippppp_t fn = (iFipippppp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFuuuuuuuu(x64emu_t *emu, uintptr_t fcn) { iFuuuuuuuu_t fn = (iFuuuuuuuu_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); } +void iFpipiipip(x64emu_t *emu, uintptr_t fcn) { iFpipiipip_t fn = (iFpipiipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); } void iFpippuuii(x64emu_t *emu, uintptr_t fcn) { iFpippuuii_t fn = (iFpippuuii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); } void iFpCCWWpWu(x64emu_t *emu, uintptr_t fcn) { iFpCCWWpWu_t fn = (iFpCCWWpWu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint16_t)R_RCX, (uint16_t)R_R8, (void*)R_R9, *(uint16_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); } void iFpWCuWCuu(x64emu_t *emu, uintptr_t fcn) { iFpWCuWCuu_t fn = (iFpWCuWCuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint8_t)R_RDX, (uint32_t)R_RCX, (uint16_t)R_R8, (uint8_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); } @@ -5878,6 +5884,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &uFpp) return 1; if (fun == &UFuu) return 1; if (fun == &UFpi) return 1; + if (fun == &UFpU) return 1; if (fun == &UFpp) return 1; if (fun == &fFif) return -2; if (fun == &fFfi) return -2; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 21405ee0..3d13ace0 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -269,6 +269,7 @@ void uFpp(x64emu_t *emu, uintptr_t fnc); void UFEp(x64emu_t *emu, uintptr_t fnc); void UFuu(x64emu_t *emu, uintptr_t fnc); void UFpi(x64emu_t *emu, uintptr_t fnc); +void UFpU(x64emu_t *emu, uintptr_t fnc); void UFpp(x64emu_t *emu, uintptr_t fnc); void fFEp(x64emu_t *emu, uintptr_t fnc); void fFif(x64emu_t *emu, uintptr_t fnc); @@ -2203,6 +2204,7 @@ void iFpiuLiii(x64emu_t *emu, uintptr_t fnc); void iFpiupppp(x64emu_t *emu, uintptr_t fnc); void iFpiLuupp(x64emu_t *emu, uintptr_t fnc); void iFpiLuppp(x64emu_t *emu, uintptr_t fnc); +void iFpipiiip(x64emu_t *emu, uintptr_t fnc); void iFpipipip(x64emu_t *emu, uintptr_t fnc); void iFpipippp(x64emu_t *emu, uintptr_t fnc); void iFpippLpp(x64emu_t *emu, uintptr_t fnc); @@ -2408,6 +2410,7 @@ void iFiiiiiiip(x64emu_t *emu, uintptr_t fnc); void iFiiupiupi(x64emu_t *emu, uintptr_t fnc); void iFipippppp(x64emu_t *emu, uintptr_t fnc); void iFuuuuuuuu(x64emu_t *emu, uintptr_t fnc); +void iFpipiipip(x64emu_t *emu, uintptr_t fnc); void iFpippuuii(x64emu_t *emu, uintptr_t fnc); void iFpCCWWpWu(x64emu_t *emu, uintptr_t fnc); void iFpWCuWCuu(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedcrypto3.c b/src/wrapped/wrappedcrypto3.c index 296f4cb6..b86db838 100755 --- a/src/wrapped/wrappedcrypto3.c +++ b/src/wrapped/wrappedcrypto3.c @@ -17,6 +17,7 @@ #include "box64context.h" #include "emu/x64emu_private.h" #include "callback.h" +#include "myalign.h" const char* crypto3Name = "libcrypto.so.3"; #define LIBNAME crypto3 @@ -437,6 +438,24 @@ EXPORT void my3_OPENSSL_sk_pop_free(x64emu_t* emu, void* s, void* cb) my->OPENSSL_sk_pop_free(s, find_free_fnc_Fct(cb)); } +EXPORT void my3_ERR_set_error(x64emu_t* emu, int lib, int reason, void* fmt, uintptr_t* b) +{ + myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3); + PREPARE_VALIST; + my->ERR_vset_error(lib, reason, fmt, VARARGS); +} +EXPORT void my3_ERR_vset_error(x64emu_t* emu, int lib, int reason, void* fmt, x64_va_list_t b) +{ + #ifdef CONVERT_VALIST + CONVERT_VALIST(b); + #else + myStackAlignValist(emu, (const char*)fmt, emu->scratch, b); + PREPARE_VALIST; + #endif + my->ERR_vset_error(lib, reason, fmt, VARARGS); +} + + #define CUSTOM_INIT \ SETALT(my3_); \ getMy(lib); diff --git a/src/wrapped/wrappedcrypto3_private.h b/src/wrapped/wrappedcrypto3_private.h index 3e2db7cc..40a0c185 100755 --- a/src/wrapped/wrappedcrypto3_private.h +++ b/src/wrapped/wrappedcrypto3_private.h @@ -369,6 +369,7 @@ GO(BIO_sock_init, iFv) //GO(BIO_s_socket, GO(BIO_tell, iFp) GO(BIO_test_flags, iFpi) +GO(BIO_up_ref, iFp) GO(BIO_vfree, vFp) //GO(BIO_vprintf, //GO(BIO_vsnprintf, @@ -1191,13 +1192,18 @@ GO(DSA_free, vFp) GO(DSA_generate_key, iFp) //GO(DSA_generate_parameters, GO(DSA_generate_parameters_ex, iFpipippp) +GO(DSA_get0_key, vFppp) +GO(DSA_get0_pqg, vFpppp) //GO(DSA_get_default_method, //GO(DSA_get_ex_data, //GO(DSA_get_ex_new_index, +GO(DSA_get_method, pFp) GO(DSA_new, pFv) //GO(DSA_new_method, GO(DSA_OpenSSL, pFv) //GO(dsa_paramgen_check_g, +GO(DSA_set0_key, iFppp) +GO(DSA_set0_pqg, iFppp) //GO(DSAparams_dup, //GO(DSAparams_print, //GO(DSAparams_print_fp, @@ -1690,6 +1696,7 @@ GO(ERR_load_PKCS7_strings, vFv) //GO(ERR_load_UI_strings, //GO(ERR_load_X509_strings, //GO(ERR_load_X509V3_strings, +GO(ERR_new, vFv) GO(ERR_peek_error, LFv) GO(ERR_peek_error_line, LFpp) GO(ERR_peek_error_line_data, LFpppp) @@ -1705,6 +1712,9 @@ GO(ERR_reason_error_string, pFu) //GO(ERR_release_err_state_table, //GO(ERR_remove_state, GO(ERR_remove_thread_state, vFp) +GO(ERR_set_debug, vFpip) +GOM(ERR_set_error, vFEiipV) +GOM(ERR_vset_error, vFEiipA) //GO(ERR_set_error_data, //GO(ERR_set_implementation, //GO(ERR_set_mark, @@ -1789,6 +1799,8 @@ GO(EVP_aes_256_gcm, pFv) //GO(EVP_cast5_cfb64, //GO(EVP_cast5_ecb, //GO(EVP_cast5_ofb, +GO(EVP_chacha20, pFv) +GO(EVP_chacha20_poly1305, pFv) //GO(EVP_Cipher, GO(EVP_CIPHER_asn1_to_param, iFpp) //GO(EVP_CIPHER_block_size, @@ -1801,12 +1813,15 @@ GO(EVP_CIPHER_CTX_ctrl, iFpiip) //GO(EVP_CIPHER_CTX_flags, GO(EVP_CIPHER_CTX_free, vFp) //GO(EVP_CIPHER_CTX_get_app_data, +GO(EVP_CIPHER_CTX_get_original_iv, iFppL) +GO(EVP_CIPHER_CTX_get_updated_iv, iFppL) GO(EVP_CIPHER_CTX_init, vFp) //GO(EVP_CIPHER_CTX_iv_length, //GO(EVP_CIPHER_CTX_key_length, GO(EVP_CIPHER_CTX_new, pFv) //GO(EVP_CIPHER_CTX_nid, //GO(EVP_CIPHER_CTX_rand_key, +GO(EVP_CIPHER_CTX_reset, iFp) //GO(EVP_CIPHER_CTX_set_app_data, //GO(EVP_CIPHER_CTX_set_flags, GO(EVP_CIPHER_CTX_set_key_length, iFpi) @@ -1912,9 +1927,9 @@ GO(EVP_MD_CTX_set_flags, vFpi) //GO(EVP_MD_do_all, //GO(EVP_MD_do_all_sorted, //GO(EVP_MD_flags, +GO(EVP_MD_get_size, iFp) GO(EVP_md_null, pFv) GO(EVP_MD_pkey_type, iFp) -GO(EVP_MD_size, iFp) GO(EVP_MD_type, iFp) //GO(EVP_OpenFinal, //GO(EVP_OpenInit, @@ -1923,8 +1938,9 @@ GO(EVP_MD_type, iFp) //GO(EVP_PBE_CipherInit, //GO(EVP_PBE_cleanup, //GO(EVP_PBE_find, -//GO(EVP_PKCS82PKEY, -//GO(EVP_PKEY2PKCS8, +GO(EVP_PKCS82PKEY, pFp) +GO(EVP_PKCS82PKEY_ex, pFppp) +GO(EVP_PKEY2PKCS8, pFp) //GO(EVP_PKEY2PKCS8_broken, //GO(EVP_PKEY_add1_attr, //GO(EVP_PKEY_add1_attr_by_NID, @@ -1956,8 +1972,8 @@ 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_get0_peerkey, pFp) +GO(EVP_PKEY_CTX_get0_pkey, pFp) GO(EVP_PKEY_CTX_get_app_data, pFp) //GO(EVP_PKEY_CTX_get_cb, //GO(EVP_PKEY_CTX_get_data, @@ -1969,19 +1985,26 @@ GO(EVP_PKEY_CTX_new_id, pFip) GO(EVP_PKEY_CTX_set_app_data, vFpp) //GO(EVP_PKEY_CTX_set_cb, //GO(EVP_PKEY_CTX_set_data, -//GO(EVP_PKEY_decrypt, -//GO(EVP_PKEY_decrypt_init, +GO(EVP_PKEY_CTX_set_rsa_keygen_bits, iFpi) +GO(EVP_PKEY_CTX_set_rsa_oaep_md, iFpp) +GO(EVP_PKEY_CTX_set_rsa_padding, iFpi) +GO(EVP_PKEY_CTX_set_rsa_pss_saltlen, iFpi) +GO(EVP_PKEY_CTX_set_signature_md, iFpp) +GO(EVP_PKEY_check, iFp) +GO(EVP_PKEY_decrypt, iFppppL) +GO(EVP_PKEY_decrypt_init, iFp) //GO(EVP_PKEY_decrypt_old, //GO(EVP_PKEY_delete_attr, GO(EVP_PKEY_derive, iFppp) GO(EVP_PKEY_derive_init, iFp) GO(EVP_PKEY_derive_set_peer, iFppi) -//GO(EVP_PKEY_encrypt, -//GO(EVP_PKEY_encrypt_init, +GO(EVP_PKEY_encrypt, iFppppL) +GO(EVP_PKEY_encrypt_init, iFp) //GO(EVP_PKEY_encrypt_old, GO(EVP_PKEY_free, vFp) //GO(EVP_PKEY_get0, //GO(EVP_PKEY_get0_asn1, +GO(EVP_PKEY_get0_RSA, pFp) //GO(EVP_PKEY_get1_DH, GO(EVP_PKEY_get1_DSA, pFp) GO(EVP_PKEY_get1_EC_KEY, pFp) @@ -1990,7 +2013,9 @@ GO(EVP_PKEY_get1_RSA, pFp) //GO(EVP_PKEY_get_attr_by_NID, //GO(EVP_PKEY_get_attr_by_OBJ, //GO(EVP_PKEY_get_attr_count, +GO(EVP_PKEY_get_base_id, iFp) //GO(EVP_PKEY_get_default_digest_nid, +GO(EVP_PKEY_get_size, iFp) //GO(EVP_PKEY_id, GO(EVP_PKEY_keygen, iFpp) GO(EVP_PKEY_keygen_init, iFp) @@ -2022,6 +2047,7 @@ GO(EVP_PKEY_paramgen_init, iFp) //GO(EVP_PKEY_print_params, //GO(EVP_PKEY_print_private, //GO(EVP_PKEY_print_public, +GO(EVP_PKEY_public_check, iFp) //GO(EVP_PKEY_save_parameters, //GO(EVP_PKEY_set1_DH, GO(EVP_PKEY_set1_DSA, iFpp) @@ -2110,7 +2136,9 @@ GO(GENERAL_SUBTREE_new, pFv) GO(HMAC, pFppipLpp) GO(HMAC_CTX_cleanup, vFp) GO(HMAC_CTX_copy, iFpp) +GO(HMAC_CTX_free, vFp) GO(HMAC_CTX_init, vFp) +GO(HMAC_CTX_new, pFv) GO(HMAC_CTX_set_flags, vFpL) GO(HMAC_Final, iFppp) GO(HMAC_Init, iFppip) @@ -2639,6 +2667,7 @@ GO(OPENSSL_strcasecmp, iFpp) GO(OPENSSL_strncasecmp, iFppL) //GO(OPENSSL_uni2asc, //GO(OPENSSL_wipe_cpu, +GO(OpenSSL_version_num, LFv) //GO(_ossl_096_des_random_seed, //GO(_ossl_old_crypt, //GO(_ossl_old_des_cbc_cksum, @@ -2677,6 +2706,7 @@ GO(OPENSSL_strncasecmp, iFppL) //GO(_ossl_old_des_string_to_2keys, //GO(_ossl_old_des_string_to_key, //GO(_ossl_old_des_xcbc_encrypt, +GO(OSSL_PROVIDER_try_load, pFppi) //GO(OTHERNAME_cmp, //GO(OTHERNAME_free, //GO(OTHERNAME_new, @@ -2867,8 +2897,8 @@ GO(PKCS12_PBE_keyivgen, iFppipppi) //GO(PKCS5_PBE_keyivgen, //GO(PKCS5_pbe_set, //GO(PKCS5_pbe_set0_algor, -//GO(PKCS5_PBKDF2_HMAC, -//GO(PKCS5_PBKDF2_HMAC_SHA1, +GO(PKCS5_PBKDF2_HMAC, iFpipiipip) +GO(PKCS5_PBKDF2_HMAC_SHA1, iFpipiiip) //GO(PKCS5_pbkdf2_set, //GO(PKCS5_v2_PBE_keyivgen, //GO(PKCS5_v2_PBKDF2_keyivgen, @@ -2948,8 +2978,8 @@ GO(PKCS7_signatureVerify, iFpppp) //GO(PKCS8_encrypt, //GO(PKCS8_pkey_get0, //GO(PKCS8_pkey_set0, -//GO(PKCS8_PRIV_KEY_INFO_free, -//GO(PKCS8_PRIV_KEY_INFO_new, +GO(PKCS8_PRIV_KEY_INFO_free, vFp) +GO(PKCS8_PRIV_KEY_INFO_new, pFv) //GO(PKCS8_set_broken, //GO(PKEY_USAGE_PERIOD_free, //GO(PKEY_USAGE_PERIOD_new, @@ -3028,11 +3058,15 @@ GO(RSA_check_key, iFp) GO(RSA_free, vFp) //GO(RSA_generate_key, GO(RSA_generate_key_ex, iFpipp) +GO(RSA_get0_crt_params, vFpppp) +GO(RSA_get0_factors, vFppp) +GO(RSA_get0_key, vFpppp) //GO(RSA_get_default_method, //GO(RSA_get_ex_data, //GO(RSA_get_ex_new_index, GO(RSA_get_method, pFp) //GO(RSA_memory_lock, +GO(RSA_meth_get_flags, iFp) GO(RSA_new, pFv) GO(RSA_new_method, pFp) //GO(RSA_null_method, @@ -3056,6 +3090,7 @@ GO(RSA_new_method, pFp) //GO(RSA_padding_check_X931, GO(RSA_PKCS1_OpenSSL, pFv) GO(RSA_PKCS1_SSLeay, pFv) +GO(RSA_pkey_ctx_ctrl, iFpiiip) //GO(RSA_print, //GO(RSA_print_fp, GO(RSA_private_decrypt, iFipppi) @@ -3066,6 +3101,9 @@ GO(RSA_private_encrypt, iFipppi) GO(RSA_public_decrypt, iFipppi) GO(RSA_public_encrypt, iFipppi) //GO(RSAPublicKey_dup, +GO(RSA_set0_crt_params, iFpppp) +GO(RSA_set0_factors, iFppp) +GO(RSA_set0_key, iFpppp) //GO(RSA_set_default_method, //GO(RSA_set_ex_data, GO(RSA_set_method, iFpp) @@ -3073,6 +3111,7 @@ GO(RSA_set_method, iFpp) GO(RSA_sign, iFipuppp) GO(RSA_sign_ASN1_OCTET_STRING, iFipuppp) GO(RSA_size, iFp) +GO(RSA_test_flags, iFpi) GO(RSA_up_ref, iFp) GO(RSA_verify, iFipupup) GO(RSA_verify_ASN1_OCTET_STRING, iFipupup) @@ -3416,7 +3455,7 @@ GO(X509_add1_ext_i2d, iFpipiL) //GO(X509_check_akid, //GO(X509_check_ca, //GO(X509_check_email, -//GO(X509_check_host, +GO(X509_check_host, iFppLup) //GO(X509_check_ip, //GO(X509_check_ip_asc, GO(X509_check_issued, iFpp) @@ -3440,6 +3479,7 @@ GO(X509_CRL_add1_ext_i2d, iFpipiL) GO(X509_CRL_free, vFp) //GO(X509_CRL_get0_by_cert, //GO(X509_CRL_get0_by_serial, +GO(X509_CRL_get0_nextUpdate, pFp) //GO(X509_CRL_get_ext, //GO(X509_CRL_get_ext_by_critical, //GO(X509_CRL_get_ext_by_NID, @@ -3484,8 +3524,9 @@ GO(X509_EXTENSION_set_object, iFpp) //GO(X509_find_by_issuer_and_serial, //GO(X509_find_by_subject, GO(X509_free, vFp) -//GO(X509_get0_pubkey_bitstr, +GO(X509_get0_pubkey_bitstr, pFp) //GO(X509_get0_signature, +GO(X509_get0_tbs_sigalg, pFp) //GO(X509_get1_email, //GO(X509_get1_ocsp, //GO(X509_get_default_cert_area, @@ -3505,12 +3546,15 @@ GO(X509_get_ext_d2i, pFpipp) GO(X509_get_issuer_name, pFp) GO(X509_get_pubkey, pFp) //GO(X509_get_pubkey_parameters, -GO(X509_get_serialNumber, pFp) +GO(X509_get0_notAfter, pFp) +GO(X509_get0_notBefore, pFp) +GO(X509_get0_pubkey, pFp) GO(X509_get0_serialNumber, pFp) +GO(X509_get_serialNumber, pFp) //GO(X509_get_signature_nid, GO(X509_get_subject_name, pFp) +GO(X509_get_version, lFp) GO(X509_get_X509_PUBKEY, pFp) -GO(X509_get0_pubkey, pFp) //GO(X509_gmtime_adj, //GO(X509_http_nbio, //GO(X509_INFO_free, @@ -3556,6 +3600,7 @@ GO(X509_NAME_ENTRY_get_object, pFp) GO(X509_NAME_ENTRY_set_data, iFpipi) GO(X509_NAME_ENTRY_set_object, iFpp) GO(X509_NAME_free, vFp) +GO(X509_NAME_get0_der, iFppp) GO(X509_NAME_get_entry, pFpi) GO(X509_NAME_get_index_by_NID, iFpii) GO(X509_NAME_get_index_by_OBJ, iFppi) @@ -3663,6 +3708,8 @@ GO(X509_REVOKED_get_ext_d2i, pFpipp) //GO(X509_REVOKED_new, //GO(X509_REVOKED_set_revocationDate, //GO(X509_REVOKED_set_serialNumber, +GO(X509_set1_notAfter, iFpp) +GO(X509_set1_notBefore, iFpp) //GO(X509_set_ex_data, GO(X509_set_issuer_name, iFpp) //GO(X509_set_notAfter, @@ -3687,7 +3734,10 @@ GO(X509_STORE_CTX_free, vFp) GO(X509_STORE_CTX_get0_param, pFp) //GO(X509_STORE_CTX_get0_parent_ctx, //GO(X509_STORE_CTX_get0_policy_tree, -//GO(X509_STORE_CTX_get0_store, +GO(X509_STORE_CTX_get0_cert, pFp) +GO(X509_STORE_CTX_get0_chain, pFp) +GO(X509_STORE_CTX_get0_store, pFp) +GO(X509_STORE_CTX_get0_untrusted, pFp) GO(X509_STORE_CTX_get1_chain, pFp) GO(X509_STORE_CTX_get1_issuer, iFppp) GO(X509_STORE_CTX_get_chain, pFp) @@ -3717,6 +3767,7 @@ GO(X509_STORE_CTX_set_purpose, iFpi) GOM(X509_STORE_CTX_set_verify_cb, vFEpp) //GO(X509_STORE_CTX_trusted_stack, GO(X509_STORE_free, vFp) +GO(X509_STORE_get0_param, pFp) //GO(X509_STORE_get1_certs, //GO(X509_STORE_get1_crls, //GO(X509_STORE_get_by_subject, @@ -3751,6 +3802,7 @@ GO(X509_subject_name_hash_old, LFp) //GO(X509_TRUST_get_trust, //GO(X509_TRUST_set, //GO(X509_TRUST_set_default, +GO(X509_up_ref, iFp) GO(X509V3_add1_i2d, iFpipiL) //GO(X509v3_add_ext, //GO(X509V3_add_standard_extensions, diff --git a/src/wrapped/wrappedicui18n67_private.h b/src/wrapped/wrappedicui18n67_private.h index 6401b59c..431164b6 100644 --- a/src/wrapped/wrappedicui18n67_private.h +++ b/src/wrapped/wrappedicui18n67_private.h @@ -50,8 +50,10 @@ GO(ucal_setGregorianChange_67, vFpdp) GO(ucal_setMillis_67, vFpdp) GO(ucal_setTimeZone_67, vFppip) +GO(ucol_clone_67, pFpp) GO(ucol_close_67, vFp) GO(ucol_closeElements_67, vFp) +GO(ucol_setMaxVariable_67, vFpip) GO(ucol_getOffset_67, iFp) GO(ucol_getRules_67, pFpp) GO(ucol_getSortKey_67, iFppipi) diff --git a/src/wrapped/wrappedicui18n72_private.h b/src/wrapped/wrappedicui18n72_private.h index 7010b9f3..351b7e69 100644 --- a/src/wrapped/wrappedicui18n72_private.h +++ b/src/wrapped/wrappedicui18n72_private.h @@ -53,8 +53,10 @@ GO(ucal_setGregorianChange_72, vFpdp) GO(ucal_setMillis_72, vFpdp) GO(ucal_setTimeZone_72, vFppip) +GO(ucol_clone_72, pFpp) GO(ucol_close_72, vFp) GO(ucol_closeElements_72, vFp) +GO(ucol_setMaxVariable_72, vFpip) GO(ucol_getOffset_72, iFp) GO(ucol_getRules_72, pFpp) GO(ucol_getSortKey_72, iFppipi) diff --git a/src/wrapped/wrappedlibssl3.c b/src/wrapped/wrappedlibssl3.c index 9c287b56..38ba5444 100755 --- a/src/wrapped/wrappedlibssl3.c +++ b/src/wrapped/wrappedlibssl3.c @@ -259,6 +259,30 @@ static void* find_client_cert_Fct(void* fct) return NULL; } +// alpn_select_cb +#define GO(A) \ +static uintptr_t my3_alpn_select_cb_fct_##A = 0; \ +static int my3_alpn_select_cb_##A(void* a, void* b, void* c, void* d, uint32_t e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my3_alpn_select_cb_fct_##A, "ppppup", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_alpn_select_cb_Fct(void* fct) +{ + if(!fct) return NULL; + void* p; + if((p = GetNativeFnc((uintptr_t)fct))) return p; + #define GO(A) if(my3_alpn_select_cb_fct_##A == (uintptr_t)fct) return my3_alpn_select_cb_##A; + SUPER() + #undef GO + #define GO(A) if(my3_alpn_select_cb_fct_##A == 0) {my3_alpn_select_cb_fct_##A = (uintptr_t)fct; return my3_alpn_select_cb_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libSSL alpn_select_cb callback\n"); + return NULL; +} + #undef SUPER EXPORT void my3_SSL_CTX_set_default_passwd_cb(x64emu_t* emu, void* ctx, void* cb) @@ -327,6 +351,11 @@ EXPORT void my3_SSL_CTX_set_client_cert_cb(x64emu_t* emu, void* ctx, void* cb) my->SSL_CTX_set_client_cert_cb(ctx, find_client_cert_Fct(cb)); } +EXPORT void my3_SSL_CTX_set_alpn_select_cb(x64emu_t* emu, void* ctx, void* f, void* arg) +{ + my->SSL_CTX_set_alpn_select_cb(ctx, find_alpn_select_cb_Fct(f), arg); +} + #define CUSTOM_INIT \ SETALT(my3_); \ getMy(lib); \ diff --git a/src/wrapped/wrappedlibssl3_private.h b/src/wrapped/wrappedlibssl3_private.h index 755854d7..e9ff941c 100755 --- a/src/wrapped/wrappedlibssl3_private.h +++ b/src/wrapped/wrappedlibssl3_private.h @@ -224,7 +224,7 @@ GO(SSL_check_private_key, iFp) //GO(ssl_check_serverhello_tlsext, //GO(ssl_check_srvr_ecc_cert_and_alg, GO(SSL_CIPHER_description, pFppi) -//GO(SSL_CIPHER_find, +GO(SSL_CIPHER_find, pFpp) GO(SSL_CIPHER_get_bits, iFpp) //GO(ssl_cipher_get_cert_index, //GO(ssl_cipher_get_evp, @@ -264,6 +264,7 @@ GO(SSL_CTX_add_client_CA, iFpp) //GO(SSL_CTX_add_session, GOM(SSL_CTX_callback_ctrl, lFEpip) GO(SSL_CTX_check_private_key, iFp) +GO(SSL_CTX_config, iFpp) GO(SSL_CTX_ctrl, lFpilp) //GO(SSL_CTX_flush_sessions, GO(SSL_CTX_free, vFp) @@ -294,11 +295,12 @@ GO(SSL_CTX_new, pFp) //GO(SSL_CTX_sess_set_new_cb, //GO(SSL_CTX_sess_set_remove_cb, //GO(SSL_CTX_set1_param, -//GO(SSL_CTX_set_alpn_protos, -//GO(SSL_CTX_set_alpn_select_cb, +GO(SSL_CTX_set_alpn_protos, iFppu) +GOM(SSL_CTX_set_alpn_select_cb, vFEppp) //GO(SSL_CTX_set_cert_cb, GO(SSL_CTX_set_cert_store, vFpp) GOM(SSL_CTX_set_cert_verify_callback, vFEppp) +GO(SSL_CTX_set_ciphersuites, iFpp) GO(SSL_CTX_set_cipher_list, iFpp) GO(SSL_CTX_set_client_CA_list, vFpp) GOM(SSL_CTX_set_client_cert_cb, vFEpp) @@ -319,6 +321,7 @@ GO(SSL_CTX_set_options, lFpl) //GO(SSL_CTX_set_psk_server_callback, //GO(SSL_CTX_set_purpose, GO(SSL_CTX_set_quiet_shutdown, vFpi) +GO(SSL_CTX_set_security_level, vFpi) //GO(SSL_CTX_set_session_id_context, //GO(SSL_CTX_set_srp_cb_arg, //GO(SSL_CTX_set_srp_client_pwd_callback, @@ -360,10 +363,12 @@ GO(SSL_do_handshake, iFp) //GO(ssl_fill_hello_random, GO(SSL_free, vFp) //GO(ssl_free_wbio_buffer, -//GO(SSL_get0_alpn_selected, +GO(SSL_get0_alpn_selected, iFppp) GO(SSL_get0_next_proto_negotiated, vFppp) //GO(SSL_get0_param, +GO(SSL_get0_peer_certificate, pFp) GO(SSL_get0_session, pFp) +GO(SSL_get1_peer_certificate, pFp) GO(SSL_get1_session, pFp) //GO(ssl_get_algorithm2, GO(SSL_get_certificate, pFp) @@ -386,7 +391,6 @@ GO(SSL_get_finished, LFppL) //GO(SSL_get_info_callback, //GO(ssl_get_new_session, GO(SSL_get_peer_cert_chain, pFp) -GO(SSL_get_peer_certificate, pFp) GO(SSL_get_peer_finished, LFppL) //GO(ssl_get_prev_session, GO(SSL_get_privatekey, pFp) @@ -423,6 +427,7 @@ GO(SSL_get_version, pFp) //GO(SSL_get_wfd, //GO(SSL_has_matching_session_id, //GO(ssl_init_wbio_buffer, +GO(SSL_is_init_finished, iFp) GO(SSL_is_server, iFp) GO(SSL_library_init, iFv) //GO(ssl_load_ciphers, @@ -441,8 +446,8 @@ GO(SSL_pending, iFp) //GO(ssl_prepare_clienthello_tlsext, //GO(ssl_prepare_serverhello_tlsext, GO(SSL_read, iFppi) -//GO(SSL_renegotiate, -//GO(SSL_renegotiate_abbreviated, +GO(SSL_renegotiate, iFp) +GO(SSL_renegotiate_abbreviated, iFp) GO(SSL_renegotiate_pending, iFp) //GO(ssl_replace_hash, //GO(SSL_rstate_string, @@ -463,6 +468,7 @@ GO(SSL_SESSION_free, vFp) GO(SSL_SESSION_new, pFv) //GO(SSL_SESSION_print, //GO(SSL_SESSION_print_fp, +GO(SSL_session_reused, iFp) //GO(SSL_SESSION_set1_id_context, //GO(SSL_SESSION_set_ex_data, //GO(SSL_SESSION_set_time, @@ -484,6 +490,7 @@ GO(SSL_set_fd, iFpi) //GO(SSL_set_generate_session_id, //GO(SSL_set_info_callback, //GO(SSL_set_msg_callback, +GO(SSL_set_options, UFpU) //GO(ssl_set_peer_cert_type, GOM(SSL_set_psk_client_callback, vFEpp) //GO(SSL_set_psk_server_callback, |