Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ssh-key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -80,7 +80,7 @@ jobs:
strategy:
matrix:
rust:
- 1.60.0 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
toolchain: 1.67.0
components: clippy
override: true
profile: minimal
Expand Down
120 changes: 75 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions ssh-encoding/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
#[cfg(feature = "base64")]
Error::Base64(err) => write!(f, "Base64 encoding error: {}", err),
Error::Base64(err) => write!(f, "Base64 encoding error: {err}"),
Error::CharacterEncoding => write!(f, "character encoding invalid"),
Error::Length => write!(f, "length invalid"),
Error::Overflow => write!(f, "internal overflow error"),
#[cfg(feature = "pem")]
Error::Pem(err) => write!(f, "{}", err),
Error::Pem(err) => write!(f, "{err}"),
Error::TrailingData { remaining } => write!(
f,
"unexpected trailing data at end of message ({} bytes)",
remaining
"unexpected trailing data at end of message ({remaining} bytes)",
),
}
}
Expand Down Expand Up @@ -99,4 +98,14 @@ impl From<pem::Error> for Error {

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl std::error::Error for Error {}
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
#[cfg(feature = "base64")]
Self::Base64(err) => Some(err),
#[cfg(feature = "pem")]
Self::Pem(err) => Some(err),
_ => None,
}
}
}
14 changes: 7 additions & 7 deletions ssh-key/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["authentication", "cryptography", "encoding", "no-std", "parser-im
keywords = ["crypto", "certificate", "openssh", "ssh", "sshsig"]
readme = "README.md"
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"

[dependencies]
encoding = { package = "ssh-encoding", version = "0.1", features = ["base64", "pem", "sha2"], path = "../ssh-encoding" }
Expand All @@ -26,15 +26,15 @@ zeroize = { version = "1", default-features = false }
# optional dependencies
aes = { version = "0.8", optional = true, default-features = false }
ctr = { version = "0.9", optional = true, default-features = false }
bcrypt-pbkdf = { version = "0.9", optional = true, default-features = false }
bcrypt-pbkdf = { version = "0.10", optional = true, default-features = false, features = ["alloc"] }
bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false }
dsa = { version = "0.5", optional = true, default-features = false }
dsa = { version = "0.6", optional = true, default-features = false }
ed25519-dalek = { version = "=2.0.0-pre.0", optional = true, default-features = false }
p256 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "0.12", optional = true, default-features = false, features = ["ecdsa"] }
rand_core = { version = "0.6", optional = true, default-features = false }
p256 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "0.13", optional = true, default-features = false, features = ["ecdsa"] }
rand_core = { version = "0.6.4", optional = true, default-features = false }
rsa = { version = "0.8", optional = true, default-features = false }
sec1 = { version = "0.3", optional = true, default-features = false, features = ["point"] }
sec1 = { version = "0.7", optional = true, default-features = false, features = ["point"] }
serde = { version = "1", optional = true }
sha1 = { version = "0.10", optional = true, default-features = false }

Expand Down
Loading