"unknown algorithm" error
维护者通常 8 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 小时
- 30 天内合并 PR
- 4
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustCrypto/SSH 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
RustCrypto/SSH#580 · 3 条评论 ·
维护者通常 8 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
RustCrypto/SSH#527 · 4 条评论 ·
维护者通常 8 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
RustCrypto/SSH#475 · 7 条评论 · 1 个 reaction ·
维护者通常 8 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
RustCrypto/SSH#349 · 2 个 reaction ·
维护者通常 8 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
RustCrypto/SSH#313 · 1 条评论 ·
维护者通常 8 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
trailofbits/dylint#2107 ·
维护者通常 1 天内回复
-
area:cli bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
arrays_zip with two same-named inputs fails with "ArrowArray struct has 2 children (expected 1)"未关闭bug requires-triage
难度 2/5 1-3 小时 新手友好度 78/100
apache/datafusion-comet#6251 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug false-positive harper-core linting
难度 2/5 1-3 小时 新手友好度 68/100
Automattic/harper#4471 ·
维护者通常 1 天内回复