Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

"unknown algorithm" error

オープン
#334 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
cryptography

調査の方向性

Algorithm enum と PrivateKey::random エントリポイントから始め、Cargo.toml と main.rs の例を使ってランタイムエラーを再現します。アルゴリズムの機能がどのように定義され、条件付きで有効化されているかを追跡し、利用できないアルゴリズムがコンパイルできないか、または現在の "unknown algorithm" ランタイムエラーが発生する前に別の方法で拒否されることを確認します。

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

説明

Using ssh-key to create a new PrivateKey using an algorithm which doesn't have the correct crate feature enabled results in a runtime error (unknown algorithm).

The following code compiles fine but panics with an error at runtime.

# Cargo.toml
[dependencies]
ssh-key = "0.6"
// main.rs
use ssh_key::rand_core::OsRng;
use ssh_key::{Algorithm, PrivateKey};

fn main() {
    let private_key = PrivateKey::random(&mut OsRng, Algorithm::Ed25519).unwrap();
    dbg!(&private_key);
}

This is not very rusty. It would be much less surprising if the enum variant Ed25519 of the Algorithm enum would also be guarded by the feature that enables the algorithm.

主要言語
Rust
スター
247
フォーク
64
平均マージ
4日 7時間
マージ済み PR(30日)
4

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

RustCrypto/SSH のほかの issue

RustCrypto/SSH の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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