使用OpenSSL解码/提取smime.p7m文件内容(带有嵌入式文件的电子邮件)? [英] Decode/extract smime.p7m file contents (email with embedded files) with OpenSSL?
问题描述
我们有一个旧的进程(VBScript),它可以读取一个公用邮箱并将某些电子邮件处理到数据库中.
We have an old process (VBScript) that reads a common mailbox and processes certain emails into a database.
新法规对所有带有附件的邮件进行了数字签名.
New regulations have all messages with attachments now being digitally signed.
该过程现在仅提取一个文件(smime.p7m).使用基于GUI的查看器,我可以看到嵌入文件并毫无问题地提取它们.但是,我真正需要的是基于命令行的提取器,该提取器将写出嵌入式文件(PDF,DOC,XLS)-它们未加密,只是经过签名.我使用没有证书的笔记本电脑对此进行了测试,并使用上述查看器打开了smime.p7m文件.
The process now only extracts one file (smime.p7m). Using a GUI-based viewer, I can see the embedded files and extract them with no problem. However, what I really need is a command-line based extracter that will write out the embedded files (PDFs, DOCs, XLSs) - they're not encrypted, just signed. I tested this by using a laptop that had no certificates and simply opened the smime.p7m file with the aforementioned viewer.
似乎OpenSSL会对此进行解码/提取,并且有人设法在Windows上编译了一个版本.但是,可执行文件的许多试验和错误测试都令人沮丧,因为我找不到正确的标志组合,只能说打开smime.p7m文件并写出找到的所有嵌入式文件".在所有选项之后,"openssl smime"似乎总是想要"cert.pem",而我还没有.
It looks like OpenSSL will decode/extract this and someone managed to get a version compiled on Windows. However, a lot of trial and error testing of the executable has been frustrating because I can't find the right combination of flags to just say "open the smime.p7m file and write out all the embedded files you find". "openssl smime" always seems to want a "cert.pem" after all the options and I haven't got that.
我想念什么?预先感谢.
What am I missing? Thanks in advance.
推荐答案
唯一可行的选择是使用Chilkat的库编写一个简单的程序.根据每个开发人员的许可类型,此选项的价格为149美元或289美元,但至少是免版税的.
Looks like the only available option is to write a simple program using Chilkat's library. This option costs $149 or $289, depending on what kind of license, per developer, but at least it's royalty-free.
这篇关于使用OpenSSL解码/提取smime.p7m文件内容(带有嵌入式文件的电子邮件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!