Skip to content
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

x509-cert: add Signed Certificate Timestamp (SCT) extension support #1134

Merged
merged 64 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0a33b68
add a few failing tests
imor Jun 21, 2023
75b498a
Fix a bug in TlsByteVecUX deserialization
imor Jul 2, 2023
598079c
impl SerializeBytes for TlsByteVecUX types
imor Jul 2, 2023
51297a8
remove println statments
imor Jul 2, 2023
10398c7
use fully qualified name for Serialize trait
imor Jul 2, 2023
14ce591
Revert "use fully qualified name for Serialize trait"
imor Jul 2, 2023
0c23e29
do not use Serialize trait in impl of SerializeBytes
imor Jul 2, 2023
f80288b
support no_std for tls_codec_derive
imor Jul 2, 2023
1c70c7c
remove std feature from derive feature
imor Jul 2, 2023
2bc61c6
SCT feature WIP
imor Jun 12, 2023
08ba77f
add more tests
imor Jun 12, 2023
d251518
add signature algo & tests
imor Jun 12, 2023
191b78f
add SignatureAndHashAlgorithm struct
imor Jun 12, 2023
fb3960e
WIP
imor Jun 13, 2023
a72b1be
add more test
imor Jun 13, 2023
e5d18b1
add another test
imor Jun 13, 2023
8cb976e
add DigitallySigned deserialize test
imor Jun 13, 2023
a2d39e6
add DigitallySigned serialization test
imor Jun 13, 2023
d8c3bbb
add version and its tests
imor Jun 14, 2023
95cd04b
add LogId and tests
imor Jun 14, 2023
40e8089
add SignedCertificateTimestamp
imor Jun 14, 2023
86f43e6
add SignedCertificateTimestamp tests
imor Jun 14, 2023
f392305
rename SctList to SignedCertificateTimestampList
imor Jun 14, 2023
a52c4f6
add SignedCertificateTimestampList as tests
imor Jun 14, 2023
9d4d95c
add SignedCertificateTimestampList serialization and tests
imor Jun 14, 2023
195f26e
remove duplicate code in tests
imor Jun 14, 2023
a4705e4
remove more duplicate code in tests
imor Jun 14, 2023
9b6919f
convert some asserts into assert_eq
imor Jun 14, 2023
0f6e73d
Fix clippy warning
imor Jun 14, 2023
5f7a6e4
made some fields public
imor Jun 15, 2023
648683d
make more items pub
imor Jun 16, 2023
8883433
Remove old TODOs
imor Jun 16, 2023
f2d4d24
document sct items
imor Jun 17, 2023
ef2e51b
make sct module public
imor Jun 17, 2023
b4dc05c
Use SerializeBytes
imor Jul 2, 2023
ec31dae
revert changes in Cargo.{lock, toml}
imor Jul 2, 2023
f777a40
Fix trailing whitespace
imor Jul 2, 2023
b3b4696
Correct default features
imor Jul 2, 2023
15050dd
disable default features for tls_codec
imor Jul 2, 2023
ec13c3b
Merge branch 'fix_tls_byte_vec_deserialization' into sct
imor Jul 3, 2023
1614bf6
Merge branch 'impl_serialize_bytes_for_vecs' into sct
imor Jul 3, 2023
e817987
Merge branch 'tls_codec_derive_no_std' into sct
imor Jul 3, 2023
92e9a69
remove unnecessary TODOs
imor Jul 3, 2023
5bea0d9
remove duplicate code
imor Jul 4, 2023
a8cd76e
rename meta-variable
imor Jul 4, 2023
640fa2a
fix tests
imor Jul 4, 2023
d602da3
test all features for tls_codec_derive
imor Jul 4, 2023
c5b2e61
Revert "fix tests"
imor Jul 4, 2023
da63de8
run encode/decode tests only when std feature is enabled
imor Jul 4, 2023
a0e0de3
add DeserializeBytes tests
imor Jul 4, 2023
710378c
add one more tuple_struct test
imor Jul 4, 2023
5217fdc
add another test
imor Jul 4, 2023
2f7b38b
add proper DeserializeBytes tests
imor Jul 4, 2023
4f4a785
Merge branch 'impl_serialize_bytes_for_vecs' into sct
imor Jul 4, 2023
57385d7
Merge branch 'tls_codec_derive_no_std' into sct
imor Jul 4, 2023
29e154c
Merge branch 'master' into sct
imor Aug 20, 2023
993ca90
update Cargo.lock
imor Aug 20, 2023
41eae91
use tls_codec version 0.4.0
imor Nov 22, 2023
d4f9af8
use tls_deserialize_bytes instead of tls_deserialize
imor Nov 22, 2023
7dcceec
fix clippy errors
imor Nov 22, 2023
5a79efe
fix cargo doc error
imor Nov 22, 2023
e3aa60f
Update x509-cert/src/ext/pkix/sct.rs
imor Dec 19, 2023
cdb6a9d
Update x509-cert/Cargo.toml
tarcieri Dec 19, 2023
f829498
Update x509-cert/src/ext/pkix/sct.rs
tarcieri Dec 19, 2023
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
30 changes: 26 additions & 4 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion x509-cert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spki = { version = "0.7.2", features = ["alloc"] }
arbitrary = { version = "1.3", features = ["derive"], optional = true }
sha1 = { version = "0.10.0", optional = true }
signature = { version = "2.1.0", features = ["rand_core"], optional = true }
tls_codec = { version = "0.4.0", default-features = false, features = ["derive"], optional = true }

[dev-dependencies]
hex-literal = "0.4"
Expand All @@ -37,12 +38,13 @@ x509-cert-test-support = { path = "./test-support" }

[features]
default = ["pem", "std"]
std = ["const-oid/std", "der/std", "spki/std"]
std = ["const-oid/std", "der/std", "spki/std", "tls_codec?/std"]

arbitrary = ["dep:arbitrary", "std", "der/arbitrary", "spki/arbitrary"]
builder = ["std", "sha1/default", "signature"]
hazmat = []
pem = ["der/pem", "spki/pem"]
sct = ["dep:tls_codec"]

[package.metadata.docs.rs]
all-features = true
Expand Down
8 changes: 8 additions & 0 deletions x509-cert/src/ext/pkix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ mod access;
mod authkeyid;
mod keyusage;
mod policymap;
#[cfg(feature = "sct")]
pub mod sct;

use crate::attr::AttributeTypeAndValue;

Expand All @@ -24,6 +26,12 @@ pub use crl::{
pub use keyusage::{ExtendedKeyUsage, KeyUsage, KeyUsages, PrivateKeyUsagePeriod};
pub use policymap::{PolicyMapping, PolicyMappings};

#[cfg(feature = "sct")]
pub use sct::{
Error, HashAlgorithm, SerializedSct, SignatureAlgorithm, SignatureAndHashAlgorithm,
SignedCertificateTimestamp, SignedCertificateTimestampList, Version,
};

pub use const_oid::db::rfc5280::{
ID_CE_INHIBIT_ANY_POLICY, ID_CE_ISSUER_ALT_NAME, ID_CE_SUBJECT_ALT_NAME,
ID_CE_SUBJECT_DIRECTORY_ATTRIBUTES, ID_CE_SUBJECT_KEY_IDENTIFIER,
Expand Down
Loading