Java 教程是为 JDK 8 编写的。本页中描述的示例和实践未利用在后续版本中引入的改进。
代码签名者的步骤
The code signer takes the following steps:
- Download and Try the Sample Application.
- 创建包含类文件的 JAR 文件, using the
jar
tool.
- 生成密钥(if they don't already exist), using the
keytool
-genkey
command.
Optional Step Generate a certificate signing request (CSR) for the public key certificate, and import the response from the certification authority (CA). For simplicity (and since you are only pretending to be Susan Jones), this step is omitted. See
Generating a Certificate Signing Request (CSR) for a Public Key Certificate for more information.
- 签名 JAR 文件, using the
jarsigner
tool and the private key.
- 导出公钥证书, using the
keytool
-export
command. Then supply the signed JAR file and the certificate to the receiver Ray.