From: Otto Moerbeek Date: Tue, 3 Feb 2026 15:09:43 +0000 (+0100) Subject: Better comments and function names X-Git-Tag: rec-5.5.0-alpha0~6^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c6bd1ef2761b7be22142cacda8b1a4777bd4dcc;p=thirdparty%2Fpdns.git Better comments and function names Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/rec-rust-lib/rust/src/web.rs b/pdns/recursordist/rec-rust-lib/rust/src/web.rs index fd87e796a9..ea9cdf3df9 100644 --- a/pdns/recursordist/rec-rust-lib/rust/src/web.rs +++ b/pdns/recursordist/rec-rust-lib/rust/src/web.rs @@ -733,12 +733,12 @@ async fn serveweb_async( if !config.certificate.is_empty() { let certs; let key; - if config.key.is_empty() { // Assuming its pkcs12 (aka pfx). - (key, certs) = load_pkcs12_key_and_cert(&config.certificate, &config.password, &ctx)?; + if config.key.is_empty() { // Assuming it's pkcs12 (aka pfx). + (key, certs) = load_pkcs12_key_and_certs(&config.certificate, &config.password, &ctx)?; } else { - certs = load_certs(&config.certificate, &ctx)?; - key = load_private_key(&config.key, &ctx)?; + certs = load_pem_certs(&config.certificate, &ctx)?; + key = load_pem_private_key(&config.key, &ctx)?; } let mut server_config = rustls::ServerConfig::builder() .with_no_client_auth() @@ -989,7 +989,7 @@ pub fn serveweb( } // Load public certificates from file. -fn load_certs( +fn load_pem_certs( filename: &str, ctx: &Arc, ) -> std::io::Result>> { @@ -1038,7 +1038,7 @@ fn load_certs( } // Load private key from file. -fn load_private_key( +fn load_pem_private_key( filename: &str, ctx: &Arc, ) -> std::io::Result> { @@ -1063,8 +1063,8 @@ fn load_private_key( } -// Load private and cert key from pkcs12 (pfx) file. -fn load_pkcs12_key_and_cert( +// Load private key and certs from pkcs12 (pfx) file. +fn load_pkcs12_key_and_certs( filename: &str, password: &str, ctx: &Arc,