uk.ac.soton.itinnovation.grid.utils
Class Identity

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.utils.Identity

public class Identity
extends Object


Constructor Summary
Identity(KeyStore keyStore, String privateKeyAlias, char[] password)
           
 
Method Summary
 X509Certificate getCertificate()
           
 X509Certificate getIssuerCertificate()
           
 KeyStore getKeyStore()
           
 MatchPattern getMatchPattern()
          Return a pattern that matches this identity.
 PrivateKey getPrivateKey()
           
 String getPrivateKeyAlias()
           
 char[] getPrivateKeyPassword()
           
 SubjectDescription getSubjectDescription()
           
 void saveKeyStore(File file)
          Saves the identity's keystore to a Java KeyStore (JKS) file.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Identity

public Identity(KeyStore keyStore,
                String privateKeyAlias,
                char[] password)
         throws KeyStoreException,
                NoSuchAlgorithmException,
                UnrecoverableKeyException
Throws:
KeyStoreException
NoSuchAlgorithmException
UnrecoverableKeyException
Method Detail

getCertificate

public X509Certificate getCertificate()

getIssuerCertificate

public X509Certificate getIssuerCertificate()

getPrivateKey

public PrivateKey getPrivateKey()

getPrivateKeyPassword

public char[] getPrivateKeyPassword()

getKeyStore

public KeyStore getKeyStore()

saveKeyStore

public void saveKeyStore(File file)
                  throws FileNotFoundException
Saves the identity's keystore to a Java KeyStore (JKS) file. The keystore's password is set to the same as the private key's password.

Parameters:
file - the file to save it in
Throws:
FileNotFoundException
KeyStoreException
IOException
NoSuchAlgorithmException
CertificateException

getPrivateKeyAlias

public String getPrivateKeyAlias()

getMatchPattern

public MatchPattern getMatchPattern()
Return a pattern that matches this identity. This is typically used to set the default policy on new remote resources. The pattern matches on the Subject DN string and the issuer's certificate (so renewing the certificate won't invalidate the rule).


toString

public String toString()
Overrides:
toString in class Object

getSubjectDescription

public SubjectDescription getSubjectDescription()


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.