email - 使用 openssl 签署多部分/混合电子邮件
问题描述
我目前正在尝试使用以下命令使用 openssl cms 签署电子邮件:
openssl cms -sign -in unsigned_message -out signed_message -certfile ca_certs.pem -signer client_cert.pem -from xxx@yyy.com -to yyy@zzz.com -subject sample_subject
如果 unsigned_message 是这样构建的(没有多部分邮件),那么一切正常并且签名是正确的:
Content-Type: text/html
<div>test</div>
但是,如果电子邮件包含这样的多部分消息:
Content-Type: multipart/mixed;boundary="sample_boundary"
--sample_boundary
Content-Type: text/html
<div>test</div>
--sample_boundary
Content-type: text/plain; charset=us-ascii
test
--sample_boundary--
电子邮件的签名错误。但我不知道为什么?
解决方案
推荐阅读
- javascript - 用 Jest 测试 Sagas 失败,主要对象收到的差异没有明确的解释
- forms - 图片。Symfony 4 中每种领域语言的 buildForm 中的 textfield 和 textarea
- django - 如何创建 django rest auth 社交登录?
- java - Change encryption algorithm in AWS Cognito access token JWT
- api - 监控 API 在 RTC 服务器上命中查询并在超时后终止它们
- java - 检查 JSON 响应中的每个对象是否包含特定字段中的短语
- node.js - NodeJS MongoDB Mongoose 将嵌套的子文档和数组导出到 XLSX 列
- angular - 如何从 Observable 中提取内容并将其存储在基于键的数组中?
- kubernetes - Kubernetes 1.15+ 中的 Kubelet 指标
- xcode - 是否可以在 ARKit 中使用符号断点?