commit d013ac35e0e47509d24e09834078e00dcb9060e6
parent 16a5b9d0d7de81aa8c3d9e4c580dafa2ee567c1d
Author: Florian Dold <florian@dold.me>
Date: Tue, 3 Jan 2023 11:08:26 +0100
wip
Diffstat:
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/quickjs/quickjs-libc.c b/quickjs/quickjs-libc.c
@@ -2247,6 +2247,11 @@ static JSValue js_os_fetchHttp(JSContext *ctx, JSValueConst this_val,
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
}
+ // FIXME: This is only a temporary hack until we have proper TLS CA support
+ // on all platforms
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
+
method_str = JS_ToCString(ctx, method);
if (0 == strcasecmp(method_str, "get")) {
diff --git a/quickjs/quickjs.c b/quickjs/quickjs.c
@@ -33821,7 +33821,6 @@ static JSValue __JS_EvalInternal(JSContext *ctx, JSValueConst this_obj,
fd->func_name = JS_DupAtom(ctx, JS_ATOM__eval_);
if (b) {
if (add_closure_variables(ctx, fd, b, scope_idx)) {
- fprintf(stderr, "unable to add closure variables\n");
goto fail;
}
}
@@ -33834,16 +33833,12 @@ static JSValue __JS_EvalInternal(JSContext *ctx, JSValueConst this_obj,
err = js_parse_program(s);
if (err) {
- fprintf(stderr, "unable to parse program\n");
fail:
- fprintf(stderr, "fail in internal eval\n");
free_token(s, &s->token);
js_free_function_def(ctx, fd);
goto fail1;
}
- fprintf(stderr, "parsed program\n");
-
/* create the function object and all the enclosed functions */
fun_obj = js_create_function(ctx, fd);
if (JS_IsException(fun_obj))
diff --git a/taler_wallet_core_lib.h b/taler_wallet_core_lib.h
@@ -60,9 +60,10 @@ TALER_WALLET_set_handler(struct TALER_WALLET_Handle *h,
* Set/override the JS file with the wallet-core implementation.
* Must be called before the wallet runs.
*/
-void
-TALER_WALLET_set_jsfile(struct TALER_WALLET_Handle *h,
- const char *filename);
+// FIXME: Not implemented!
+//void
+//TALER_WALLET_set_jsfile(struct TALER_WALLET_Handle *h,
+// const char *filename);
/**
* Send a message to wallet-core.
@@ -71,8 +72,8 @@ TALER_WALLET_set_jsfile(struct TALER_WALLET_Handle *h,
* set with #TALER_WALLET_set_handler.
*/
int
-TALER_WALLET_send_message (struct TALER_WALLET_Handle *h,
- const char *msg);
+TALER_WALLET_send_message(struct TALER_WALLET_Handle *h,
+ const char *msg);
/**
* Run wallet-core in a thread.
@@ -80,10 +81,13 @@ TALER_WALLET_send_message (struct TALER_WALLET_Handle *h,
* This function creates a new thread and returns immediately.
*/
void
-TALER_WALLET_run (struct TALER_WALLET_Handle *h);
+TALER_WALLET_run(struct TALER_WALLET_Handle *h);
+/**
+ * Block until the wallet returns.
+ */
void
-TALER_WALLET_join (struct TALER_WALLET_Handle *wh);
+TALER_WALLET_join(struct TALER_WALLET_Handle *wh);
/**
* Destroy the wallet handle and free resources associated with it.