Lua Requires Chilkat v11.0.0+
Lua
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat Lua Downloads
local chilkat = require("chilkat")
local http = chilkat.Http.new()
local cert = chilkat.Cert.new()
local success = http:get_server_cert("chilkatsoft.com", 443, cert)
if not success then
print(http.last_error_text)
return
end
print(cert.subject_dn)
print(cert.valid_to_str)
-- Output:
-- CN=*.chilkatsoft.com
-- Wed, 10 Jun 2026 23:59:59 GMT