Skip to content

Commit c29ca3d

Browse files
authored
spki v0.7.0 (#900)
1 parent 510b74a commit c29ca3d

File tree

13 files changed

+33
-17
lines changed

13 files changed

+33
-17
lines changed

.github/workflows/spki.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
toolchain: ${{ matrix.rust }}
3939
targets: ${{ matrix.target }}
4040
- uses: RustCrypto/actions/cargo-hack-install@master
41-
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features std,arbitrary
41+
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features arbitrary,std
4242

4343
# FIXME: Temporary disabled until https://github.com/rust-fuzz/arbitrary/issues/134 is fixed
4444
# minimal-versions:

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crmf/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.65"
1717
[dependencies]
1818
cms = { version = "0.0.0", path = "../cms"}
1919
der = { version = "0.7", features = ["alloc", "derive"], path = "../der" }
20-
spki = { version = "=0.7.0-pre", path = "../spki" }
20+
spki = { version = "0.7", path = "../spki" }
2121
x509-cert = { version = "=0.2.0-pre", default-features = false, path = "../x509-cert" }
2222

2323
[dev-dependencies]

pkcs1/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.60"
1616

1717
[dependencies]
1818
der = { version = "0.7", features = ["oid"], path = "../der" }
19-
spki = { version = "=0.7.0-pre", path = "../spki" }
19+
spki = { version = "0.7", path = "../spki" }
2020

2121
# optional dependencies
2222
pkcs8 = { version = "=0.10.0-pre", optional = true, default-features = false, path = "../pkcs8" }

pkcs5/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.65"
1616

1717
[dependencies]
1818
der = { version = "0.7", features = ["oid"], path = "../der" }
19-
spki = { version = "=0.7.0-pre", path = "../spki" }
19+
spki = { version = "0.7", path = "../spki" }
2020

2121
# optional dependencies
2222
cbc = { version = "0.1.2", optional = true }

pkcs7/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.65"
1616

1717
[dependencies]
1818
der = { version = "0.7", features = ["oid"], path = "../der" }
19-
spki = { version = "=0.7.0-pre", path = "../spki" }
19+
spki = { version = "0.7", path = "../spki" }
2020
x509-cert = { version = "=0.2.0-pre", default-features = false, path = "../x509-cert" }
2121

2222
[dev-dependencies]

pkcs8/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.65"
1717

1818
[dependencies]
1919
der = { version = "0.7", features = ["oid"], path = "../der" }
20-
spki = { version = "=0.7.0-pre", path = "../spki" }
20+
spki = { version = "0.7", path = "../spki" }
2121

2222
# optional dependencies
2323
rand_core = { version = "0.6", optional = true, default-features = false }

spki/CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 0.7.0 (2023-02-26)
8+
### Changed
9+
- Make `AlgorithmIdentifier` generic around `Params` ([#769])
10+
- Use blanket impls for `Decode*` traits ([#785])
11+
- Make `SubjectPublicKeyInfo` own the public key ([#790])
12+
- Rename `to_owned` method ([#835])
13+
- Bump `der` dependency to v0.7 ([#899])
14+
15+
[#769]: https://github.com/RustCrypto/formats/pull/769
16+
[#785]: https://github.com/RustCrypto/formats/pull/785
17+
[#790]: https://github.com/RustCrypto/formats/pull/790
18+
[#835]: https://github.com/RustCrypto/formats/pull/835
19+
[#899]: https://github.com/RustCrypto/formats/pull/899
20+
721
## 0.6.0 (2022-05-08)
822
### Added
923
- `AlgorithmIdentifier::oids()` helper function ([#443])

spki/Cargo.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spki"
3-
version = "0.7.0-pre"
3+
version = "0.7.0"
44
description = """
55
X.509 Subject Public Key Info (RFC5280) describing public keys as well as their
66
associated AlgorithmIdentifiers (i.e. OIDs)
@@ -18,8 +18,8 @@ rust-version = "1.65"
1818
der = { version = "0.7", features = ["oid"], path = "../der" }
1919

2020
# Optional dependencies
21-
arbitrary = { version = "1.2.3", features = ["derive"], optional = true }
22-
base64ct = { version = "1", path = "../base64ct", optional = true, default-features = false }
21+
arbitrary = { version = "1.2", features = ["derive"], optional = true }
22+
base64ct = { version = "1", optional = true, default-features = false, path = "../base64ct" }
2323
sha2 = { version = "0.10", optional = true, default-features = false }
2424

2525
[dev-dependencies]
@@ -28,10 +28,12 @@ tempfile = "3"
2828

2929
[features]
3030
alloc = ["base64ct?/alloc", "der/alloc"]
31+
std = ["der/std", "alloc"]
32+
3133
arbitrary = ["std", "dep:arbitrary", "der/arbitrary"]
34+
base64 = ["dep:base64ct"]
3235
fingerprint = ["sha2"]
3336
pem = ["alloc", "der/pem"]
34-
std = ["der/std", "alloc"]
3537

3638
[package.metadata.docs.rs]
3739
all-features = true

spki/src/spki.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ where
6262
/// See [RFC7469 § 2.1.1] for more information.
6363
///
6464
/// [RFC7469 § 2.1.1]: https://datatracker.ietf.org/doc/html/rfc7469#section-2.1.1
65-
#[cfg(all(feature = "fingerprint", feature = "alloc", feature = "base64ct"))]
65+
#[cfg(all(feature = "fingerprint", feature = "alloc", feature = "base64"))]
6666
pub fn fingerprint_base64(&self) -> Result<alloc::string::String> {
6767
use base64ct::{Base64, Encoding};
6868
Ok(Base64::encode_string(&self.fingerprint_bytes()?))

spki/tests/spki.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const RSA_2048_PEM_EXAMPLE: &str = include_str!("examples/rsa2048-pub.pem");
3535
/// The SPKI fingerprint for `ED25519_SPKI_FINGERPRINT` as a Base64 string
3636
///
3737
/// Generated using `cat ed25519-pub.der | openssl dgst -binary -sha256 | base64`
38-
#[cfg(all(feature = "fingerprint", feature = "alloc", feature = "base64ct"))]
38+
#[cfg(all(feature = "alloc", feature = "base64", feature = "fingerprint"))]
3939
const ED25519_SPKI_FINGERPRINT_BASE64: &str = "Vd1MdLDkhTTi9OFzzs61DfjyenrCqomRzHrpFOAwvO0=";
4040

4141
/// The SPKI fingerprint for `ED25519_SPKI_FINGERPRINT` as straight hash bytes
@@ -84,7 +84,7 @@ fn decode_ed25519_and_fingerprint_spki() {
8484
}
8585

8686
#[test]
87-
#[cfg(all(feature = "fingerprint", feature = "alloc", feature = "base64ct"))]
87+
#[cfg(all(feature = "alloc", feature = "base64", feature = "fingerprint"))]
8888
fn decode_ed25519_and_fingerprint_base64() {
8989
// Repeat the decode test from the pkcs8 crate
9090
let spki = SubjectPublicKeyInfoRef::try_from(ED25519_DER_EXAMPLE).unwrap();

x509-cert/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ rust-version = "1.65"
1717
[dependencies]
1818
const-oid = { version = "0.9.2", features = ["db"] } # TODO: path = "../const-oid"
1919
der = { version = "0.7", features = ["derive", "alloc", "flagset", "oid"], path = "../der" }
20-
spki = { version = "=0.7.0-pre", path = "../spki", features = ["alloc"] }
20+
spki = { version = "0.7", path = "../spki", features = ["alloc"] }
2121

2222
# optional dependencies
23-
arbitrary = { version = "1.2.3", features = ["derive"], optional = true }
23+
arbitrary = { version = "1.2", features = ["derive"], optional = true }
2424

2525
[dev-dependencies]
2626
hex-literal = "0.3"

x509-ocsp/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rust-version = "1.65"
1616

1717
[dependencies]
1818
der = { version = "0.7", features = ["alloc", "derive", "oid"], path = "../der" }
19-
spki = { version = "=0.7.0-pre", path = "../spki" }
19+
spki = { version = "0.7", path = "../spki" }
2020
x509-cert = { version = "=0.2.0-pre", default-features = false, path = "../x509-cert" }
2121

2222
[dev-dependencies]

0 commit comments

Comments
 (0)