pyhanko.pdf_utils.config_utils.ConfigurationError: Error while loading key material #147
-
Describe the bug
To Reproduce Generating the OpenSSL Certificate (AutoSign) PS C:\Users\munee\Desktop\AutoSign> .\openssl\openssl req -config .\openssl\openssl.cnf -x509 -days 365 -newkey rsa:1024 -keyout
hostkey.pem -nodes -out hostcert.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com" Running PyHanko to Sign the PDF file, (AutoSign) PS C:\Users\munee\Desktop\AutoSign> pyhanko sign addsig pemder .\dummy.pdf out.pdf --key .\hostkey.pem --cert .\hostcert.pem
Key passphrase: I do not understand what this Key Passphrase means but whether I leave it empty or type something it gives me the above error. It should Produce a Proper Signed PDF. Environment (please complete the following information):
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
(moved to discussions as this is not a bug in pyHanko) Hi @OttomanZ, You're signing with an unencrypted private key file. If you want to do that from the CLI, use the Also, 1024-bit RSA is no longer considered secure, just as an FYI. Having said that, self-signed certificates typically aren't all that useful either, so if it's just for testing: go ahead. :) |
Beta Was this translation helpful? Give feedback.
(moved to discussions as this is not a bug in pyHanko)
Hi @OttomanZ,
You're signing with an unencrypted private key file. If you want to do that from the CLI, use the
--no-pass
option on the command line.Also, 1024-bit RSA is no longer considered secure, just as an FYI. Having said that, self-signed certificates typically aren't all that useful either, so if it's just for testing: go ahead. :)