サンプル
Deserializing an unencrypted SSH private key with load_ssh_private_key raises TypeError when given an unnecessary password byte string rather than silently ignoring it
sha256:64a29ca11a10fc937a1d77d108e7d5598927a5b46f7053af3372887d4e17f34d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Deserializing an unencrypted SSH private key with load_ssh_private_key raises TypeError when given an unnecessary password byte string rather than silently ignoring it HOW
- パッケージ
- cryptography 47.0.0
- 環境
- python
- 作成日
- 2026-08-17T02:11:35Z
よくある思い込み
Passing a non-None password parameter when deserializing an unencrypted SSH private key is silently ignored by load_ssh_private_key.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- load_ssh_private_key raises TypeError when a password byte string is passed for an unencrypted SSH private key rather than silently ignoring the unneeded password.
- assert 'not encrypted' in str(err).lower()
- assert loaded_key.public_key().public_bytes(Encoding.OpenSSH, PublicFormat.OpenSSH) == private_key.public_key().public_bytes(Encoding.OpenSSH, PublicFormat.OpenSSH)
ファイル
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9