*/
private void loadKey(String keyPath, String pwd)
throws GeneralSecurityException
{
try {
OpenSSLKey key = new BouncyCastleOpenSSLKey(keyPath);
if (key.isEncrypted()) {
key.decrypt(pwd);
}
userKey = key.getPrivateKey();
} catch (IOException e) {
throw new GeneralSecurityException("Error: Failed to load key: " + keyPath);
} catch (GeneralSecurityException e) {
throw new GeneralSecurityException("Error: Wrong pass phrase");