Skip to content

Commit

Permalink
Bump X.509-based crates to prereleases versions
Browse files Browse the repository at this point in the history
For next release cycle, as was started in #1296. Due to circular
dependencies (on e.g. digital signature libraries) this wasn't possible
at that time, but is now that we've made prereleases of all of the
requisite dependencies.

This bumps the following crates to prerelease versions (not intended for
release, just to signal we're making breaking changes):

- `cmpv2` v0.3.0-pre
- `cms` v0.3.0-pre
- `crmf` v0.3.0-pre
- `gss-api` v0.2.0-pre
- `pkcs12` v0.2.0-pre
- `x509-cert` v0.3.0-pre
- `x509-ocsp` v0.3.0-pre
- `x509-tsp` v0.2.0-pre

See also: #1289
  • Loading branch information
tarcieri committed Jan 19, 2024
1 parent 69384ad commit 47e611b
Show file tree
Hide file tree
Showing 12 changed files with 263 additions and 324 deletions.
436 changes: 188 additions & 248 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions cmpv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cmpv2"
version = "0.2.0"
version = "0.3.0-pre"
description = """
Pure Rust implementation of the Certificate Management Protocol (CMP) as
described in RFC 4210
Expand All @@ -15,13 +15,13 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
crmf = "0.2"
der = { version = "0.7", features = ["alloc", "derive", "flagset", "oid"] }
spki = { version = "0.7" }
x509-cert = { version = "0.2", default-features = false }
crmf = "=0.3.0-pre"
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "flagset", "oid"] }
spki = { version = "=0.8.0-pre.0" }
x509-cert = { version = "=0.3.0-pre", default-features = false }

[dev-dependencies]
const-oid = { version = "0.9", features = ["db"] }
const-oid = { version = "=0.10.0-pre.2", features = ["db"] }
hex-literal = "0.4"

[features]
Expand Down
30 changes: 15 additions & 15 deletions cms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cms"
version = "0.2.3"
version = "0.3.0-pre"
description = """
Pure Rust implementation of the Cryptographic Message Syntax (CMS) as described in RFC 5652 and RFC 3274.
"""
Expand All @@ -14,31 +14,31 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
der = { version = "0.7.7", features = ["alloc", "derive", "oid", "pem"] }
spki = { version = "0.7" }
x509-cert = { version = "0.2.3", default-features = false, features = ["pem"] }
const-oid = { version = "0.9.4", features = ["db"] }
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "oid", "pem"] }
spki = { version = "=0.8.0-pre.0" }
x509-cert = { version = "=0.3.0-pre", default-features = false, features = ["pem"] }
const-oid = { version = "=0.10.0-pre.2", features = ["db"] }

# optional dependencies
aes = { version = "0.8.2", optional = true }
cbc = { version = "0.1.2", optional = true }
cipher = { version = "0.4.4", features = ["alloc", "block-padding", "rand_core"], optional = true }
rsa = { version = "0.9.6", optional = true }
sha1 = { version = "0.10", optional = true }
sha2 = { version = "0.10", optional = true }
sha3 = { version = "0.10", optional = true }
signature = { version = "2.1.0", features = ["digest", "alloc"], optional = true }
rsa = { version = "=0.10.0-pre.0", optional = true }
sha1 = { version = "=0.11.0-pre.2", optional = true }
sha2 = { version = "=0.11.0-pre.2", optional = true }
sha3 = { version = "=0.11.0-pre.2", optional = true }
signature = { version = "=2.3.0-pre.2", features = ["digest", "alloc"], optional = true }
zeroize = { version = "1.6.0", optional = true }

[dev-dependencies]
getrandom = "0.2"
hex-literal = "0.4"
pem-rfc7468 = "0.7.0"
pkcs5 = "0.7"
pem-rfc7468 = "=1.0.0-pre.0"
pkcs5 = "=0.8.0-pre.0"
rand = "0.8.5"
rsa = { version = "0.9.6", features = ["sha2"] }
ecdsa = { version = "0.16.8", features = ["digest", "pem"] }
p256 = "0.13.0"
rsa = { version = "=0.10.0-pre.0", features = ["sha2"] }
ecdsa = { version = "=0.17.0-pre.4", features = ["digest", "pem"] }
p256 = "=0.14.0-pre.0"

[features]
alloc = ["der/alloc"]
Expand Down
4 changes: 2 additions & 2 deletions cms/tests/enveloped_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn reencode_enveloped_data_pwri_test() {
);
let enc_pbkdf2 = kdf_alg.parameters.as_ref().unwrap().to_der().unwrap();
let pbkdf2 = Pbkdf2Params::from_der(enc_pbkdf2.as_slice()).unwrap();
assert_eq!(hex!("7F EE A8 FD 56 8E 8F 07"), pbkdf2.salt);
assert_eq!(hex!("7F EE A8 FD 56 8E 8F 07"), pbkdf2.salt.as_ref());
assert_eq!(2048, pbkdf2.iteration_count);
assert_eq!(
ObjectIdentifier::new_unwrap("1.2.840.113549.1.9.16.3.9"),
Expand Down Expand Up @@ -431,7 +431,7 @@ fn reencode_enveloped_data_multi_test() {
);
let enc_pbkdf2 = kdf_alg.parameters.as_ref().unwrap().to_der().unwrap();
let pbkdf2 = Pbkdf2Params::from_der(enc_pbkdf2.as_slice()).unwrap();
assert_eq!(hex!("39 04 A7 33 A0 6A 1B 27"), pbkdf2.salt);
assert_eq!(hex!("39 04 A7 33 A0 6A 1B 27"), pbkdf2.salt.as_ref());
assert_eq!(2048, pbkdf2.iteration_count);
assert_eq!(
ObjectIdentifier::new_unwrap("1.2.840.113549.1.9.16.3.9"),
Expand Down
2 changes: 1 addition & 1 deletion cms/tests/tests_from_pkcs7_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn cms_decode_encrypted_key_example() {
.to_der()
.unwrap();
let pbkdf2 = Pbkdf2Params::from_der(enc_pbkdf2.as_slice()).unwrap();
assert_eq!(hex!("ad2d4b4e87b34d67"), pbkdf2.salt);
assert_eq!(hex!("ad2d4b4e87b34d67"), pbkdf2.salt.as_ref());
assert_eq!(2048, pbkdf2.iteration_count);
assert_eq!(
552u32,
Expand Down
12 changes: 6 additions & 6 deletions crmf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crmf"
version = "0.2.0"
version = "0.3.0-pre"
description = """
Pure Rust implementation of the Certificate Request Message Format (CRMF) as
described in RFC 4211
Expand All @@ -15,13 +15,13 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
cms = "0.2"
der = { version = "0.7", features = ["alloc", "derive"] }
spki = "0.7"
x509-cert = { version = "0.2", default-features = false }
cms = "=0.3.0-pre"
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive"] }
spki = "=0.8.0-pre.0"
x509-cert = { version = "=0.3.0-pre", default-features = false }

[dev-dependencies]
const-oid = "0.9"
const-oid = "=0.10.0-pre.2"

[features]
alloc = ["der/alloc"]
Expand Down
12 changes: 6 additions & 6 deletions gss-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gss-api"
version = "0.1.0"
version = "0.2.0-pre"
description = """
Pure Rust implementation for Generic Security Service Application Program
Interface (GSS-API)
Expand All @@ -15,14 +15,14 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
der = { version = "0.7", features = ["oid", "alloc"] }
spki = { version = "0.7" }
x509-cert = { version = "0.2", default-features = false }
der = { version = "=0.8.0-pre.0", features = ["oid", "alloc"] }
spki = { version = "=0.8.0-pre.0" }
x509-cert = { version = "=0.3.0-pre", default-features = false }

[dev-dependencies]
der = { version = "0.7", features = ["oid", "pem", "alloc"] }
der = { version = "=0.8.0-pre.0", features = ["oid", "pem", "alloc"] }
hex-literal = "0.4"
x509-cert = { version = "0.2", default-features = false, features = ["pem"] }
x509-cert = { version = "=0.3.0-pre", default-features = false, features = ["pem"] }

[features]
rfc2478 = []
Expand Down
25 changes: 12 additions & 13 deletions pkcs12/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pkcs12"
version = "0.1.0"
version = "0.2.0-pre"
description = """
Pure Rust implementation of Public-Key Cryptography Standards (PKCS) #12:
Personal Information Exchange Syntax v1.1 (RFC7292)
Expand All @@ -15,21 +15,20 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
der = { version = "0.7.8", features = ["alloc", "derive", "oid", "pem"] }
spki = { version = "0.7" }
x509-cert = { version = "0.2.3", default-features = false, features = ["pem"] }
const-oid = { version = "0.9", features = ["db"] }
cms = "0.2.1"
digest = { version = "0.10.7", features=["alloc"], optional = true }
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "oid", "pem"] }
spki = { version = "=0.8.0-pre.0" }
x509-cert = { version = "=0.3.0-pre", default-features = false, features = ["pem"] }
const-oid = { version = "=0.10.0-pre.2", features = ["db"] }
cms = "=0.3.0-pre"
digest = { version = "0.11.0-pre.7", features=["alloc"], optional = true }
zeroize = "1.6.0"

[dev-dependencies]
hex-literal = "0.3.3"
pkcs8 = { version = "0.10.2", features = ["pkcs5", "getrandom"] }
pkcs5 = {version = "0.7.1", features = ["pbes2", "3des"]}
subtle-encoding = "0.5.1"
sha2 = "0.10.8"
whirlpool = "0.10.4"
hex-literal = "0.4"
pkcs8 = { version = "=0.11.0-pre.0", features = ["pkcs5", "getrandom"] }
pkcs5 = {version = "=0.8.0-pre.0", features = ["pbes2", "3des"]}
sha2 = "=0.11.0-pre.2"
whirlpool = "=0.11.0-pre.2"

[features]
kdf = ["dep:digest"]
Expand Down
20 changes: 10 additions & 10 deletions x509-cert/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "x509-cert"
version = "0.2.5"
version = "0.3.0-pre"
description = """
Pure Rust implementation of the X.509 Public Key Infrastructure Certificate
format as described in RFC 5280
Expand All @@ -15,24 +15,24 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
const-oid = { version = "0.9.6", features = ["db"] }
der = { version = "0.7.6", features = ["alloc", "derive", "flagset", "oid"] }
spki = { version = "0.7.3", features = ["alloc"] }
const-oid = { version = "=0.10.0-pre.2", features = ["db"] }
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "flagset", "oid"] }
spki = { version = "=0.8.0-pre.0", features = ["alloc"] }

# optional dependencies
arbitrary = { version = "1.3", features = ["derive"], optional = true }
sha1 = { version = "0.10.6", optional = true }
signature = { version = "2.1.0", features = ["rand_core"], optional = true }
sha1 = { version = "0.11.0-pre.2", optional = true }
signature = { version = "=2.3.0-pre.2", features = ["rand_core"], optional = true }
tls_codec = { version = "0.4.0", default-features = false, features = ["derive"], optional = true }

[dev-dependencies]
hex-literal = "0.4"
rand = "0.8.5"
rsa = { version = "0.9.6", features = ["sha2"] }
ecdsa = { version = "0.16.8", features = ["digest", "pem"] }
p256 = "0.13.0"
rsa = { version = "=0.10.0-pre.0", features = ["sha2"] }
ecdsa = { version = "=0.17.0-pre.4", features = ["digest", "pem"] }
p256 = "=0.14.0-pre.0"
rstest = "0.18"
sha2 = { version = "0.10", features = ["oid"] }
sha2 = { version = "=0.11.0-pre.2", features = ["oid"] }
tempfile = "3.5.0"
x509-cert-test-support = { path = "./test-support" }

Expand Down
4 changes: 2 additions & 2 deletions x509-cert/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ where
cert_signer: &'s S,
) -> Result<Self> {
let verifying_key = cert_signer.verifying_key();
let signer_pub = SubjectPublicKeyInfoOwned::from_key(verifying_key)?;
let signer_pub = SubjectPublicKeyInfoOwned::from_key(&verifying_key)?;

let signature_alg = cert_signer.signature_algorithm_identifier()?;
let issuer = profile.get_issuer(&subject);
Expand Down Expand Up @@ -368,7 +368,7 @@ where
pub fn new(subject: Name, req_signer: &'s S) -> Result<Self> {
let version = Default::default();
let verifying_key = req_signer.verifying_key();
let public_key = SubjectPublicKeyInfoOwned::from_key(verifying_key)?;
let public_key = SubjectPublicKeyInfoOwned::from_key(&verifying_key)?;
let attributes = Default::default();
let extension_req = Default::default();

Expand Down
20 changes: 10 additions & 10 deletions x509-ocsp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "x509-ocsp"
version = "0.2.1"
version = "0.3.0-pre"
description = """
Pure Rust implementation of the X.509 Internet Public Key Infrastructure
Online Certificate Status Protocol - OCSP formats as described in RFC 6960
Expand All @@ -15,23 +15,23 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
const-oid = { version = "0.9.5", default-features = false, features = ["db"] }
der = { version = "0.7.8", features = ["alloc", "derive", "oid"] }
spki = { version = "0.7.2", features = ["alloc"] }
x509-cert = { version = "0.2.4", default-features = false }
const-oid = { version = "=0.10.0-pre.2", default-features = false, features = ["db"] }
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "oid"] }
spki = { version = "=0.8.0-pre.0", features = ["alloc"] }
x509-cert = { version = "=0.3.0-pre", default-features = false }

# Optional
digest = { version = "0.10.7", optional = true, default-features = false, features = ["oid"] }
digest = { version = "=0.11.0-pre.7", optional = true, default-features = false, features = ["oid"] }
rand_core = { version = "0.6.4", optional = true, default-features = false }
signature = { version = "2.1.0", optional = true, default-features = false, features = ["digest", "rand_core"] }
signature = { version = "=2.3.0-pre.2", optional = true, default-features = false, features = ["digest", "rand_core"] }

[dev-dependencies]
hex-literal = "0.4.1"
lazy_static = "1.4.0"
rand = "0.8.5"
rsa = { version = "0.9.2", default-features = false, features = ["sha2"] }
sha1 = { version = "0.10.6", default-features = false, features = ["oid"] }
sha2 = { version = "0.10.8", default-features = false, features = ["oid"] }
rsa = { version = "=0.10.0-pre.0", default-features = false, features = ["sha2"] }
sha1 = { version = "=0.11.0-pre.2", default-features = false, features = ["oid"] }
sha2 = { version = "=0.11.0-pre.2", default-features = false, features = ["oid"] }

[features]
rand = ["rand_core"]
Expand Down
10 changes: 5 additions & 5 deletions x509-tsp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "x509-tsp"
version = "0.1.0"
version = "0.2.0-pre"
edition = "2021"
description = """
Pure Rust implementation of the Timestamping Protocol as described in RFC 3161.
Expand All @@ -14,10 +14,10 @@ readme = "README.md"
rust-version = "1.65"

[dependencies]
der = { version = "0.7.6", features = ["alloc", "derive", "oid", "pem"] }
cms = { version = "0.2.1", features = ["alloc"] }
cmpv2 = { version = "0.2", features = ["alloc"] }
x509-cert = { version = "0.2.4", default-features = false }
der = { version = "=0.8.0-pre.0", features = ["alloc", "derive", "oid", "pem"] }
cms = { version = "=0.3.0-pre", features = ["alloc"] }
cmpv2 = { version = "=0.3.0-pre", features = ["alloc"] }
x509-cert = { version = "=0.3.0-pre", default-features = false }

[dev-dependencies]
hex-literal = "0.4.1"

0 comments on commit 47e611b

Please sign in to comment.