From 89e572faf86c6fb68e84fe248e512f0babcb7270 Mon Sep 17 00:00:00 2001 From: Draco-Lunaris-Echo Date: Fri, 5 Jun 2026 19:27:32 -0500 Subject: [PATCH] fix(ca): correct not_after column name to expires_at in CRL query The generate_crl() SQL query referenced a non-existent column "not_after" instead of the actual column "expires_at" in the certificates table. This caused a 500 error when requesting the CRL endpoint because PostgreSQL could not find the column. Fixes: CRL endpoint returns 500 Internal Server Error Co-authored-by: Draco Lunaris <331325+Draco-Lunaris@users.noreply.github.com> --- crates/pm-ca/src/ca.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pm-ca/src/ca.rs b/crates/pm-ca/src/ca.rs index f94d868..e74546c 100644 --- a/crates/pm-ca/src/ca.rs +++ b/crates/pm-ca/src/ca.rs @@ -553,7 +553,7 @@ impl CertAuthority { FROM certificates \ WHERE status = 'revoked'::cert_status \ AND revoked_at IS NOT NULL \ - AND not_after > NOW() \ + AND expires_at > NOW() \ ORDER BY revoked_at ASC", ) .fetch_all(db)