From 55b496f5856411e594dfdfa01f7749921ed46107 Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sat, 8 Nov 2025 15:34:08 +0800 Subject: [PATCH] awa --- dns/src/gurt_server/routes.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dns/src/gurt_server/routes.rs b/dns/src/gurt_server/routes.rs index 8a9199d..f15e6a9 100644 --- a/dns/src/gurt_server/routes.rs +++ b/dns/src/gurt_server/routes.rs @@ -984,9 +984,14 @@ pub(crate) async fn get_certificate( None => return Ok(GurtResponse::not_found().with_string_body("Challenge not found")), }; - let csr_pem = csr_pem.ok_or_else(|| { - GurtResponse::bad_request().with_string_body("CSR not found for this challenge") - })?; + let csr_pem = match csr_pem { + Some(csr) => csr, + None => { + return Ok( + GurtResponse::bad_request().with_string_body("CSR not found for this challenge") + ) + } + }; if chrono::Utc::now() > expires_at { return Ok(GurtResponse::bad_request().with_string_body("Challenge expired"));