about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedcrypto3.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-10 11:43:14 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-10 11:43:14 +0200
commit8ee8301bd078de79d2214ccaeba776afdca91020 (patch)
treeaa7771b78e7faefe62a1d1d9b7bdb1dbedd6c891 /src/wrapped/wrappedcrypto3.c
parent1d584fead4e5df89d62f17521e17de21f81342c8 (diff)
downloadbox64-8ee8301bd078de79d2214ccaeba776afdca91020.tar.gz
box64-8ee8301bd078de79d2214ccaeba776afdca91020.zip
Added a bunch of wrapped function to libssl.so.3, libcrytpo.so.3 and icu (for #829)
Diffstat (limited to 'src/wrapped/wrappedcrypto3.c')
-rwxr-xr-xsrc/wrapped/wrappedcrypto3.c19
1 files changed, 19 insertions, 0 deletions
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);