awa
This commit is contained in:
@@ -984,9 +984,14 @@ pub(crate) async fn get_certificate(
|
|||||||
None => return Ok(GurtResponse::not_found().with_string_body("Challenge not found")),
|
None => return Ok(GurtResponse::not_found().with_string_body("Challenge not found")),
|
||||||
};
|
};
|
||||||
|
|
||||||
let csr_pem = csr_pem.ok_or_else(|| {
|
let csr_pem = match csr_pem {
|
||||||
GurtResponse::bad_request().with_string_body("CSR not found for this challenge")
|
Some(csr) => csr,
|
||||||
})?;
|
None => {
|
||||||
|
return Ok(
|
||||||
|
GurtResponse::bad_request().with_string_body("CSR not found for this challenge")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if chrono::Utc::now() > expires_at {
|
if chrono::Utc::now() > expires_at {
|
||||||
return Ok(GurtResponse::bad_request().with_string_body("Challenge expired"));
|
return Ok(GurtResponse::bad_request().with_string_body("Challenge expired"));
|
||||||
|
|||||||
Reference in New Issue
Block a user