Skip to content

Commit 3f5b127

Browse files
committed
librustls: rustls 0.23.28 -> 0.23.29
Notably this update marked a couple error enum variants deprecated while introducing richer context variants. We don't have a nice way to expose additional error context at this time and so make the minimum required changes to avoid the deprecation warnings.
1 parent ef4e484 commit 3f5b127

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

librustls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ prefer-post-quantum = ["aws-lc-rs", "rustls/prefer-post-quantum"]
3030

3131
[dependencies]
3232
# Keep in sync with RUSTLS_CRATE_VERSION in build.rs
33-
rustls = { version = "0.23.28", default-features = false, features = ["std", "tls12"] }
33+
rustls = { version = "0.23.29", default-features = false, features = ["std", "tls12"] }
3434
webpki = { workspace = true }
3535
libc = { workspace = true }
3636
log = { workspace = true }

librustls/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{env, fs, path::PathBuf};
88
// because doing so would require a heavy-weight deserialization lib dependency
99
// (and it couldn't be a _dev_ dep for use in a build script) or doing brittle
1010
// by-hand parsing.
11-
const RUSTLS_CRATE_VERSION: &str = "0.23.28";
11+
const RUSTLS_CRATE_VERSION: &str = "0.23.29";
1212

1313
fn main() {
1414
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());

librustls/src/error.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl Display for rustls_result {
344344
CertUnknownIssuer => Error::InvalidCertificate(CertificateError::UnknownIssuer).fmt(f),
345345
CertBadSignature => Error::InvalidCertificate(CertificateError::BadSignature).fmt(f),
346346
CertUnsupportedSignatureAlgorithm => {
347-
Error::InvalidCertificate(CertificateError::UnsupportedSignatureAlgorithm).fmt(f)
347+
write!(f, "unsupported certificate signature algorithm")
348348
}
349349
CertNotValidForName => {
350350
Error::InvalidCertificate(CertificateError::NotValidForName).fmt(f)
@@ -492,10 +492,9 @@ impl Display for rustls_result {
492492
CertRevocationListBadSignature => {
493493
Error::InvalidCertRevocationList(CertRevocationListError::BadSignature).fmt(f)
494494
}
495-
CertRevocationListUnsupportedSignatureAlgorithm => Error::InvalidCertRevocationList(
496-
CertRevocationListError::UnsupportedSignatureAlgorithm,
497-
)
498-
.fmt(f),
495+
CertRevocationListUnsupportedSignatureAlgorithm => {
496+
write!(f, "unsupported CRL signature algorithm")
497+
}
499498
CertRevocationListInvalidCrlNumber => {
500499
Error::InvalidCertRevocationList(CertRevocationListError::InvalidCrlNumber).fmt(f)
501500
}
@@ -684,7 +683,7 @@ fn map_crl_error(err: CertRevocationListError) -> rustls_result {
684683

685684
match err {
686685
CertRevocationListError::BadSignature => CertRevocationListBadSignature,
687-
CertRevocationListError::UnsupportedSignatureAlgorithm => {
686+
CertRevocationListError::UnsupportedSignatureAlgorithmContext { .. } => {
688687
CertRevocationListUnsupportedSignatureAlgorithm
689688
}
690689
CertRevocationListError::InvalidCrlNumber => CertRevocationListInvalidCrlNumber,
@@ -752,7 +751,9 @@ fn map_invalid_certificate_error(err: CertificateError) -> rustls_result {
752751
CertificateError::ExpiredRevocationList
753752
| CertificateError::ExpiredRevocationListContext { .. } => CertExpiredRevocationList,
754753
CertificateError::BadSignature => CertBadSignature,
755-
CertificateError::UnsupportedSignatureAlgorithm => CertUnsupportedSignatureAlgorithm,
754+
CertificateError::UnsupportedSignatureAlgorithmContext { .. } => {
755+
CertUnsupportedSignatureAlgorithm
756+
}
756757
CertificateError::NotValidForName | CertificateError::NotValidForNameContext { .. } => {
757758
CertNotValidForName
758759
}

0 commit comments

Comments
 (0)