Skip to content

Commit

Permalink
Добавил проверку на существование файла
Browse files Browse the repository at this point in the history
  • Loading branch information
a1div0 committed Feb 2, 2022
1 parent d91b7cd commit cf8046a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions acme-client/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ local function getCert(self)
end

local function certValidTo(certName)
local f = fio.open(certName, {"O_RDONLY"})
if not f then
return nil
end
f:close()

local command = string.format("openssl x509 -enddate -noout -in '%s' | cut -d= -f 2", certName)
local outputStr = execute(command)

Expand Down

0 comments on commit cf8046a

Please sign in to comment.