Skip to content

Commit 6b58136

Browse files
committed
librustls: add RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_SIGNATURE_ALGORITHM
This adds a new `rustls_result` for the new upstream `CertRevocationListError::UnsupportedSignatureAlgorithm` error variant.
1 parent a8b60d3 commit 6b58136

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

librustls/src/error.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ u32_enum_builder! {
199199
CertRevocationListUnsupportedDeltaCrl => 7408,
200200
CertRevocationListUnsupportedIndirectCrl => 7409,
201201
CertRevocationListUnsupportedRevocationReason => 7410,
202+
CertRevocationListUnsupportedSignatureAlgorithm => 7411,
202203

203204
// From ClientCertVerifierBuilderError, with fields that get flattened.
204205
ClientCertVerifierBuilderNoRootAnchors => 7500,
@@ -491,6 +492,9 @@ impl Display for rustls_result {
491492
CertRevocationListBadSignature => {
492493
Error::InvalidCertRevocationList(CertRevocationListError::BadSignature).fmt(f)
493494
}
495+
CertRevocationListUnsupportedSignatureAlgorithm => {
496+
Error::InvalidCertRevocationList(CertRevocationListError::UnsupportedSignatureAlgorithm).fmt(f)
497+
}
494498
CertRevocationListInvalidCrlNumber => {
495499
Error::InvalidCertRevocationList(CertRevocationListError::InvalidCrlNumber).fmt(f)
496500
}
@@ -679,6 +683,7 @@ fn map_crl_error(err: CertRevocationListError) -> rustls_result {
679683

680684
match err {
681685
CertRevocationListError::BadSignature => CertRevocationListBadSignature,
686+
CertRevocationListError::UnsupportedSignatureAlgorithm => CertRevocationListUnsupportedSignatureAlgorithm,
682687
CertRevocationListError::InvalidCrlNumber => CertRevocationListInvalidCrlNumber,
683688
CertRevocationListError::InvalidRevokedCertSerialNumber => {
684689
CertRevocationListInvalidRevokedCertSerialNumber

librustls/src/rustls.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ enum rustls_result {
164164
RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_DELTA_CRL = 7408,
165165
RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_INDIRECT_CRL = 7409,
166166
RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_REVOCATION_REASON = 7410,
167+
RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_SIGNATURE_ALGORITHM = 7411,
167168
RUSTLS_RESULT_CLIENT_CERT_VERIFIER_BUILDER_NO_ROOT_ANCHORS = 7500,
168169
RUSTLS_RESULT_INCONSISTENT_KEYS_KEYS_MISMATCH = 7600,
169170
RUSTLS_RESULT_INCONSISTENT_KEYS_UNKNOWN = 7601,

0 commit comments

Comments
 (0)