diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-06-09 13:11:27 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-06-09 13:11:27 -0400 |
commit | 259331a015432cfd47eb5c6161c6ddf05288a01c (patch) | |
tree | 7fbbeef5cd8123e3416b8270c740adbb5a072fef /src/lpm.c | |
parent | 5343f4820b5acf49da65b1ea635d2f42d0292c16 (diff) | |
download | lite-xl-plugin-manager-259331a015432cfd47eb5c6161c6ddf05288a01c.tar.gz lite-xl-plugin-manager-259331a015432cfd47eb5c6161c6ddf05288a01c.zip |
Relaxed detection of datadir and core plugins to probably fix #112.
Diffstat (limited to 'src/lpm.c')
-rw-r--r-- | src/lpm.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -610,6 +610,10 @@ static int lpm_certs(lua_State* L) { if (git_initialized) git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, NULL, path); strncpy(git_cert_path, path, MAX_PATH); + if (print_trace) { + fprintf(stderr, "[ssl] SSL directory set to %s.\n", git_cert_path); + fflush(stderr); + } status = mbedtls_x509_crt_parse_path(&x509_certificate, path); if (status < 0) return luaL_mbedtls_error(L, status, "mbedtls_x509_crt_parse_path failed to parse all CA certificates in %s", path); @@ -618,10 +622,6 @@ static int lpm_certs(lua_State* L) { fflush(stderr); } mbedtls_ssl_conf_ca_chain(&ssl_config, &x509_certificate, NULL); - if (print_trace) { - fprintf(stderr, "[ssl] SSL directory set to %s.\n", git_cert_path); - fflush(stderr); - } } else { if (strcmp(type, "system") == 0) { #if _WIN32 @@ -664,6 +664,10 @@ static int lpm_certs(lua_State* L) { if (git_initialized) git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, path, NULL); strncpy(git_cert_path, path, MAX_PATH); + if (print_trace) { + fprintf(stderr, "[ssl] SSL file set to %s.\n", git_cert_path); + fflush(stderr); + } status = mbedtls_x509_crt_parse_file(&x509_certificate, path); if (status < 0) return luaL_mbedtls_error(L, status, "mbedtls_x509_crt_parse_file failed to parse CA certificate %s", path); |