From 2ecfe2f70284da63516f3b1ac3adaa2f40142553 Mon Sep 17 00:00:00 2001 From: Max Kalashnikoff Date: Tue, 20 May 2025 22:24:00 +0200 Subject: [PATCH 1/2] fix(Apns): handling of the certificate expiration --- src/providers/apns.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/providers/apns.rs b/src/providers/apns.rs index 38753b80..312d76ba 100644 --- a/src/providers/apns.rs +++ b/src/providers/apns.rs @@ -175,6 +175,10 @@ impl PushProvider for ApnsProvider { ); Err(Error::ApnsCertificateUnknownCA) } + dbg if dbg.contains("received fatal alert: CertificateExpired") => { + info!("APNs certificate expired: debug:{dbg}, display: {client_error}"); + Err(Error::ApnsCertificateExpired) + } _ => Err(Error::Apns(e)), } } From 50bf07e9eb674dcbd92128385ef59d0d302a248b Mon Sep 17 00:00:00 2001 From: Max Kalashnikoff Date: Tue, 20 May 2025 22:27:31 +0200 Subject: [PATCH 2/2] fix: fixing clippy --- src/state.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/state.rs b/src/state.rs index 8949fc47..a33f1b5c 100644 --- a/src/state.rs +++ b/src/state.rs @@ -79,11 +79,7 @@ pub fn new_state( #[cfg(feature = "multitenant")] let jwt_secret = config.jwt_secret.clone(); - let public_ip = match networking::find_public_ip_addr() { - Ok(ip) => Some(ip), - // Note: Should we pass this error back up? - Err(_e) => None, - }; + let public_ip = networking::find_public_ip_addr().ok(); Ok(AppState { config: config.clone(),