Skip to content

Commit

Permalink
ssh-key: temporarily remove ed25519 feature
Browse files Browse the repository at this point in the history
This makes it possible to publish a prerelease, which we otherwise can't
do since we're sourcing `ed25519-dalek` from this git branch:

dalek-cryptography/curve25519-dalek#676

This commit can be reverted immediately after we publish a crate
release.
  • Loading branch information
tarcieri committed Jul 28, 2024
1 parent 0fa00bf commit bf7a7ae
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ssh-key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features default,dsa,ed25519,getrandom,p256,p384,p521,rsa,tdes,std --release
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features default,dsa,getrandom,p256,p384,p521,rsa,tdes,std --release # ed25519
- run: cargo build --target ${{ matrix.target }} --no-default-features --features alloc,crypto,dsa,encryption,tdes --release

test:
Expand All @@ -88,7 +88,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset --exclude-features default,dsa,ed25519,getrandom,p256,p384,p521,rsa,tdes,std --release
- run: cargo hack test --feature-powerset --exclude-features default,dsa,getrandom,p256,p384,p521,rsa,tdes,std --release # ed25519
- run: cargo test --release
- run: cargo test --release --features getrandom
- run: cargo test --release --features std
Expand Down
66 changes: 0 additions & 66 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ opt-level = 2

[patch.crates-io]
# https://github.com/dalek-cryptography/curve25519-dalek/pull/676
ed25519-dalek = { git = "https://github.com/dalek-cryptography/curve25519-dalek.git", branch = "rustcrypto-new-releases" }
#ed25519-dalek = { git = "https://github.com/dalek-cryptography/curve25519-dalek.git", branch = "rustcrypto-new-releases" }
6 changes: 3 additions & 3 deletions ssh-key/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ zeroize = { version = "1", default-features = false }
bcrypt-pbkdf = { version = "=0.11.0-pre.1", optional = true, default-features = false, features = ["alloc"] }
bigint = { package = "num-bigint-dig", version = "0.8", optional = true, default-features = false }
dsa = { version = "=0.7.0-pre.0", optional = true, default-features = false }
ed25519-dalek = { version = "=2.2.0-pre", optional = true, default-features = false }
#ed25519-dalek = { version = "=2.2.0-pre", optional = true, default-features = false }
p256 = { version = "=0.14.0-pre.1", optional = true, default-features = false, features = ["ecdsa"] }
p384 = { version = "=0.14.0-pre.1", optional = true, default-features = false, features = ["ecdsa"] }
p521 = { version = "=0.14.0-pre.1", optional = true, default-features = false, features = ["ecdsa"] }
Expand Down Expand Up @@ -61,10 +61,10 @@ std = [
"signature/std"
]

crypto = ["ed25519", "p256", "p384", "p521", "rsa"] # NOTE: `dsa` is obsolete/weak
crypto = ["p256", "p384", "p521", "rsa"] # ... "ed25519"] NOTE: `dsa` is obsolete/weak
dsa = ["dep:bigint", "dep:dsa", "dep:sha1", "alloc", "signature/rand_core"]
ecdsa = ["dep:sec1"]
ed25519 = ["dep:ed25519-dalek", "rand_core"]
#ed25519 = ["dep:ed25519-dalek", "rand_core"]
encryption = [
"dep:bcrypt-pbkdf",
"alloc",
Expand Down
1 change: 1 addition & 0 deletions ssh-key/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]
#![allow(unexpected_cfgs)] // `ed25519` is temporarily disabled
#![forbid(unsafe_code)]
#![warn(
clippy::alloc_instead_of_core,
Expand Down
1 change: 1 addition & 0 deletions ssh-key/tests/certificate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! OpenSSH certificate tests.

#![cfg(feature = "alloc")]
#![allow(unexpected_cfgs)] // `ed25519` is temporarily disabled

use hex_literal::hex;
use ssh_key::{Algorithm, Certificate};
Expand Down
1 change: 1 addition & 0 deletions ssh-key/tests/certificate_builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Certificate builder tests.

#![allow(unexpected_cfgs)] // `ed25519` is temporarily disabled
#![cfg(all(
feature = "alloc",
feature = "rand_core",
Expand Down
1 change: 1 addition & 0 deletions ssh-key/tests/sshsig.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! `sshsig` signature tests.

#![cfg(feature = "alloc")]
#![allow(unexpected_cfgs)] // `ed25519` is temporarily disabled

use hex_literal::hex;
use ssh_key::{Algorithm, HashAlg, LineEnding, PublicKey, SshSig};
Expand Down

0 comments on commit bf7a7ae

Please sign in to comment.