Skip to content

Commit 9ee7302

Browse files
authored
ssh-key: bump elliptic curve and password hash deps; MSRV 1.65 (#66)
Bumps the following dependencies: - `bcrypt-pbkdf` v0.10 - `dsa` v0.6 - `p256` v0.13 - `p384` v0.13 - `rand_core` v0.6.4 (for `CryptoRngCore`) - `sec1` v0.7
1 parent abc720d commit 9ee7302

18 files changed

+146
-99
lines changed

.github/workflows/ssh-key.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
strategy:
6060
matrix:
6161
rust:
62-
- 1.60.0 # MSRV
62+
- 1.65.0 # MSRV
6363
- stable
6464
target:
6565
- thumbv7em-none-eabi
@@ -80,7 +80,7 @@ jobs:
8080
strategy:
8181
matrix:
8282
rust:
83-
- 1.60.0 # MSRV
83+
- 1.65.0 # MSRV
8484
- stable
8585
steps:
8686
- uses: actions/checkout@v3

.github/workflows/workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v3
2222
- uses: actions-rs/toolchain@v1
2323
with:
24-
toolchain: 1.64.0
24+
toolchain: 1.67.0
2525
components: clippy
2626
override: true
2727
profile: minimal

Cargo.lock

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

ssh-encoding/src/error.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ impl fmt::Display for Error {
3838
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3939
match self {
4040
#[cfg(feature = "base64")]
41-
Error::Base64(err) => write!(f, "Base64 encoding error: {}", err),
41+
Error::Base64(err) => write!(f, "Base64 encoding error: {err}"),
4242
Error::CharacterEncoding => write!(f, "character encoding invalid"),
4343
Error::Length => write!(f, "length invalid"),
4444
Error::Overflow => write!(f, "internal overflow error"),
4545
#[cfg(feature = "pem")]
46-
Error::Pem(err) => write!(f, "{}", err),
46+
Error::Pem(err) => write!(f, "{err}"),
4747
Error::TrailingData { remaining } => write!(
4848
f,
49-
"unexpected trailing data at end of message ({} bytes)",
50-
remaining
49+
"unexpected trailing data at end of message ({remaining} bytes)",
5150
),
5251
}
5352
}
@@ -99,4 +98,14 @@ impl From<pem::Error> for Error {
9998

10099
#[cfg(feature = "std")]
101100
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
102-
impl std::error::Error for Error {}
101+
impl std::error::Error for Error {
102+
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
103+
match self {
104+
#[cfg(feature = "base64")]
105+
Self::Base64(err) => Some(err),
106+
#[cfg(feature = "pem")]
107+
Self::Pem(err) => Some(err),
108+
_ => None,
109+
}
110+
}
111+
}

ssh-key/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ categories = ["authentication", "cryptography", "encoding", "no-std", "parser-im
1414
keywords = ["crypto", "certificate", "openssh", "ssh", "sshsig"]
1515
readme = "README.md"
1616
edition = "2021"
17-
rust-version = "1.60"
17+
rust-version = "1.65"
1818

1919
[dependencies]
2020
encoding = { package = "ssh-encoding", version = "0.1", features = ["base64", "pem", "sha2"], path = "../ssh-encoding" }
@@ -26,15 +26,15 @@ zeroize = { version = "1", default-features = false }
2626
# optional dependencies
2727
aes = { version = "0.8", optional = true, default-features = false }
2828
ctr = { version = "0.9", optional = true, default-features = false }
29-
bcrypt-pbkdf = { version = "0.9", optional = true, default-features = false }
29+
bcrypt-pbkdf = { version = "0.10", optional = true, default-features = false, features = ["alloc"] }
3030
bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false }
31-
dsa = { version = "0.5", optional = true, default-features = false }
31+
dsa = { version = "0.6", optional = true, default-features = false }
3232
ed25519-dalek = { version = "=2.0.0-pre.0", optional = true, default-features = false }
33-
p256 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
34-
p384 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
35-
rand_core = { version = "0.6", optional = true, default-features = false }
33+
p256 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
34+
p384 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
35+
rand_core = { version = "0.6.4", optional = true, default-features = false }
3636
rsa = { version = "0.8", optional = true, default-features = false }
37-
sec1 = { version = "0.3", optional = true, default-features = false, features = ["point"] }
37+
sec1 = { version = "0.7", optional = true, default-features = false, features = ["point"] }
3838
serde = { version = "1", optional = true }
3939
sha1 = { version = "0.10", optional = true, default-features = false }
4040

0 commit comments

Comments
 (0)