aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-12-30 13:41:16 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-12-30 13:41:16 -0500
commite0c00c41e7a92c43ab031d306b3653680ff3dd52 (patch)
tree3809a572e8b221a95ce34705970e18c2dbf78598
parentf49d5014aba8dbc5e04c3ec60353c3b7958687ac (diff)
downloadlite-xl-plugin-manager-e0c00c41e7a92c43ab031d306b3653680ff3dd52.tar.gz
lite-xl-plugin-manager-e0c00c41e7a92c43ab031d306b3653680ff3dd52.zip
Small update.
-rw-r--r--src/lpm.c2
-rw-r--r--src/lpm.lua3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index c8c7a76..818a78a 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -475,7 +475,7 @@ static int lpm_certs(lua_State* L) {
CFTypeRef copyResult = NULL;
OSStatus err = SecItemCopyMatching(query, &copyResult);
if (err == errSecSuccess) {
- CFShow(copyResult);
+ // Try and
}
#else
return luaL_error(L, "can't use system certificates on windows or mac");
diff --git a/src/lpm.lua b/src/lpm.lua
index f6bf3cf..a064ae5 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1674,13 +1674,16 @@ in any circumstance unless explicitly supplied.
common.mkdirp(TMPDIR)
system.certs("system", TMPDIR .. PATHSEP .. "certs.crt")
else
+ local has_certs = false
for i, path in ipairs(paths) do
local stat = system.stat(path)
if stat then
+ has_certs = true
system.certs(stat.type, path)
break
end
end
+ if not has_certs then error("can't find your system's SSL ceritficates; please specify specify a certificate bundle or certificat directory with --ssl_certs") end
end
end