问题
解决方案
前提条件
安装 OpenSSL(适用于 Windows)。通过 OpenSSL 可以创建签名证书。
使用 Windows 命令行创建认证机构和证书
-
生成认证机构及其私钥。在命令提示符下运行
openssl genrsa -out protect-custom-ca.key 2048 openssl req -x509 -new -nodes -key protect-custom-ca.key -sha256 -days 3650 -out protect-custom-ca.der -outform der -subj "/CN=PROTECT Custom CA"您可以用自己选择的文件名替换
.key和.der文件的protect-custom-ca。 -
创建证书扩展文件
(protect.ext)。在命令提示符中运行以下命令:
-
对于一个域:
echo authorityKeyIdentifier=keyid,issuer >>protect.ext echo basicConstraints=CA:FALSE >>protect.ext echo keyUsage=digitalSignature,keyEncipherment,dataEncipherment >>protect.ext echo subjectAltName=DNS:*.example.com >>protect.ext -
对于多个域:
echo authorityKeyIdentifier=keyid,issuer >>protect.ext echo basicConstraints=CA:FALSE >>protect.ext echo keyUsage=digitalSignature,keyEncipherment,dataEncipherment >>protect.ext echo "subjectAltName=DNS:example.com,DNS:*.example.com,DNS:api.example.net" >>protect.ext
替换:
- 在
authorityKeyIdentifier:keyid发行者
用 OpenSSL 为你的认证机构生成的实际值替换这些值。
- 在
subjectAltName:- 中的示例域与您环境中使用的 DNS 名称或域相同。
请勿更改以下命令,因为这些命令对于 ESET PROTECT 是强制性的:
basicConstraints=CA:FALSEkeyUsage=digitalSignature,keyEncipherment,dataEncipherment
-
-
生成证书及其私钥,并导出为
.pfx文件。在命令提示符中运行以下命令:
-
对于 ESET PROTECT 服务器证书:
openssl genrsa -out protect-server.key 2048 openssl req -new -key protect-server.key -subj "/CN=PROTECT Server" | openssl x509 -req -CA protect-custom-ca.der -CAkey protect-custom-ca.key -CAform DER -out protect-server.crt -days 1825 -sha256 -extfile protect.ext openssl pkcs12 -export -out protect-server.pfx -inkey protect-server.key -in protect-server.crt -passout pass:password将
密码替换为您选择的强密码。 -
对于 ESET 管理代理证书
用您选择的强密码替换openssl genrsa -out protect-agent.key 2048 openssl req -new -key protect-agent.key -subj "/CN=PROTECT Agent" | openssl x509 -req -CA protect-custom-ca.der -CAkey protect-custom-ca.key -CAform DER -out protect-agent.crt -days 1825 -sha256 -extfile protect.ext openssl pkcs12 -export -out protect-agent.pfx -inkey protect-agent.key -in protect-agent.crt -passout pass:password密码。
-