#! /bin/csh
### setup for signing with javakey
### usage: gnSetup.csh yourIDName 

set yourName = $1

# Step 1.  Create the yourName identity, as a trusted identity

javakey -cs $yourName  true

# Step 2.  Generate a keypair for $yourName , and store the public key in a file named
# $yourName_pub and the private key in a file named $yourName_priv

javakey -gk $yourName DSA 512 $yourName_pub $yourName_priv

# Step 3.  Generate an x509 certificate for $yourName, and store it in the file
# named $yourName.x509.   This output file name is given in the directive file
# named cert_directive_$yourName. 

javakey -gc cert_directive_$yourName 

# Step 4.   Show the entry in the identity database. 

echo " "
echo "Contents of the identity database are: "
javakey -li $yourName



