mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 08:41:31 +00:00
modify notBefore
证书时间戳notBefore 的时间最好设置早点。当用户使用其它设备安装ca证书连接代理时,可能由于该设备的时间设置比生成证书的设备慢,会导致系统判定证书还未生效。
This commit is contained in:
parent
d886e8af5d
commit
3ac3cec079
@ -13,8 +13,9 @@ function getKeysAndCert(){
|
||||
cert.publicKey = keys.publicKey;
|
||||
cert.serialNumber = '01';
|
||||
cert.validity.notBefore = new Date();
|
||||
cert.validity.notBefore.setFullYear(cert.validity.notBefore.getFullYear() - 10); // 10 years
|
||||
cert.validity.notAfter = new Date();
|
||||
cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 10); // 10 years
|
||||
cert.validity.notAfter.setFullYear(cert.validity.notAfter.getFullYear() + 10); // 10 years
|
||||
return {
|
||||
keys: keys,
|
||||
cert: cert
|
||||
|
Loading…
x
Reference in New Issue
Block a user