对证书签名

如果使用 CDC Replication 命令创建了认证中心,那么还可以使用 CDC Replication 命令对证书进行签名。

此过程使用位于 installation_directory/jre64/jre/bin下的 keytool

认证中心在收到来自 CDC Replication 系统的证书签名请求时对证书进行签名。 该请求通常是使用 CDC Replication 系统的主机名 (扩展名为 .csr ) 命名的文件。 您可以使用 keytool -gencert 命令来签署证书。 例如:

keytool -gencert -noprompt -infile hostname.csr -outfile hostname.crt -alias self -sigalg SHA256withRSA -validity 365 -keypass password -keystore privatekey.jks -storepass password -storetype JKS -rfc -ext KeyUsage:critical=digitalSignature,keyAgreement,keyEncipherment,nonRepudiation -ext ExtendedKeyUsage:critical=serverAuth,clientAuth

CDC Replication 系统需要整个证书链,其中包括签名证书和认证中心的证书。 可以使用 keytool -exportcert 命令来导出认证中心的证书。 例如:

keytool -exportcert -noprompt -rfc -alias self -file ca.crt -keystore privatekey.jks -storepass password -storetype JKS

将签名证书 (例如, hostname.crt) 和自签名认证中心证书 (例如, ca.crt) 发送回 CDC Replication 系统。

您还可以使用第三方工具(如 openssl)来对证书签名。