With OpenSSL 3.x I get Error decrypting CMS structure 400755B1327F0000:error:1C800064:Provider routines:ossl_cipher_unpadblock:bad decrypt:../providers/implementations/ciphers/ciphercommon_block.c:129: If I swap cms for smime it changes to
Error decrypting PKCS#7 structure rest of the error stays the same. For all I know it has to do with some kinde of deprecated stuff in OpenSSL 3.x so you'd need to add something to the comand to enable legacy stuff. Using OpenSSL 1.1.1n however doesn't change much: Error decrypting CMS structure 139958493545792:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:610: The private key file is a PEM RSA key. Already checked that the reason can't be the wrong kind of line breaks (those Windows line breaks) inside the key file, since that was mentioned to be a possible reason. But the key file is as it's supposed to be. Regards Richard -- Richard Rosner Beauftragter für Vernetzung Studierendenschaft der RWTH Aachen University Fachschaft Materialwissenschaft und Werkstofftechnik Intzestraße 1 52072 Aachen Tel.: +49 241 80-95781 rros...@fsmuw.rwth-aachen.de www.fsmuw.rwth-aachen.de Am Freitag, 16. September 2022 19:51 CEST, schrieb "\"Frank Schmirler\"" (s...@schmirler.de) <users@sogo.nu>: Hi Richard, the basic openssl command to decrypt an S/MIME message would be something like openssl cms -decrypt -in EMLFILE -inkey PRIVATEKEYFILE Which error do you get when trying to decrypt your message with openssl? Regards, Frank Am Mittwoch, 14. September 2022 14:24 CEST, schrieb "\"Richard Rosner\"" (rros...@fsmuw.rwth-aachen.de) <users@sogo.nu>: > Hello together, > it seems I've found a bug when displaying an S/MIME encrypted mail. It seems > like characters aren't interpreted as UTF-8. At least some german "Umlaute" > don't display correctly. In Thunderbird, on the other hand, that same mail is > displayed correctly. Sadly, I haven't found a way to view the unencrypted > mail source code to verify if the text is indicated as UTF-8. Both OpenSSL > 1.x and 3.x are just throwing errors when trying to decrypt the eml file and > I don't know of any method to use either Thunderbird or SOGo to save the mail > as an unecrypted eml file. If anybody knows how I could better help to find > the bug, let me know. > > Using SOGo 5.7.1.20220912-1 on 64-bit Debian 10, straight from the > packages.sogo.nu repo. > > Best Regards > Richard > -- > Richard Rosner
smime.p7s
Description: S/MIME cryptographic signature