From 0b5308ae28e9d737c34b7e4eaa7b09bc50aaf94a Mon Sep 17 00:00:00 2001 From: Ryuzo Yamamoto Date: Sat, 9 May 2026 12:03:57 +0900 Subject: [PATCH] refactor(deps): drop direct pkcs8 dep, use rsa re-exports The rsa = "0.9" crate is pinned to pkcs8 0.10 internally. Carrying our own direct pkcs8 dep means renovate keeps trying to bump it to 0.11, but the new traits are incompatible with RsaPrivateKey / RsaPublicKey until rsa itself moves to pkcs8 0.11. Sourcing the traits from rsa::pkcs8 removes the foot-gun -- version drift can only happen when we bump rsa. --- Cargo.toml | 3 +-- src/cert.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2331bbe..0d44260 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,9 @@ rustls-pemfile = "2.2.0" tokio-rustls = "0.26.4" tokio-postgres = "0.7.15" deadpool = "0.13.0" -rsa = "0.9.9" +rsa = { version = "0.9.9", features = ["pem"] } rand = "0.10.0" rand_core = "0.6" -pkcs8 = { version = "0.10.2", features = ["pem"] } tokio = { version = "1.49.0", features = ["rt", "time", "sync", "macros"] } arc-swap = "1.7.1" thiserror = "2.0.17" diff --git a/src/cert.rs b/src/cert.rs index 097c361..b445f83 100644 --- a/src/cert.rs +++ b/src/cert.rs @@ -4,7 +4,7 @@ use crate::error::Error; use crate::instance::InstanceConnectionName; use arc_swap::ArcSwap; use chrono::{DateTime, Utc}; -use pkcs8::{EncodePrivateKey, EncodePublicKey, LineEnding}; +use rsa::pkcs8::{EncodePrivateKey, EncodePublicKey, LineEnding}; use rsa::{RsaPrivateKey, RsaPublicKey}; use rustls::pki_types::{CertificateDer, PrivateKeyDer}; use std::net::IpAddr;