站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java Tutorial 5.0 英文版

Export the Public Key Certificate - Java Tutorial 5.0 英文版

The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Security in Java 2 SDK 1.2
Lesson: Signing Code and Granting It Permissions

Export the Public Key Certificate

You now have a signed JAR file sCount.jar. The runtime system of the code receiver (Ray) will need to authenticate the signature when the Count application in the signed JAR file tries to read a file and a policy file grants that permission to this signed code.

In order for the runtime system to authenticate the signature, Ray's keystore needs to have the public key corresponding to the private key used to generate the signature. You supply this by sending Ray a copy of the certificate authenticating the public key. Copy that certificate from the keystore susanstore to a file named SusanJones.cer via the following:

keytool -export -keystore susanstore -alias signFiles -file SusanJones.cer
You will be prompted for the store password (ab987c).

Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.