[GH-ISSUE #292] 证书能否支持增加 OCSP Must-Staple 标识? #3256

Closed
opened 2026-02-28 11:55:15 +03:00 by kerem · 2 comments
Owner

Originally created by @jearton on GitHub (Feb 18, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/292

ocsp must staple 是在签发证书时,往证书里追加的相关标识,用于明确告诉浏览器,ocsp 请求必须由服务端装订,即由服务端去查询好证书状态,再返回给浏览器。

目前能够签署出该扩展的证书的CA只有Let's Encrypt

如果要设置OCSP Must-Staple,需要在使用openssl生成csr的时候,修改openssl.cnf中的内容:

[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05

v3_req中添加1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05

如果是使用openssl 1.1.0或更高的版本,可以这样设置:

[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
tlsfeature = status_request

添加tlsfeature = status_request即可。

然后生成该csr文件,使用该csr文件,把改csr提交给支持Let's Encrypt证书签发的机构。

Originally created by @jearton on GitHub (Feb 18, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/292 ocsp must staple 是在签发证书时,往证书里追加的相关标识,用于明确告诉浏览器,ocsp 请求必须由服务端装订,即由服务端去查询好证书状态,再返回给浏览器。 目前能够签署出该扩展的证书的`CA`只有`Let's Encrypt`。 如果要设置`OCSP Must-Staple`,需要在使用`openssl`生成`csr`的时候,修改`openssl.cnf`中的内容: ```ini [ v3_req ] basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectAltName = @alt_names 1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05 ``` 在`v3_req`中添加`1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05`。 如果是使用`openssl 1.1.0`或更高的版本,可以这样设置: ```ini [ v3_req ] basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectAltName = @alt_names tlsfeature = status_request ``` 添加`tlsfeature = status_request`即可。 然后生成该`csr`文件,使用该`csr`文件,把改`csr`提交给支持`Let's Encrypt`证书签发的机构。
kerem 2026-02-28 11:55:15 +03:00
Author
Owner

@0xJacky commented on GitHub (Feb 18, 2024):

已在 1c4fb7a 中添加

<!-- gh-comment-id:1951218804 --> @0xJacky commented on GitHub (Feb 18, 2024): 已在 1c4fb7a 中添加
Author
Owner

@jearton commented on GitHub (Feb 18, 2024):

已在 1c4fb7a 中添加

默认就自动加上了吗?不需要在UI页面上显式勾选吗?

<!-- gh-comment-id:1951222544 --> @jearton commented on GitHub (Feb 18, 2024): > 已在 [1c4fb7a](https://github.com/0xJacky/nginx-ui/commit/1c4fb7afcc6ba2dfc46c31c44f36e1c3b74836b7) 中添加 默认就自动加上了吗?不需要在UI页面上显式勾选吗?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#3256
No description provided.