File tree Expand file tree Collapse file tree 2 files changed +164
-130
lines changed
Expand file tree Collapse file tree 2 files changed +164
-130
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,19 @@ gen_cert模块允许用户校验或生成证书文件。
99| root_key | CA证书的key路径 | 字符串 | 否 | - |
1010| root_cert | CA证书路径 | 字符串 | 否 | - |
1111| date | 证书过期时间 | 字符串 | 否 | 1y |
12- | policy | 证书生成策略(Always, IfNotPresent) | 字符串 | 否 | IfNotPresent |
12+ | policy | 证书生成策略(Always, IfNotPresent, None ) | 字符串 | 否 | IfNotPresent |
1313| sans | Subject Alternative Names. 允许的IP和DNS | 字符串 | 否 | - |
1414| cn | Common Name | 字符串 | 是 | - |
1515| out_key | 生成的证书key路径 | 字符串 | 是 | - |
1616| out_cert | 生成的证书路径 | 字符串 | 是 | - |
1717
18- 证书生成策略:
19- Always: 无论` out_key ` 和` out_cert ` 指向的证书路径是否存在,都会生成新的证书进行覆盖。
20- IfNotPresent: 当` out_key ` 和` out_cert ` 指向的证书路径存在时,只对该证书进行校验,并不会生成新的证书。
18+ 证书生成策略说明:
19+
20+ - ** Always** :无论` out_key ` 和` out_cert ` 指定的证书文件是否已存在,始终重新生成证书并覆盖原有文件。
21+ - ** IfNotPresent** :仅当` out_key ` 和` out_cert ` 指定的证书文件不存在时才生成新证书;如果文件已存在,则先对现有证书进行校验,校验不通过时才会重新生成证书。
22+ - ** None** :如果` out_key ` 和` out_cert ` 指定的证书文件已存在,仅对其进行校验,不会生成或覆盖证书文件;若文件不存在则不会生成新证书。
23+
24+ 该策略可灵活控制证书的生成和校验行为,满足不同场景下的需求。
2125
2226## 使用示例
2327
You can’t perform that action at this time.
0 commit comments