Skip to content

Commit 71eedb6

Browse files
committed
Format and fix dependency
Signed-off-by: Yerzhan Mazhkenov <20302932+yerzhan7@users.noreply.github.com>
1 parent 1d61cb4 commit 71eedb6

5 files changed

Lines changed: 17 additions & 28 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mountpoint-s3-client/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ hyper = { version = "1.9.0", features = ["server", "http1"] }
4949
hyper-util = { version = "0.1.20", features = ["tokio"] }
5050
proptest = "1.11.0"
5151
rcgen = "0.13.2"
52-
rustls = "0.23.34"
53-
rustls-pemfile = "2.2.0"
52+
rustls = "0.23.40"
53+
rustls-pki-types = { version = "1.14.1", features = ["std", "alloc"] }
5454
rusty-fork = "0.3.1"
5555
tempfile = "3.27.0"
5656
test-case = "3.3.1"
5757
tokio = { version = "1.52.1", features = ["rt", "rt-multi-thread", "macros", "net", "io-util"] }
58-
tokio-rustls = "0.26.2"
58+
tokio-rustls = "0.26.4"
5959
tracing-subscriber = { version = "0.3.23", features = ["fmt", "env-filter"] }
6060

6161
# HACK: we want our own tests to use the mock client, but don't want to enable it for consumers by

mountpoint-s3-client/tests/tls.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use mountpoint_s3_client::config::{
1616
use mountpoint_s3_client::{NewClientError, S3CrtClient};
1717
use rcgen::{BasicConstraints, CertificateParams, DnType, IsCa, KeyPair};
1818
use rustls::ServerConfig;
19+
use rustls::pki_types::pem::PemObject;
1920
use rustls::pki_types::{CertificateDer, PrivateKeyDer};
2021
use rusty_fork::rusty_fork_test;
2122
use tokio::net::TcpListener;
@@ -77,18 +78,11 @@ fn write_pem(dir: &Path, name: &str, contents: &[u8]) -> PathBuf {
7778
}
7879

7980
fn parse_cert_der(pem: &[u8]) -> CertificateDer<'static> {
80-
let mut cursor = std::io::Cursor::new(pem);
81-
rustls_pemfile::certs(&mut cursor)
82-
.next()
83-
.expect("one cert")
84-
.expect("parse cert")
81+
CertificateDer::from_pem_slice(pem).expect("parse cert")
8582
}
8683

8784
fn parse_key_der(pem: &[u8]) -> PrivateKeyDer<'static> {
88-
let mut cursor = std::io::Cursor::new(pem);
89-
rustls_pemfile::private_key(&mut cursor)
90-
.expect("parse private key")
91-
.expect("private key present")
85+
PrivateKeyDer::from_pem_slice(pem).expect("parse private key")
9286
}
9387

9488
// ---------------------------------------------------------------------------

mountpoint-s3-crt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ctor = "0.10.1"
2525
rand = "0.10.1"
2626
rcgen = "0.13.2"
2727
serde_json = "1.0.149"
28-
tempfile = "3.13.0"
28+
tempfile = "3.27.0"
2929
test-case = "3.3.1"
3030
tracing = { version = "0.1.44", default-features = false, features = ["std", "log"] }
3131
tracing-subscriber = { version = "0.3.23", features = ["fmt", "env-filter"] }

mountpoint-s3/src/cli.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,11 @@ mod tests {
972972
fn ca_bundle_flag_threads_through_to_client_config() {
973973
let ca = PathBuf::from("/some/path/flag-ca.pem");
974974
let cli_args = CliArgs::try_parse_from([
975-
"mount-s3", "bucket", "test/location", "--ca-bundle", ca.to_str().unwrap(),
975+
"mount-s3",
976+
"bucket",
977+
"test/location",
978+
"--ca-bundle",
979+
ca.to_str().unwrap(),
976980
])
977981
.expect("parse succeeds");
978982

0 commit comments

Comments
 (0)