Title: Error: (1, 'cannot read key') · Issue #342 · xmlsec/python-xmlsec · GitHub
Open Graph Title: Error: (1, 'cannot read key') · Issue #342 · xmlsec/python-xmlsec
X Title: Error: (1, 'cannot read key') · Issue #342 · xmlsec/python-xmlsec
Description: Hi! I have a problem, when I do this: key = xmlsec.Key.from_file(p12_path, xmlsec.constants.KeyDataFormatPkcs12, password=pass) The file .p12 I can extract the private key and certificate whit this: private_key, certificate, additional_c...
Open Graph Description: Hi! I have a problem, when I do this: key = xmlsec.Key.from_file(p12_path, xmlsec.constants.KeyDataFormatPkcs12, password=pass) The file .p12 I can extract the private key and certificate whit this...
X Description: Hi! I have a problem, when I do this: key = xmlsec.Key.from_file(p12_path, xmlsec.constants.KeyDataFormatPkcs12, password=pass) The file .p12 I can extract the private key and certificate whit this...
Opengraph URL: https://github.com/xmlsec/python-xmlsec/issues/342
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: (1, 'cannot read key')","articleBody":"Hi! I have a problem, when I do this:\n\nkey = xmlsec.Key.from_file(p12_path, xmlsec.constants.KeyDataFormatPkcs12, password=pass)\n\nThe file .p12 I can extract the private key and certificate whit this:\n\nprivate_key, certificate, additional_certs = pkcs12.load_key_and_certificates(p12_data, clave.encode(\"utf-8\"))\nprint(\"🔐 Private key:\", private_key)\n\nAnd then it print: \u003ccryptography.hazmat.bindings._rust.openssl.rsa.RSAPrivateKey object at 0x73e07a4763d0\u003e\n\nThen, the path is fine, and the file also. What do I am doing wrong? Help, thanks","author":{"url":"https://github.com/danielmendez14","@type":"Person","name":"danielmendez14"},"datePublished":"2025-03-03T20:10:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/342/python-xmlsec/issues/342"}
| 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:b46f8284-3fa2-47d2-3f50-056724ae2b5e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1F8:254FE5:4608A1:620000:696A0C18 |
| html-safe-nonce | 200c1e10eccf8ddd2c7f61ab067821be2abc3411f9a96f01e8ed491c81009b74 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUY4OjI1NEZFNTo0NjA4QTE6NjIwMDAwOjY5NkEwQzE4IiwidmlzaXRvcl9pZCI6IjcxNjAxOTI1NTk5MTk3OTUyMjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e7363705119b489aae20528388400f98988261702772c685fa8cbd981714178b |
| hovercard-subject-tag | issue:2892207833 |
| 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/xmlsec/python-xmlsec/342/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad939eff6d59bb6552d2210c18060eb796ec759a26d530d431c92412183ea97a/xmlsec/python-xmlsec/issues/342 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad939eff6d59bb6552d2210c18060eb796ec759a26d530d431c92412183ea97a/xmlsec/python-xmlsec/issues/342 |
| og:image:alt | Hi! I have a problem, when I do this: key = xmlsec.Key.from_file(p12_path, xmlsec.constants.KeyDataFormatPkcs12, password=pass) The file .p12 I can extract the private key and certificate whit this... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danielmendez14 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| turbo-cache-control | no-preview |
| go-import | github.com/xmlsec/python-xmlsec git https://github.com/xmlsec/python-xmlsec.git |
| octolytics-dimension-user_id | 111647685 |
| octolytics-dimension-user_login | xmlsec |
| octolytics-dimension-repository_id | 27934955 |
| octolytics-dimension-repository_nwo | xmlsec/python-xmlsec |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27934955 |
| octolytics-dimension-repository_network_root_nwo | xmlsec/python-xmlsec |
| 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 | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width