org.glite.security.util
Class KeyStoreGenerator

java.lang.Object
  extended by org.glite.security.util.KeyStoreGenerator

public class KeyStoreGenerator
extends java.lang.Object

Generates a keystore from the certificate and the private key from the files.

Author:
Joni Hahkala Created on April 9, 2002, 5:00 PM

Constructor Summary
KeyStoreGenerator()
           
 
Method Summary
static java.security.KeyStore generate(java.lang.String certFile, java.lang.String keyFile, org.bouncycastle.openssl.PasswordFinder finder, java.lang.String storePasswd)
          Generates the new KeyStore using the information given in the constructor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStoreGenerator

public KeyStoreGenerator()
Method Detail

generate

public static java.security.KeyStore generate(java.lang.String certFile,
                                              java.lang.String keyFile,
                                              org.bouncycastle.openssl.PasswordFinder finder,
                                              java.lang.String storePasswd)
                                       throws java.lang.Exception
Generates the new KeyStore using the information given in the constructor.

Parameters:
certFile - The file to read the certificate from.
keyFile - The file where to read the private key from.
finder - The password finder to use to prompt for user to input the password.
storePasswd - The password to use as the keystore password.
Returns:
Returns the new KeyStore.
Throws:
java.lang.Exception - Thrown is the certificate or private key reading fails.