Skip to content

Commit

Permalink
x509-cert: use SCT OIDs from const-oid (#1288)
Browse files Browse the repository at this point in the history
Also adds an entry for the `const-oid` v0.9.6 release to CHANGELOG.md
  • Loading branch information
robjtede authored Dec 26, 2023
1 parent 8e25224 commit badb50e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions const-oid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.9.6 (2023-12-15)
### Added
- RFC6962 (Certificate Transparency) OIDs ([#1134])

[#1134]: https://github.com/RustCrypto/formats/pull/1134

## 0.9.5 (2023-08-02)
### Added
- RFC8410 (curve25519) OIDs ([#867])
Expand Down
2 changes: 1 addition & 1 deletion x509-cert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ edition = "2021"
rust-version = "1.65"

[dependencies]
const-oid = { version = "0.9.3", features = ["db"] }
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"] }

Expand Down
6 changes: 1 addition & 5 deletions x509-cert/src/ext/pkix/sct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![cfg(feature = "sct")]

use alloc::{format, vec::Vec};
use const_oid::{AssociatedOid, ObjectIdentifier};
use const_oid::{db::rfc6962::CT_PRECERT_SCTS, AssociatedOid, ObjectIdentifier};
use der::asn1::OctetString;
use tls_codec::{
DeserializeBytes, SerializeBytes, TlsByteVecU16, TlsDeserializeBytes, TlsSerializeBytes,
Expand All @@ -23,10 +23,6 @@ use tls_codec::{
#[derive(Debug, PartialEq)]
pub struct SignedCertificateTimestampList(OctetString);

//TODO: Remove this and use const-oid's rfc6962::CT_PRECERT_SCTS once a const-oid version
// containing it is published
const CT_PRECERT_SCTS: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.4.1.11129.2.4.2");

impl AssociatedOid for SignedCertificateTimestampList {
const OID: ObjectIdentifier = CT_PRECERT_SCTS;
}
Expand Down

0 comments on commit badb50e

Please sign in to comment.