airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: fixing JSch Issue
Date Thu, 17 Dec 2015 18:44:46 GMT
Repository: airavata
Updated Branches:
  refs/heads/master e3a183e8a -> d8cb96589


fixing JSch Issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d8cb9658
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d8cb9658
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d8cb9658

Branch: refs/heads/master
Commit: d8cb96589790b59909035f3cdf8890a69ce76c7f
Parents: e3a183e
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Dec 17 13:44:42 2015 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Dec 17 13:44:42 2015 -0500

----------------------------------------------------------------------
 .../apache/airavata/data/manager/core/DataManagerImpl.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d8cb9658/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
index b7566ed..cdbf61f 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
@@ -55,6 +55,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.List;
 import java.util.Optional;
+import java.util.UUID;
 
 public class DataManagerImpl implements DataManager {
     private final static Logger logger = LoggerFactory.getLogger(DataManagerImpl.class);
@@ -358,8 +359,8 @@ public class DataManagerImpl implements DataManager {
         }
         SSHCredential sourceSshCredential = credentialStoreServiceClient.getSSHCredential(sourceCredentialStoreToken,
                 gatewayProfile.getGatewayID());
-        sourceJSch.addIdentity(sourceSshCredential.getPrivateKey(), sourceSshCredential.getPublicKey(),
sourceSshCredential.
-                getPassphrase().getBytes());
+        sourceJSch.addIdentity(UUID.randomUUID().toString(), sourceSshCredential.getPrivateKey().getBytes(),
+                sourceSshCredential.getPublicKey().getBytes(), sourceSshCredential.getPassphrase().getBytes());
         Session sourceSession = sourceJSch.getSession(sourceLoginUserName, sourceHostName,
sourcePort);
         String sourceFilePath = sourceReplica.getFileAbsolutePath();
 
@@ -379,8 +380,8 @@ public class DataManagerImpl implements DataManager {
         }
         SSHCredential destSshCredential = credentialStoreServiceClient.getSSHCredential(destCredentialStoreToken,
                 gatewayProfile.getGatewayID());
-        destJSch.addIdentity(destSshCredential.getPrivateKey(), destSshCredential.getPublicKey(),
destSshCredential.
-                getPassphrase().getBytes());
+        destJSch.addIdentity(UUID.randomUUID().toString(), destSshCredential.getPrivateKey().getBytes(),
+                destSshCredential.getPublicKey().getBytes(), destSshCredential.getPassphrase().getBytes());
         Session destSession = destJSch.getSession(destLoginUserName, destHostName, destPort);
         if(!destinationParentPath.endsWith(File.separator))
             destinationParentPath += File.separator;


Mime
View raw message