大网数据广告活动
服务器运维问答

Can I get anSHA-256 certificate when the CSR is for SHA-1?

· 52CE 我爱测

I've read: By default, OpenSSL cryptographic tools are configured to make SHA1 signatures. for example, if you want to generate a SHA256-signed certificate request (CSR) , add in the command line: -sha256 I was required to upgrad…

问题原文

原帖链接 · joshua.paling · CC BY-SA 3.0

I've read:

By default, OpenSSL cryptographic tools are configured to make SHA1 signatures. for example, if you want to generate a SHA256-signed certificate request (CSR) , add in the command line: -sha256

I was required to upgrade an existing SHA1 certificate to SHA256. I generated a new CSR and sent it off to RapidSSL, before realising that I hadn't specified -sha256 in the CSR.

I've contacted them and they say "a replacement for a Sha2 certificate has been made and current state of the order is waiting for an approval. Once the order is approved will the new certificate be issued with SHA2 algorithm."

My question is, is it possible for them to get my SHA1 CSR and say "ok, we're giving you an SHA256 certificate back anyway because that's all we do now"? And will that certificate work with the private key I've generated corresponding to that SHA1 CSR?

How does it work? When I pass in -sha256 (or when I don't) at the time of generating a CSR, what does that affect, other than just making a note in the CSR saying "hey, this person wants SHA256 encryption on their certificate"? Does it affect the generated private key in any way?

已采纳解答

原帖链接 · Erik Dannenberg · CC BY-SA 3.0

It's possible because the signature of a CSR is only used to prove that you are indeed the owner of the private key that matches with the public key embedded in the CSR. Once the CA (RapidSSL in your case) decides that the CSR is valid it's signature becomes meaningless for the further process of creating the certificate and is effectively discarded.

For the full gory details on what's in a certificate see rfc5280-4.1.2

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。