Skip to content

Bump to signature 3 #1784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
25 changes: 13 additions & 12 deletions Cargo.lock

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

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ x509-ocsp = { path = "./x509-ocsp" }

# https://github.com/RustCrypto/signatures/pull/913
# https://github.com/RustCrypto/signatures/pull/923
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
ecdsa = { git = "https://github.com/baloo/signatures.git", branch = "baloo/std-der-signer" }
rfc6979 = { git = "https://github.com/RustCrypto/signatures.git" }
# https://github.com/RustCrypto/key-wraps/pull/34
# https://github.com/RustCrypto/key-wraps/pull/35
Expand All @@ -85,14 +85,13 @@ aead = { git = "https://github.com/RustCrypto/traits.git" }

# https://github.com/RustCrypto/RSA/pull/478
# https://github.com/RustCrypto/RSA/pull/504
rsa = { git = "https://github.com/RustCrypto/RSA.git" }
rsa = { git = "https://github.com/baloo/RSA.git", branch = "baloo/signature/3" }

# https://github.com/RustCrypto/password-hashes/pull/577
# https://github.com/RustCrypto/password-hashes/pull/578
pbkdf2 = { git = "https://github.com/RustCrypto/password-hashes.git" }
scrypt = { git = "https://github.com/RustCrypto/password-hashes.git" }

crypto-bigint = { git = "https://github.com/RustCrypto/crypto-bigint.git" }
crypto-primes = { git = "https://github.com/entropyxyz/crypto-primes.git" }

# https://github.com/RustCrypto/elliptic-curves/pull/1125
Expand Down
4 changes: 2 additions & 2 deletions cms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rsa = { version = "=0.10.0-pre.4", optional = true }
sha1 = { version = "=0.11.0-pre.5", optional = true }
sha2 = { version = "=0.11.0-pre.5", optional = true }
sha3 = { version = "=0.11.0-pre.5", optional = true }
signature = { version = "=2.3.0-pre.6", features = ["digest", "alloc"], optional = true }
signature = { version = "=3.0.0-pre", features = ["digest", "alloc"], optional = true }
zeroize = { version = "1.8.1", optional = true }

[dev-dependencies]
Expand All @@ -45,7 +45,7 @@ pbkdf2 = "0.13.0-pre.0"
rand = "0.9"
rsa = { version = "=0.10.0-pre.4", features = ["sha2"] }
ecdsa = { version = "=0.17.0-pre.9", features = ["digest", "pem"] }
p256 = "=0.14.0-pre.2"
p256 = { version = "=0.14.0-pre.2", features = ["digest"] }
tokio = { version = "1.43.1", features = ["macros", "rt"] }
x509-cert = { version = "=0.3.0-pre.0", features = ["pem"] }

Expand Down
10 changes: 5 additions & 5 deletions cms/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fn test_build_signed_data() {
.expect("could not add a digest algorithm")
.add_certificate(CertificateChoices::Certificate(certificate))
.expect("error adding certificate")
.add_signer_info::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature>(
.add_signer_info::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature<_>>(
signer_info_builder_1,
&signer,
)
Expand All @@ -156,7 +156,7 @@ fn test_build_signed_data() {
&signer_2,
)
.expect("error adding P256 signer info")
.add_signer_info_with_rng::<pss::SigningKey<Sha256>, pss::Signature, _>(
.add_signer_info_with_rng::<pss::SigningKey<Sha256>, pss::Signature<_>, _>(
signer_info_builder_3,
&signer_3,
&mut OsRng.unwrap_err(),
Expand Down Expand Up @@ -393,7 +393,7 @@ fn test_build_pkcs7_scep_pkcsreq() {
.unwrap()
.add_certificate(CertificateChoices::Certificate(certificate))
.unwrap()
.add_signer_info::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature>(
.add_signer_info::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature<_>>(
signer_info_builder,
&signer,
)
Expand Down Expand Up @@ -648,13 +648,13 @@ async fn async_builder() {
let signed_data_pkcs7 = builder
.add_digest_algorithm(digest_algorithm)
.expect("could not add a digest algorithm")
.add_signer_info_async::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature>(
.add_signer_info_async::<pkcs1v15::SigningKey<Sha256>, rsa::pkcs1v15::Signature<Sha256>>(
signer_info_builder_1,
&signer_1,
)
.await
.expect("error adding PKCS1v15 RSA signer info")
.add_signer_info_with_rng_async::<pss::SigningKey<Sha256>, pss::Signature, _>(
.add_signer_info_with_rng_async::<pss::SigningKey<Sha256>, pss::Signature<_>, _>(
signer_info_builder_3,
&signer_3,
&mut OsRng.unwrap_err(),
Expand Down
4 changes: 2 additions & 2 deletions x509-cert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ spki = { version = "0.8.0-rc.0", features = ["alloc"] }
arbitrary = { version = "1.4", features = ["derive"], optional = true }
digest = { version = "0.11.0-pre.10", optional = true, default-features = false }
sha1 = { version = "0.11.0-pre.5", default-features = false, optional = true }
signature = { version = "=2.3.0-pre.6", features = ["rand_core"], optional = true }
signature = { version = "=3.0.0-pre", features = ["rand_core"], optional = true }
tls_codec = { version = "0.4.0", default-features = false, features = ["derive"], optional = true }

[dev-dependencies]
hex-literal = "1"
rand = "0.9"
rsa = { version = "=0.10.0-pre.4", features = ["sha2"] }
ecdsa = { version = "=0.17.0-pre.9", features = ["digest", "pem"] }
p256 = "=0.14.0-pre.2"
p256 = { version = "=0.14.0-pre.2" }
rstest = "0.25"
sha2 = { version = "=0.11.0-pre.5", features = ["oid"] }
tempfile = "3.5.0"
Expand Down
2 changes: 1 addition & 1 deletion x509-cert/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn pss_certificate() {
.expect("Create certificate");

let certificate = builder
.build_with_rng::<_, rsa::pss::Signature, _>(&signer, &mut rand::rng())
.build_with_rng::<_, rsa::pss::Signature<_>, _>(&signer, &mut rand::rng())
.unwrap();

let pem = certificate.to_pem(LineEnding::LF).expect("generate pem");
Expand Down
2 changes: 1 addition & 1 deletion x509-ocsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ x509-cert = { version = "=0.3.0-pre.0", default-features = false }
# Optional
digest = { version = "=0.11.0-pre.10", optional = true, default-features = false, features = ["oid"] }
rand_core = { version = "0.9", optional = true, default-features = false }
signature = { version = "=2.3.0-pre.6", optional = true, default-features = false, features = ["digest", "rand_core"] }
signature = { version = "=3.0.0-pre", optional = true, default-features = false, features = ["digest", "rand_core"] }

[dev-dependencies]
hex-literal = "1"
Expand Down