org.eclipse.emf.emfstore.internal.server.connection
Class ServerKeyStoreManager

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.connection.ServerKeyStoreManager

public final class ServerKeyStoreManager
extends Object

The ServerKeyStoreManager loads the keystore, which is needed for decryption of user passwords and for RMI encryption.

Author:
wesendon

Method Summary
 String decrypt(String password)
          Decrypts a password with the server's password.
static ServerKeyStoreManager getInstance()
          Returns the instance of the ServerKeyStoreManager.
 KeyManagerFactory getKeyManagerFactory()
          Creates a KeyManagerFactory for the RMI encryption.
 KeyStore getKeyStore()
          Returns the keystore of the server.
 char[] getKeyStorePassword()
          Returns the keystore password as a char array.
 void setJavaSSLProperties()
          Sets java runtime properties for SSL.
 void unloadKeyStore()
          Unloads the keystore by setting it to null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ServerKeyStoreManager getInstance()
Returns the instance of the ServerKeyStoreManager.

Returns:
an instance

decrypt

public String decrypt(String password)
               throws ServerKeyStoreException
Decrypts a password with the server's password.

Parameters:
password - encrypted password
Returns:
decrypted password
Throws:
ServerKeyStoreException - in case of failure

getKeyStore

public KeyStore getKeyStore()
                     throws ServerKeyStoreException
Returns the keystore of the server.

Returns:
the server key store
Throws:
ServerKeyStoreException - in case key store initialization fails

unloadKeyStore

public void unloadKeyStore()
Unloads the keystore by setting it to null.


getKeyManagerFactory

public KeyManagerFactory getKeyManagerFactory()
                                       throws ServerKeyStoreException
Creates a KeyManagerFactory for the RMI encryption.

Returns:
KeyManagerFactory
Throws:
ServerKeyStoreException - in case of failure

setJavaSSLProperties

public void setJavaSSLProperties()
Sets java runtime properties for SSL.


getKeyStorePassword

public char[] getKeyStorePassword()
Returns the keystore password as a char array.

Returns:
the password


Copyright © 2015. All Rights Reserved.