Allow load_cert_chain to load cert from token
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
I wanted to implement security token support for ansible but when I digged I saw the missing feature was in python stdlib https://github.com/ansible/ansible/blob/2bb09bfd12e42e7be6f39ab0e45a992512c240f9/lib/ansible/module_utils/urls.py#L505
I can use curl with -E 'pkcs11:model=... it recognize it is not a local file and still can access to pointed file. I configured my openssl to load pkcs11 engine. https://docs.digicert.com/en/software-trust-manager/sign-with-digicert-signing-tools/third-party-signing-tool-integrations/configure-openssl-for-signing-with-pkcs11.html
I can assist anyone wanting help to setup and see the bug.
It seems this code is helpful:
https://github.com/curl/curl/blob/master/lib/vtls/openssl.c#L1339-L1398
I think the error is here:
https://github.com/python/cpython/blob/a9c304cf020e2fa3ae78fd88359dfc808c9dd639/Modules/_ssl.c#L3892-L3898
this function only load file. I can't find it definition in github code search
I understand pkcs11 token might not be widely available and I am willing to contribute. Have you any pointer ? Does python use openssl or I have to resort to dynamic loading like this gist https://gist.github.com/klali/3a20c28c0fc78c924756bfb94b498f1c ?
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Modules/_ssl.c の load_cert_chain 実装、特に参照されている行のファイル読み込みコードを読み、想定されるトークンの動作を確認するために curl の OpenSSL パスと Ansible の呼び出し側を比較します。PKCS#11 ロケーションに必要なサポート対象 API と OpenSSL 統合を特定します。トークンから証明書を読み込むための合意済みの設計とカバレッジがあれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cryptography, security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100