changeset 2106:38d4b0a443ae ssltesting

minor
author Violet7
date Tue, 16 Dec 2025 18:42:17 -0800
parents 3dc3fc1aa563
children 5815f44197ee
files host/test/test_renew_ssl.luan src/luan/host/Https.luan
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
diff -r 3dc3fc1aa563 -r 38d4b0a443ae host/test/test_renew_ssl.luan
--- a/host/test/test_renew_ssl.luan	Tue Dec 16 17:28:57 2025 -0800
+++ b/host/test/test_renew_ssl.luan	Tue Dec 16 18:42:17 2025 -0800
@@ -9,8 +9,8 @@
 
 local Https = require "classpath:luan/host/Https.luan"
 
-local domain = "https.me.luan.software"
-local site_dir = uri("file:local")
+local domain = "https.s3.luan.software"
+local site_dir = uri("file:../sites/ssl1.s3.luan.software/")
 local luanhost_dir = uri("file:..")
 local dry_run = true
 
diff -r 3dc3fc1aa563 -r 38d4b0a443ae src/luan/host/Https.luan
--- a/src/luan/host/Https.luan	Tue Dec 16 17:28:57 2025 -0800
+++ b/src/luan/host/Https.luan	Tue Dec 16 18:42:17 2025 -0800
@@ -230,7 +230,6 @@
 	end
 	--logger.info "done"
 end
-Https.do_set_https = do_set_https	-- for testing
 
 function Https.set_https(is_https)
 	if Http.did_init() then
@@ -254,10 +253,11 @@
 
 function Https.renew_ssl(files,renewal_period,domain,site_dir,luanhost_dir,dry_run)
 	files.csr_file.exists() or error "no CSR file, assuming local https cert"
-	if time_now() - files.csr_file.last_modified() < renewal_period then
+	if time_now() - files.local_cer_file.last_modified() > renewal_period then
 		Issue_cert(domain, site_dir, luanhost_dir, dry_run, files)
 		return
 	end
 end
 
+Https.do_set_https = do_set_https -- for testing
 return Https