This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new cb338c94a9 Update rustls-pemfile requirement from 1.0 to 2.0 in
/object_store (#5155)
cb338c94a9 is described below
commit cb338c94a9e5226903796848cc1a370df1e8a842
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 5 12:54:05 2023 +0000
Update rustls-pemfile requirement from 1.0 to 2.0 in /object_store (#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](https://github.com/rustls/pemfile/compare/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]>
---
object_store/Cargo.toml | 2 +-
object_store/src/gcp/credential.rs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/object_store/Cargo.toml b/object_store/Cargo.toml
index d5cf91c332..e7f99e529e 100644
--- a/object_store/Cargo.toml
+++ b/object_store/Cargo.toml
@@ -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]
diff --git a/object_store/src/gcp/credential.rs
b/object_store/src/gcp/credential.rs
index 29c7b4563a..dc504da057 100644
--- a/object_store/src/gcp/credential.rs
+++ b/object_store/src/gcp/credential.rs
@@ -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),
}
}