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 }