RSA 证书需要向一个支持RAS的CA公司购买。如Thawte 为了使用RSA证书签名你的小程序,你需要从Thawte或是其它CA获得Java代码签名证 书。在你登记你的证书的时候可能需要你提供证书签名请求文件(CSR)你可使用以下 步骤: --------------------------------------------------------- 1。使用keytool建立一个RSA keypair 2. C:>C:jdk1.3inkeytool -genkey -keyalg rsa -alias MyCert 3. Enter keystore passWord: ********* file://键入你keystore的密码 4. What is your first and last name? file://以下是键入你的信息 [Unknown]: XXXXXXX YYY 5. What is the name of your organizational unit? 6. [Unknown]: Java Software 7. What is the name of your organization? 8. [Unknown]: Sun Microsystems 9. What is the name of your City or Locality? 10. [Unknown]: Cupertino 11. What is the name of your State or PRovince? 12. [Unknown]: CA 13. What is the two-letter country code for this unit? 14. [Unknown]: US 15. Is <CN=XXXXXXX YYY, OU=Java Software, O=Sun Microsystems, L=Cupertino, ST=CA, C=US> correct? 16. [no]: yes file://确认后按y结束 17. Enter key password for <MyCert> file://键入你key的密码。若按回车次密码与 键入的keystore的密码相同 18. (RETURN if same as keystore password): ********* 19。使用 "keytool -certreq" 建立一个证书请求文件,拷贝并粘贴到Thawte的 webform上。例如: 20. C:>C:jdk1.3inkeytool -certreq -alias MyCert 21. Enter keystore password: ********* -----BEGIN NEW CERTIFICATE REQUEST----- MIIBTjCCAR8CAQAwdjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwE AYDVQQHEwlDdXBlcnRpbm8xGTAXBgNVBAoTEFN1biBNaWNyb3N5c3RlbX MxFjAUBgNVBAsTDUphdmEgU29mdHdhcmUxEzARBgNVBAMTClN0YW5sZXk gSG8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALTgU8PovA4y59eb oPjY65BwCSc/zPqtOZKJlaW4WP+UhmebE+T2Mho7P5zXjGf7elo3tV5uI 3vzgGfnhgpf73EoMow8EJhly4w/YsXKqeJEqqvNogzAD+qUv7Ld6dLOv0 CO5qvpmBAO6mfaI1XAgx/4xU/6009jVQe0TgIoocB5AgMBAAGgADANBgk qhkiG9w0BAQQFAAOBgQAWmLrkifKiUYtd4ykhBtPWSwW/IKkgyfIuNMML dF1DH8neSnXf3ZLI32f2yXvs7u3/xn6chnTXh4HYCJoGYOAbB3WNbAoQR i6u6TLLOvgv9pMNUo6v1qB0xly1faizjimVYBwLhOenkA3Bw7S8UIVfdv 84cO9dFUGcr/Pfrl3GtQ== -----END NEW CERTIFICATE REQUEST----- 22。你可以从邮箱里收到Thawte发给你的证书链,拷贝她并存处在一个文件中。可以使 用 "keytool -import" 把它导入你的keystore中 23. C:>C:jdk1.3inkeytool -import -alias MyCert -file VSSStanleyNew.cer 24。导入成功后你的证书及证书支持的链将生效。你现在可以使用Jarsigner签名你的 Jar文件了。注重:必须所有的步骤使用同样的别名或是不使用别名(缺省的别名是 "mykey")
s = signature was verified m = entry is listed in manifest k = at least one certificate was found in keystore i = at least one certificate was found in identity scope