Skip to content

Commit 0d65909

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 5e825a6 commit 0d65909

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

librustls/src/error.rs

Lines changed: 8 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,10 @@ impl Display for rustls_result {
491492
CertRevocationListBadSignature => {
492493
Error::InvalidCertRevocationList(CertRevocationListError::BadSignature).fmt(f)
493494
}
495+
CertRevocationListUnsupportedSignatureAlgorithm => Error::InvalidCertRevocationList(
496+
CertRevocationListError::UnsupportedSignatureAlgorithm,
497+
)
498+
.fmt(f),
494499
CertRevocationListInvalidCrlNumber => {
495500
Error::InvalidCertRevocationList(CertRevocationListError::InvalidCrlNumber).fmt(f)
496501
}
@@ -679,6 +684,9 @@ fn map_crl_error(err: CertRevocationListError) -> rustls_result {
679684

680685
match err {
681686
CertRevocationListError::BadSignature => CertRevocationListBadSignature,
687+
CertRevocationListError::UnsupportedSignatureAlgorithm => {
688+
CertRevocationListUnsupportedSignatureAlgorithm
689+
}
682690
CertRevocationListError::InvalidCrlNumber => CertRevocationListInvalidCrlNumber,
683691
CertRevocationListError::InvalidRevokedCertSerialNumber => {
684692
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)