Skip to content

Commit

Permalink
Update rustls-pemfile requirement from 1.0 to 2.0 in /object_store (#…
Browse files Browse the repository at this point in the history
…5155)

* Update rustls-pemfile requirement from 1.0 to 2.0 in /object_store

Updates the requirements on [rustls-pemfile](https://github.com/rustls/pemfile) to permit the latest version.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](rustls/pemfile@v/1.0.0...v/2.0.0)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raphael Taylor-Davies <[email protected]>
  • Loading branch information
dependabot[bot] and tustvold authored Dec 5, 2023
1 parent a36bf7a commit cb338c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ serde_json = { version = "1.0", default-features = false, optional = true }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls-native-roots"], optional = true }
ring = { version = "0.17", default-features = false, features = ["std"], optional = true }
rustls-pemfile = { version = "1.0", default-features = false, optional = true }
rustls-pemfile = { version = "2.0", default-features = false, features = ["std"], optional = true }
tokio = { version = "1.25.0", features = ["sync", "macros", "rt", "time", "io-util"] }

[target.'cfg(target_family="unix")'.dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions object_store/src/gcp/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ fn decode_first_rsa_key(private_key_pem: String) -> Result<RsaKeyPair> {

// Reading from string is infallible
match rustls_pemfile::read_one(&mut reader).unwrap() {
Some(Item::PKCS8Key(key)) => Ok(RsaKeyPair::from_pkcs8(&key)?),
Some(Item::RSAKey(key)) => Ok(RsaKeyPair::from_der(&key)?),
Some(Item::Pkcs8Key(key)) => Ok(RsaKeyPair::from_pkcs8(key.secret_pkcs8_der())?),
Some(Item::Pkcs1Key(key)) => Ok(RsaKeyPair::from_der(key.secret_pkcs1_der())?),
_ => Err(Error::MissingKey),
}
}
Expand Down

0 comments on commit cb338c9

Please sign in to comment.