I am trying to develop a java utility based on Bouncy Castle that should be able to sign and encrypt data which can later be decrypted and verified on the server side (openssl).
Data encrypted by BC gets decrypted fine with Openssl Data signed by BC gets verified fine with Openssl But when I sign and encrypt data with BC and use OpenSSL to decrypt and verify, it fails. But if I only decrypt this content, it decrypts fine. However the output of this decryption when I try to verify, it fails. I then opened the output of decryption, removed the first 3 lines from it. These lines were the 2 Headers and a blank line. After this the verification also went thru fine. So I am not sure how to avoid these extra headers that gets passed as input to openssl verification. My decrypt and verify is something like this -> openssl smime -decrypt -in $1 -recip $2 -inkey $3 | openssl smime -verify -CAfile $4 -out $5 These were the extra lines I deleted -> Content-Type: application/octet-stream Content-Transfer-Encoding: binary A blank line Anyone know of a solution, please let me know. Thanks, Dwipin. -- View this message in context: http://openssl.6102.n7.nabble.com/Openssl-Bouncy-Castle-Signature-Verification-Failure-tp42468.html Sent from the OpenSSL - User mailing list archive at Nabble.com. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org