--- a/mod_client_certs/mod_client_certs.lua Sun Jun 30 00:50:28 2013 +0200
+++ b/mod_client_certs/mod_client_certs.lua Sun Jun 30 01:12:24 2013 +0200
@@ -43,7 +43,7 @@
end
--]]
- if not cert:valid_at(os.time()) then
+ if not cert:validat(os.time()) then
module:log("debug", "This certificate is not valid at this moment.");
end
@@ -144,7 +144,7 @@
local can_manage = append:get_child("no-cert-management", xmlns_saslcert) ~= nil;
x509cert = x509cert:gsub("^%s*(.-)%s*$", "%1");
- local cert = x509.cert_from_pem(
+ local cert = x509.load(
"-----BEGIN CERTIFICATE-----\n"
.. x509cert ..
"\n-----END CERTIFICATE-----\n");
@@ -302,7 +302,7 @@
local name = fields.name;
local x509cert = fields.cert:gsub("^%s*(.-)%s*$", "%1");
- local cert = x509.cert_from_pem(
+ local cert = x509.load(
"-----BEGIN CERTIFICATE-----\n"
.. x509cert ..
"\n-----END CERTIFICATE-----\n");
@@ -355,7 +355,7 @@
return
end
module:log("info", "Client Certificate: %s", cert:digest(digest_algo));
- if not cert:valid_at(now()) then
+ if not cert:validat(now()) then
module:log("debug", "Client has an expired certificate", cert:digest(digest_algo));
return
end