Title: xmlsec.Error: (1, 'cannot load key') while loading the private key · Issue #328 · xmlsec/python-xmlsec · GitHub
Open Graph Title: xmlsec.Error: (1, 'cannot load key') while loading the private key · Issue #328 · xmlsec/python-xmlsec
X Title: xmlsec.Error: (1, 'cannot load key') while loading the private key · Issue #328 · xmlsec/python-xmlsec
Description: Hi Team, I have a X509 private in a file and trying to use the below code to load the private key. However i am getting the xmlsec.Error: (1, 'cannot load key'). I tried multiple ways. nothing is working and more over the error message i...
Open Graph Description: Hi Team, I have a X509 private in a file and trying to use the below code to load the private key. However i am getting the xmlsec.Error: (1, 'cannot load key'). I tried multiple ways. nothing is w...
X Description: Hi Team, I have a X509 private in a file and trying to use the below code to load the private key. However i am getting the xmlsec.Error: (1, 'cannot load key'). I tried multiple ways. noth...
Opengraph URL: https://github.com/xmlsec/python-xmlsec/issues/328
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"xmlsec.Error: (1, 'cannot load key') while loading the private key","articleBody":"Hi Team,\r\n\r\nI have a X509 private in a file and trying to use the below code to load the private key. However i am getting the xmlsec.Error: (1, 'cannot load key'). I tried multiple ways. nothing is working and more over the error message is not detailed enough to try other options.\r\n\r\nAny suggestions are greatly appreciated. Thank you.\r\n\r\n```\r\nwith open('private_key.pem', 'rb') as key_file:\r\n key_data = key_file.read()\r\nxmlsec.Key.from_memory(key_data, xmlsec.constants.KeyDataFormatPem)\r\n```\r\n\r\nMy PEM file format is as shown below:\r\n\r\n\u003e -----BEGIN PRIVATE KEY-----\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e TUlkjshduahdajsduaydjaudhswmb7ajwesdajhassdadasdsdaeddasdaeqdea\r\n\u003e asdadasd==\r\n\u003e -----END PRIVATE KEY-----","author":{"url":"https://github.com/ramanareddy438","@type":"Person","name":"ramanareddy438"},"datePublished":"2024-10-10T22:05:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/328/python-xmlsec/issues/328"}
| 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:f92bd8a8-1f8f-3384-42a1-c8eb722ba321 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C380:28B0D7:5B7446:81A71D:696A0F79 |
| html-safe-nonce | a75ae542bf09f07264f8c85377dd6607849f39d99eef6287636407bff06dad26 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzgwOjI4QjBENzo1Qjc0NDY6ODFBNzFEOjY5NkEwRjc5IiwidmlzaXRvcl9pZCI6Ijg0MDMwNDQyNTAxMzg4NDA5NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8c7b9d44e4f4e757f2fb6a7311f1e319945ce3d7a197f2718035a3de7203faa4 |
| hovercard-subject-tag | issue:2579939593 |
| 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/328/issue_layout |
| twitter:image | https://opengraph.githubassets.com/99e822280e2ece08464af0640af26f05e1d2782684209672f743e9d7df81cf50/xmlsec/python-xmlsec/issues/328 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/99e822280e2ece08464af0640af26f05e1d2782684209672f743e9d7df81cf50/xmlsec/python-xmlsec/issues/328 |
| og:image:alt | Hi Team, I have a X509 private in a file and trying to use the below code to load the private key. However i am getting the xmlsec.Error: (1, 'cannot load key'). I tried multiple ways. nothing is w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ramanareddy438 |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width