Answers:
只要您使用相同的密钥,域(又名通用名称),联系方式和有效期,您就应该能够使用相同的CSR。
虽然说实话,生成CSR相当简单,但是如果您需要修改联系方式(很多SSL提供商都严格要求),则没什么大不了的。
拥有期限有限的证书的主要好处是可以减少私钥泄露时造成的损害。如果您重复使用CSR,则拥有私钥的人可能会永远冒充您,因为重新使用CSR也意味着重用您的私钥。
请不要这样做,最好是自动生成私钥和CSR,并找到方便的方法将不断变化的私钥分发到应用程序构建服务器和推送服务器。通常,大多数凡人开发人员永远都不需要为应用程序商店进行发行/发行版本构建,因此不需要私钥。
从理论上讲,您确实可以重用相同的CSR,因为这只是一个容器
毕竟,这就是证书(“公钥证书”的缩写)的含义。
但是,如在其他答案中所指出的那样,定期更改私钥是一个好习惯,这意味着要获得新证书,也要获得新的CSR。
您可以轻松查看CSR的内容
例如
$ openssl req -new -batch -subj "/CN=My Common Name/OU=My Org Unit/O=My Organisation" -sha256 -newkey rsa:2048 -keyout private.key -nodes -out request.csr
Generating a 2048 bit RSA private key
.............................................................................................+++++
.........+++++
writing new private key to 'private.key'
-----
$ ls
private.key // keep that private, the PublicKey side is easily be generated from this
request.csr // your PublicKey + Subject details
企业社会责任
$ openssl req -in request.csr -text -noout
Certificate Request:
Data:
Version: 1 (0x0)
Subject: CN = My Common Name, OU = My Org Unit, O = My Organisation
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus: ///////// Matches the PrivateKey modulus
00:b1:e8:de:e6:bf:21:45:51:75:15:23:5e:6e:7a:
7d:95:53:e5:d5:ec:5b:38:cd:7f:38:2d:53:8a:54:
...
fe:b5:78:de:9b:c1:ee:c1:51:6f:fd:fb:0e:62:09:
03:87
Exponent: 65537 (0x10001) ///////// Matches the PrivateKey publicExponent
Attributes:
a0:00
Signature Algorithm: sha256WithRSAEncryption
a1:44:1f:b2:ec:c0:82:bc:99:da:69:ce:3e:77:9f:46:51:95:
...
3b:2d:84:e3:73:ac:be:c8:da:29:fd:62:90:11:dd:8a:a6:4f:
7b:f8:ac:f1
和私钥
$ openssl rsa -in private.key -text -noout
// all the below are numbers that takes part in Mathematical encryption (search for RSA maths)
RSA Private-Key: (2048 bit, 2 primes)
// The Numbers that can be freely published
modulus:
00:b1:e8:de:e6:bf:21:45:51:75:15:23:5e:6e:7a:
7d:95:53:e5:d5:ec:5b:38:cd:7f:38:2d:53:8a:54:
...
fe:b5:78:de:9b:c1:ee:c1:51:6f:fd:fb:0e:62:09:
03:87
publicExponent: 65537 (0x10001)
// The Numbers that must be kept private !
privateExponent:
0a:81:73:d8:30:65:28:90:bc:d7:38:b5:74:d4:aa:
...
b1:9b:30:2e:a2:dd:46:c1:10:0f:b0:da:ac:b6:ea:
01
prime1:
00:e0:28:01:87:95:70:d0:b8:21:07:e0:4f:96:a6:
...
66:28:8f:3d:d7:eb:e6:b4:81
prime2:
00:cb:2e:fe:1b:b6:30:ea:8d:9e:6d:23:83:d8:b6:
...
4d:64:39:5c:9c:18:a0:14:07
exponent1:
22:e2:36:f2:b9:af:f7:db:5f:d0:90:f8:f1:d1:ff:
...
3a:31:a8:87:2c:c0:17:81
exponent2:
5a:8b:3d:77:f1:ef:c8:86:85:a4:13:20:8d:31:a4:
...
a5:ba:1e:37:fd:8d:50:7f
coefficient:
00:d3:d3:b6:81:4b:a9:c2:aa:ff:e1:07:cb:de:ea:
...
5c:e9:3b:d3:f7:67:82:c3:7f