代码签名证书和文档签名证书的区别

Difference between code signing certificate and document signing certificate

我正在考虑根据 Adob​​e 的 AATL 获取文件签名证书来签署 PDF,但是我注意到,例如 Digicert 对 Document Signing Certificate than a Code Signing Certificate 收取的价格明显不同。我们计划使用该证书对 PDF 进行自动签名,因此我看不到 USB 令牌(由文档签名证书提供)有多大用处。考虑到 certificate/private 密钥对由同一个 CA 签名:Digicert,并且都在 AATL 上(因此它们的根证书相同?)使用代码签名证书是否足以在 Adob​​e 阅读器上进行验证?

Digicert 的客户支持说:

if you're using the certificate through your own software then a code signing certificate may work since it chains back to the trusted DigiCert root. I can't confirm whether or not the code signing signature will translate to a PDF however since we don't officially support PDF signing with a code signing certificate.

如果有人对此有经验,我将不胜感激。

这些代码签名证书很可能有一个 extKeyUsage (2 5 29 37) 扩展,其值为 codeSigning (1 3 6 1 5 5 7 3 3),可能还有 commercialCodeSigning (1 3 6 1 4 1 311 2 1 22),但没有允许其他用途的值。 (至少我手头的代码签名证书是这样的。)

RFC 5280 为扩展密钥使用扩展指定 如果扩展存在,则证书必须仅用于指定的目的之一。

因此,如果相关证书中的扩展密钥用法如上所述设置,则使用此类代码签名证书对非代码进行签名违反了 X.509 Public 密钥基础设施证书的基本规范.

所以关于你的中心问题

We plan to use the certificate to do automated signing of PDFs ... would using a code signing certificate be suffice to validate on Adobe readers?

有可能 Adob​​e Reader 拒绝使用代码签名证书生成的 PDF 签名,如果现在不这样做,在未来的版本中可能会很好。