{"id":37611599,"url":"https://github.com/gesslerpd/pyopenssl-psk","last_synced_at":"2026-01-16T10:23:27.600Z","repository":{"id":62582255,"uuid":"220379223","full_name":"gesslerpd/pyopenssl-psk","owner":"gesslerpd","description":"Add PSK support to pyOpenSSL","archived":false,"fork":false,"pushed_at":"2025-02-07T01:18:10.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T13:43:03.397Z","etag":null,"topics":["psk","pyopenssl"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyopenssl-psk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gesslerpd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-08T03:28:22.000Z","updated_at":"2025-02-07T01:18:13.000Z","dependencies_parsed_at":"2025-02-07T02:29:51.591Z","dependency_job_id":null,"html_url":"https://github.com/gesslerpd/pyopenssl-psk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gesslerpd/pyopenssl-psk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fpyopenssl-psk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fpyopenssl-psk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fpyopenssl-psk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fpyopenssl-psk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gesslerpd","download_url":"https://codeload.github.com/gesslerpd/pyopenssl-psk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fpyopenssl-psk/sbom","scorecard":{"id":423975,"data":{"date":"2025-08-11","repo":{"name":"github.com/gesslerpd/pyopenssl-psk","commit":"895701d6d420d5d1ed2d341d81fa689fd00b4e63"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gesslerpd/pyopenssl-psk/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gesslerpd/pyopenssl-psk/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpublish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/gesslerpd/pyopenssl-psk/pythonpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpublish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/gesslerpd/pyopenssl-psk/pythonpublish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/pythonpublish.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/pythonpublish.yml:19","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pythonpackage.yml:1","Warn: no topLevel permission defined: .github/workflows/pythonpublish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:52:39.318Z","repository_id":62582255,"created_at":"2025-08-19T01:52:39.318Z","updated_at":"2025-08-19T01:52:39.318Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["psk","pyopenssl"],"created_at":"2026-01-16T10:23:27.525Z","updated_at":"2026-01-16T10:23:27.582Z","avatar_url":"https://github.com/gesslerpd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyopenssl-psk\n\nAdd PSK support to pyOpenSSL.\n\n**Note:** PSK support is available in Python 3.13+. For more information, refer to the [official Python documentation](https://docs.python.org/3/library/ssl.html).\n\n## Installation\n\n```\n$ pip install pyopenssl-psk\n```\n\n## API\n\n### Patch Method\n\n- `patch_context()`\n\n  Add PSK related methods to the `OpenSSL.SSL.Context` class.\n\n```python\nfrom openssl_psk import patch_context\n\npatch_context()\n```\n\n### Server Methods\n\n- `Context.use_psk_identity_hint(hint: bytes) -\u003e None` ([docs](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_psk_identity_hint.html)) ([stdlib ssl](https://docs.python.org/3/library/ssl.html#ssl.SSLContext.use_psk_identity_hint))\n\n  Set the server PSK identity hint.\n\n- `Context.set_psk_server_callback(callback: server_callback) -\u003e None` ([docs](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_server_callback.html)) ([stdlib ssl](https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_psk_server_callback))\n  \n  Set a callback to populate the server PSK.\n\n  `server_callback(connection: Connection, client_identity: bytes) -\u003e psk: bytes`\n\n  User provided callback function to populate the connection PSK.\n\n```python\nfrom OpenSSL.SSL import Context, Connection, TLSv1_2_METHOD\n\nPSK_MAP = {\n    b'pre_shared_key_identity': b'pre_shared_key',\n}\n\ndef server_callback(conn, client_identity):\n    return PSK_MAP[client_identity]\n\nctx = Context(TLSv1_2_METHOD)\nctx.set_cipher_list(b'PSK')\nctx.use_psk_identity_hint(b'pre_shared_key_identity_hint')\nctx.set_psk_server_callback(server_callback)\nserver = Connection(ctx)\n```\n\n### Client Methods\n\n- `Context.set_psk_client_callback(callback: client_callback) -\u003e None` ([docs](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_client_callback.html)) ([stdlib ssl](https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_psk_client_callback))\n\n  Set a callback to populate the client PSK identity and PSK.\n  \n  `client_callback(connection: Connection, identity_hint: bytes) -\u003e tuple(psk_identity: bytes, psk: bytes)`\n\n  User provided callback function to populate the connection PSK identity and PSK.\n\n```python\nfrom OpenSSL.SSL import Context, Connection, TLSv1_2_METHOD\n\ndef client_callback(conn, identity_hint):\n    return (b'pre_shared_key_identity', b'pre_shared_key')\n\nctx = Context(TLSv1_2_METHOD)\nctx.set_cipher_list(b'PSK')\nctx.set_psk_client_callback(client_callback)\nclient = Connection(ctx)\n```\n\nSee `OpenSSL.SSL` [documentation](https://www.pyopenssl.org/en/stable/api/ssl.html) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesslerpd%2Fpyopenssl-psk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgesslerpd%2Fpyopenssl-psk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesslerpd%2Fpyopenssl-psk/lists"}