Skip to content

Commit

Permalink
use tls_codec version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Nov 22, 2023
1 parent 993ca90 commit 41eae91
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
31 changes: 26 additions & 5 deletions Cargo.lock

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

7 changes: 3 additions & 4 deletions x509-cert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ 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 }
# TODO: Use next version of tls_codec when a verion containing the following PR is published:
# https://github.com/RustCrypto/formats/pull/1132
# https://github.com/RustCrypto/formats/pull/1133
tls_codec = { path = "../tls_codec", default-features = false, features = ["derive"], optional = true }
tls_codec = { version = "0.4.0", default-features = false, features = [
"derive",
], optional = true }

[dev-dependencies]
hex-literal = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion x509-cert/src/ext/pkix/sct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl SignedCertificateTimestampList {
/// deserialized or if there are trailing bytes after all [SerializedSct]s
/// are deserialized.
pub fn parse_timestamps(&self) -> Result<Vec<SerializedSct>, Error> {
let (tls_vec, rest) = TlsByteVecU16::tls_deserialize(self.0.as_bytes())?;
let (tls_vec, rest) = TlsByteVecU16::tls_deserialize_bytes(self.0.as_bytes())?;
if !rest.is_empty() {
return Err(tls_codec::Error::TrailingData)?;
}
Expand Down

0 comments on commit 41eae91

Please sign in to comment.