From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH 1/2] openid connect: http client: use TlS platform verifier
Date: Mon, 21 Jul 2025 18:52:32 +0200 [thread overview]
Message-ID: <20250721165306.64972-1-t.lamprecht@proxmox.com> (raw)
As otherwise a valid cert from Let's Encrypt got rejected as insecure
TLS.
It might be better to switch to proxmox-http sync client here, which
is ureq but better maintained code and less duplication.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
proxmox-openid/src/http_client.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/proxmox-openid/src/http_client.rs b/proxmox-openid/src/http_client.rs
index 7d383d5d..904a5bac 100755
--- a/proxmox-openid/src/http_client.rs
+++ b/proxmox-openid/src/http_client.rs
@@ -37,7 +37,12 @@ pub enum Error {
}
fn ureq_agent() -> Result<ureq::Agent, Error> {
- let mut config = ureq::Agent::config_builder();
+ let mut config = ureq::Agent::config_builder().tls_config(
+ ureq::tls::TlsConfig::builder()
+ .provider(ureq::tls::TlsProvider::NativeTls)
+ .root_certs(ureq::tls::RootCerts::PlatformVerifier)
+ .build(),
+ );
if let Ok(val) = env::var("all_proxy").or_else(|_| env::var("ALL_PROXY")) {
let proxy = ureq::Proxy::new(&val).map_err(Box::new)?;
config = config.proxy(Some(proxy));
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-07-21 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 16:52 Thomas Lamprecht [this message]
2025-07-21 16:52 ` [pve-devel] applied: [PATCH 2/2] openid connect: http client: avoid unversioned ureq module Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250721165306.64972-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox