x509-cert: v1 CRLs fail to decode (`TBSCertList.version` is OPTIONAL)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
从 x509-cert 的 CRL 模块中的 TbsCertList 入手,并将其版本字段与 TbsCertificate 中默认的版本进行比较;issue 指出,#2445 中先前的修复仍然适用。使用提供的 DER 复现数据,为缺少可选版本的 v1 CRL 添加往返测试。完成标准是 CRL 成功解码,且测试确认其 v1 表示形式。
由索引模型根据 Issue 内容生成。
描述
RFC 5280 §5.1 makes TBSCertList.version OPTIONAL (absent means v1), and the doc
comment on TbsCertList quotes that, but the field is a required Version. So every
v1 CRL fails:
use der::Decode;
use x509_cert::crl::CertificateList;
// v1 CRL: TBSCertList { sha256WithRSAEncryption, CN=test, thisUpdate 260101000000Z }
let crl = hex_literal::hex!(
"3044" "302f" "300d06092a864886f70d01010b0500"
"300f310d300b06035504030c0474657374" "170d3236303130313030303030305a"
"300d06092a864886f70d01010b0500" "03020000");
CertificateList::<x509_cert::certificate::Rfc5280>::from_der(&crl).unwrap();
// Err: unexpected ASN.1 DER tag: expected INTEGER, got SEQUENCE
I hit this on real CRLs (two Certipost qualified-CA CRLs and several in the EU DSS
test data); OpenSSL reads them as "Version 1".
#2445 had the fix (#[asn1(default = "Default::default")], as TbsCertificate
already does for its version, with a round-trip test) but was closed without review.
Its diff still applies to master 715d277d and makes the CRL above decode. Could it be
reopened?
Versions: x509-cert 0.3.0 and master 715d277d.
Found and analyzed with AI assistance; the reproducers and results above were run on the versions stated.
- 主要语言
- Rust
- 星标
- 347
- 派生
- 200
- 平均合并
- 15 小时 53 分钟
- 30 天内合并 PR
- 34
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustCrypto/formats 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
RustCrypto/formats#2543 ·
维护者通常 1 天内回复
-
cms: CHOICE types in `SET OF` are ordered as `SEQUENCE OF INTEGER`, not by their bytes可能已有人在做 @brother-z 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
RustCrypto/formats#2538 · 1 条评论 ·
维护者通常 1 天内回复
-
pem-rfc7468: a lone CR before -----BEGIN is refused as Error::Preamble, so a CR-terminated multi-certificate PEM fails load_pem_chain (RFC 7468 eol = CRLF / CR / LF)可能已有人在做 @choksi2212 于 25 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
RustCrypto/formats#2486 · 1 条评论 ·
维护者通常 1 天内回复
-
IssuingDistributionPoint has the wrong AssociatedOid (id-pe-subjectInfoAccess)可能已有人在做 @eyusd 于 103 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 86/100
RustCrypto/formats#2389 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
RustCrypto/formats#2366 ·
维护者通常 1 天内回复
查看 RustCrypto/formats 的全部 Issue
相似的 Issue
-
priority middle
难度 1/5 1 小时以内 新手友好度 72/100
KATO-Hiro/AtCoderClans#13029 ·
维护者通常 1 天内回复
-
bug ui
难度 2/5 1-3 小时 新手友好度 84/100
userFRM/egui-charts#3363 ·
维护者通常 1 天内回复
-
ada documentation mobile report
难度 1/5 1 小时以内 新手友好度 86/100
physicsdolphin/nv-uefi-unlocker#254 · 2 个 reaction ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
kindraywind/rustnarok-client#1382 ·
维护者通常 1 天内回复
-
area:accessibility bug good first issue help wanted priority:p3-low size:small
难度 2/5 1-3 小时 新手友好度 78/100
NecturaLabs/Canopy#209 ·