From 287420e04f4bb65a9d9c4c10af7f4058e932796a Mon Sep 17 00:00:00 2001 From: clux Date: Sun, 6 Aug 2023 09:20:38 +0100 Subject: [PATCH] Bump pem to 3 Replaces #1267 and uses previously backed out change from https://github.com/kube-rs/kube/issues/1181 Signed-off-by: clux --- kube-client/Cargo.toml | 2 +- kube-client/src/config/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index ddc90b555..ac7fa7368 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -48,7 +48,7 @@ http-body = { version = "0.4.2", optional = true } either = { version = "1.6.1", optional = true } thiserror = "1.0.29" futures = { version = "0.3.17", optional = true } -pem = { version = "1.1.0", optional = true } +pem = { version = "3.0.1", optional = true } openssl = { version = "0.10.36", optional = true } rustls = { version = "0.21.0", features = ["dangerous_configuration"], optional = true } rustls-pemfile = { version = "1.0.0", optional = true } diff --git a/kube-client/src/config/mod.rs b/kube-client/src/config/mod.rs index 370b287ac..ce5c9b57d 100644 --- a/kube-client/src/config/mod.rs +++ b/kube-client/src/config/mod.rs @@ -365,8 +365,8 @@ fn certs(data: &[u8]) -> Result>, pem::PemError> { Ok(pem::parse_many(data)? .into_iter() .filter_map(|p| { - if p.tag == "CERTIFICATE" { - Some(p.contents) + if p.tag() == "CERTIFICATE" { + Some(p.into_contents()) } else { None }