cms: `OtherRevocationInfoFormat.other_format` should be an OBJECT IDENTIFIER

オープン 初心者向け
#2,543 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cryptography

調査の方向性

まず、cms crate 内の OtherRevocationInfoFormat の定義とデコードテストを読みます。issue には変更する公開フィールドが示されており、RevocationInfoChoice::Other の DER 再現例が含まれています。再現例が報告された予期しないタグで失敗することを確認し、その後フィールドの型を ObjectIdentifier に変更して、例が正常にデコードされることを確認します。

索引モデルが issue の本文から書いたものです。

説明

OtherRevocationInfoFormat declares other_format: AlgorithmIdentifierOwned, but
RFC 5652 §10.2.1 defines it as

OtherRevocationInfoFormat ::= SEQUENCE {
  otherRevInfoFormat  OTHER-REVOK-INFO.&id({SupportedOtherRevokInfo}),
  otherRevInfo        OTHER-REVOK-INFO.&Type({SupportedOtherRevokInfo}{@otherRevInfoFormat}) }

i.e. an OBJECT IDENTIFIER followed by the value, as RFC 5940 §3 uses it for
id-ri-ocsp-response and id-ri-scvp. So a RevocationInfoChoice::Other holding an
OCSP response does not decode:

use cms::revocation::RevocationInfoChoice;
use der::Decode;
// [1] { id-ri-ocsp-response, OCSPResponse { responseStatus tryLater } }
let der = hex_literal::hex!("a10f" "06082b06010505071002" "3003" "0a0103");
RevocationInfoChoice::from_der(&der).unwrap();
// Err: TagUnexpected { expected: SEQUENCE, actual: OBJECT IDENTIFIER }

Versions: cms 0.3.0-rc.2 and master 715d277d. Since this changes a public field's
type, it would be good to fix before 0.3.0 (#2430). The fix is to make other_format an ObjectIdentifier.


Found and analyzed with AI assistance; the reproducers and results above were run on the versions stated.

主要言語
Rust
スター
347
フォーク
200
平均マージ
15時間 53分
マージ済み PR(30日)
34

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RustCrypto/formats のほかの issue

RustCrypto/formats の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。