Support CKA_PUBLIC_KEY_INFO

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

Start with the three CKA_PUBLIC_KEY_INFO TODO comments, including the one in src/lib/P11Objects.cpp, and the i2d_PUBKEY comment in src/lib/crypto/OSSLEDPublicKey.cpp. Read how public key attributes are currently retrieved and identify the existing tests for C_GetAttributeValue. Implementing the DER encoded SubjectPublicKeyInfo value is done when the attribute returns the expected encoding for each supported public key type.

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

説明

PKCS11 C_GetAttributeValue for CKA_PUBLIC_KEY_INFO returns with zero length.
This comment appears 3 times in the code: "// TODO: CKA_PUBLIC_KEY_INFO is accepted, but we do not calculate it."
one is here.

The comment: "// i2d_PUBKEY incorrectly does not const the key argument?!" appears here.

https://docs.openssl.org/3.0/man3/X509_PUBKEY_new/ says: "i2d_PUBKEY() encodes an EVP_PKEY structure using SubjectPublicKeyInfo". PKCS11 says: "The value of the CKA_PUBLIC_KEY_INFO attribute is the DER encoded value of SubjectPublicKeyInfo".

https://docs.openssl.org/3.0/man3/X509_PUBKEY_new/#description says: "i2d_PUBKEY() encodes an EVP_PKEY structure using SubjectPublicKeyInfo format."

This should be easy to implement, for a C++ programmer, and it would work on any type of pubkey.

The problems shows up in mods to OpenSC https://github.com/OpenSC/OpenSC/pull/3090 calling the softhsm2 pkcs11 module.

主要言語
C++
スター
1.1k
フォーク
434
平均マージ
12日 14時間
マージ済み PR(30日)
2

環境構築

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

はじめの一歩

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

softhsm/SoftHSMv2 のほかの issue

softhsm/SoftHSMv2 の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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