airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject airavata git commit: To remove dependency of ncsa BouncyCastle.
Date Tue, 02 Dec 2014 17:39:09 GMT
Repository: airavata
Updated Branches:
  refs/heads/master d831b8f7c -> 6f8973685


To remove dependency of ncsa BouncyCastle. 

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

Branch: refs/heads/master
Commit: 6f8973685dad8dd671f508578798a6ef47f52394
Parents: d831b8f
Author: raminder <raminder@apache.org>
Authored: Tue Dec 2 12:38:49 2014 -0500
Committer: raminder <raminder@apache.org>
Committed: Tue Dec 2 12:38:49 2014 -0500

----------------------------------------------------------------------
 modules/gfac/gfac-monitor/pom.xml               |  9 +----
 .../airavata/gfac/monitor/util/X509Helper.java  | 35 +++++++++++---------
 2 files changed, 20 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6f897368/modules/gfac/gfac-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/pom.xml b/modules/gfac/gfac-monitor/pom.xml
index 8893342..29f6797 100644
--- a/modules/gfac/gfac-monitor/pom.xml
+++ b/modules/gfac/gfac-monitor/pom.xml
@@ -72,9 +72,7 @@
             <artifactId>airavata-credential-store</artifactId>
             <version>${project.version}</version>
         </dependency>
-
-
-        <!-- Test -->
+	    <!-- Test -->
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
@@ -130,11 +128,6 @@
             <version>0.1.50</version>
         </dependency>
         <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>bcgss</artifactId>
-            <version>146</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.xmlbeans</groupId>
             <artifactId>xmlbeans</artifactId>
             <version>${xmlbeans.version}</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6f897368/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
index c29490a..08c3f67 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/X509Helper.java
@@ -23,7 +23,7 @@ package org.apache.airavata.gfac.monitor.util;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
-import org.bouncycastle.openssl.PEMReader;
+
 
 import java.io.*;
 import java.security.*;
@@ -83,13 +83,13 @@ public class X509Helper {
         //System.out.println(privKeyPEM);
 
         // using BouncyCastle
-        PEMReader pemParser = new PEMReader(new StringReader(privKeyPEM));
-        Object object = pemParser.readObject();
-
-        PrivateKey privKey = null;
-        if(object instanceof KeyPair){
-            privKey = ((KeyPair)object).getPrivate();
-        }
+//        PEMReader pemParser = new PEMReader(new StringReader(privKeyPEM));
+//        Object object = pemParser.readObject();
+//
+//        PrivateKey privKey = null;
+//        if(object instanceof KeyPair){
+//            privKey = ((KeyPair)object).getPrivate();
+//        }
         // PEMParser from BouncyCastle is good for reading PEM files, but I didn't want to
add that dependency
         /*
         // Base64 decode the data
@@ -103,16 +103,19 @@ public class X509Helper {
         */
         //System.out.println(privKey.toString());
 
-        KeyStore keyStore = KeyStore.getInstance("PKCS12");
-        keyStore.load(null,null);
+//        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+//        keyStore.load(null,null);
+//
+//        KeyStore.PrivateKeyEntry entry =
+//            new KeyStore.PrivateKeyEntry(privKey,
+//                                         new java.security.cert.Certificate[] {(java.security.cert.Certificate)cert});
+//        KeyStore.PasswordProtection prot = new KeyStore.PasswordProtection(keyPassPhrase.toCharArray());
+//        keyStore.setEntry(cert.getSubjectX500Principal().getName(), entry, prot);
 
-        KeyStore.PrivateKeyEntry entry =
-            new KeyStore.PrivateKeyEntry(privKey,
-                                         new java.security.cert.Certificate[] {(java.security.cert.Certificate)cert});
-        KeyStore.PasswordProtection prot = new KeyStore.PasswordProtection(keyPassPhrase.toCharArray());
-        keyStore.setEntry(cert.getSubjectX500Principal().getName(), entry, prot);
+//        return keyStore;
+        //TODO: Problem with BouncyCastle version used in gsissh 
+        throw new CertificateException("Method not implemented");
 
-        return keyStore;
     }
 
 


Mime
View raw message