Signing Code and Granting It Permissions [Tools] |
For this lesson, you will grant all code in JAR files signed by the alias "susan" read access to all files in theC:\TestData\
directory. You need to do two things:
- Specify the keystore containing the certificate information aliased by "susan", and
- Create the policy entry granting the permission.
The keystore is the one named
raystore
created in the Import the Certificate as a Trusted Certificate step.To specify the keystore, select the Change Keystore command in the Edit menu of the main "Policy Tool" window.
This brings up a dialog box in which you can specify the keystore URL and the keystore type.
To specify the keystore named
raystore
in theTest
directory on theC:
drive, type the followingfile:
URL into the text box labeled "New KeyStore URL":file:/C:/Test/raystoreYou can leave the text box labeled "New KeyStore Type" blank, if the keystore type is the default one, as specified in the security properties file. Your keystore will be the default type, so leave the text box blank.The result is:
Note: The "New KeyStore URL" value is a URL and thus should always utilize slashes (never backslashes) as the directory separator.
When you are done specifying the keystore URL, select OK. The text box labeled "Keystore:" is now filled in with the URL:
Next, you need to specify the new policy entry.
Signing Code and Granting It Permissions [Tools] |