文档

Java™ 教程-Java Tutorials 中文版
代码签名者的步骤
Trail: Security Features in Java SE
Lesson: Signing Code and Granting It Permissions

代码签名者的步骤

The code signer takes the following steps:

  1. Download and Try the Sample Application.
  2. 创建包含类文件的 JAR 文件, using the jar tool.
  3. 生成密钥(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.
  4. 签名 JAR 文件, using the jarsigner tool and the private key.
  5. 导出公钥证书, using the keytool -export command. Then supply the signed JAR file and the certificate to the receiver Ray.

Previous page: Signing Code and Granting It Permissions
Next page: Download and Try the Sample Application