-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenSSL::PKCS7::PKCS7Error: decrypt error #182
Comments
How did you create encrypted_smime.p7m? And what version of OpenSSL and Ruby/OpenSSL are you using? Adding |
After adding
According to this warning it is expecting |
The recipient's certificate is not mandatory for PKCS7_decrypt(). Make it possible to call OpenSSL::PKCS7#decrypt with only the private key to match the functionality. Reference: ruby#182
Then it is v2.0.x.
It is complaining that none of the But, in your first comment, you didn't give the certificate to the
This seems a missing feature of OpenSSL::PKCS7#decrypt in any case. See #183. |
The recipient's certificate is not mandatory for PKCS7_decrypt(). Make it possible to call OpenSSL::PKCS7#decrypt with only the private key to match the functionality. Reference: ruby#182
Thanks for the quick response and updates @rhenium. |
@rhenium can you also give an example of how to use |
Keep in mind that it is really little more than a kludge -- you really should check if the S/MIME is properly generated.
See PKCS7_decrypt(3) man page. The PKCS7_TEXT flag is available as OpenSSL::PKCS7::TEXT. |
The recipient's certificate is not mandatory for PKCS7_decrypt(). Make it possible to call OpenSSL::PKCS7#decrypt with only the private key to match the functionality. Reference: ruby#182
Here in the
decrypt
line, I am getting the error specified in the title.I am not sure why this error is causing, as I am able to decrypt the
smime
usingopenssl command line tool
properly.Also I have verified that the
cert
I am using is signed using the same private key that I am using inp_key
.Following is the command which is getting me the expected output -
The text was updated successfully, but these errors were encountered: