Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

access to raw public key, or keyid

未关闭
#163 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
c, ruby
领域
cryptography

调研方向

检查 OpenSSL::PKey::EC#to_text、#to_der 以及 issue 中描述的 OpenSSL::ASN1.decode 方法,然后检查 openssl/crypto/x509v3/v3_skey.c 中现有的密钥标识符计算。确定 Ruby 或 C API 是否应公开编码后的公钥或 keyid,并确认结果符合 RFC 5280 第 4.2.1.2 节,且不将文本转换回二进制。

由索引模型根据 Issue 内容生成。

描述

RFC5280, section 4.2.1.2 defines keyid as the SHA1 of the subjectPublicKey encoding.

OpenSSL::PKey::EC's to_text 

reveals the public key info via an OpenSSL method that produces text. This is the input that we need for the SHA1, and I guess I could decode the text back to binary if I had to, but this seems really wrong....
While there is some code in openssl/crypto/x509v3/v3_skey.c that calculates what I want, it's buried inside an extension definition, and can't (AFAIK) be used directly.

I can get what I want via:
a1 = OpenSSL::ASN1.decode(pubkey.to_der)
a1.value[1].value

but that just seems wrong. Is there another way to pull the encoded public key out?
Should getting this keyid be ruby or C code?

主要语言
C
星标
276
派生
200
平均合并
15 小时 27 分钟
30 天内合并 PR
7

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/openssl 的其他 Issue

查看 ruby/openssl 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。