Title: Cover the password prompt case for `SSLContext.load_cert_chain` with a test · Issue #132102 · python/cpython · GitHub
Open Graph Title: Cover the password prompt case for `SSLContext.load_cert_chain` with a test · Issue #132102 · python/cpython
X Title: Cover the password prompt case for `SSLContext.load_cert_chain` with a test · Issue #132102 · python/cpython
Description: @picnixz found a case that is not covered by the tests: when we specify a cert and a password-protected file, but no password. This behavior can be reproduced in the following way (password is somepass): >>> import ssl >>> context = ssl....
Open Graph Description: @picnixz found a case that is not covered by the tests: when we specify a cert and a password-protected file, but no password. This behavior can be reproduced in the following way (password is some...
X Description: @picnixz found a case that is not covered by the tests: when we specify a cert and a password-protected file, but no password. This behavior can be reproduced in the following way (password is some...
Opengraph URL: https://github.com/python/cpython/issues/132102
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cover the password prompt case for `SSLContext.load_cert_chain` with a test","articleBody":"@picnixz [found](https://github.com/python/cpython/pull/129607#discussion_r1997566645) a case that is not covered by the tests: when we specify a cert and a password-protected file, but no password. This behavior can be reproduced in the following way (password is `somepass`):\n```\n\u003e\u003e\u003e import ssl\n\u003e\u003e\u003e context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)\n\u003e\u003e\u003e context.load_cert_chain(certfile=\"./Lib/test/certdata/keycert.passwd.pem\")\nEnter PEM pass phrase:\n```\n[Documentation](https://docs.python.org/dev/library/ssl.html#ssl.SSLContext.load_cert_chain) says that in this case the password should be requested interactively\n\n\u003e If the password argument is not specified and a password is required, OpenSSL’s built-in password prompting mechanism will be used to interactively prompt the user for a password.\n\nWe have great tests (`./Lib/test/test_ssl`) for the `ssl` module but unfortunately this case has no tests, so I suggest to add it","author":{"url":"https://github.com/donbarbos","@type":"Person","name":"donbarbos"},"datePublished":"2025-04-04T23:30:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/132102/cpython/issues/132102"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d5a0acac-c086-2eb6-bf7f-1e48583614a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F06:1E4FEF:2AFF349:3801812:696B70AF |
| html-safe-nonce | 5e99cf2f4eff3c60d482d37b3c63126773d16410378900d63878489921ed8be5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjA2OjFFNEZFRjoyQUZGMzQ5OjM4MDE4MTI6Njk2QjcwQUYiLCJ2aXNpdG9yX2lkIjoiMTg5Nzk0MjMxNzU0NDQ2ODY1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 39075d1c5524d1a4b5de0443760474ee1663ad6f9e9688e3180d8151c176f3d4 |
| hovercard-subject-tag | issue:2973545100 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/132102/issue_layout |
| twitter:image | https://opengraph.githubassets.com/129dd719f02cd4672ee6ca402cda05ca886b1368d014cf79a7c0866855298024/python/cpython/issues/132102 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/129dd719f02cd4672ee6ca402cda05ca886b1368d014cf79a7c0866855298024/python/cpython/issues/132102 |
| og:image:alt | @picnixz found a case that is not covered by the tests: when we specify a cert and a password-protected file, but no password. This behavior can be reproduced in the following way (password is some... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | donbarbos |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width