diff options
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java')
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java index 5cae49b..f716077 100644 --- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java +++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java @@ -29,6 +29,7 @@ import org.openslx.imagemaster.thrift.iface.UploadError; import org.openslx.imagemaster.thrift.iface.UploadException; import org.openslx.imagemaster.thrift.iface.UserInfo; import org.openslx.satellitedaemon.Globals; +import org.openslx.satellitedaemon.Identity; import org.openslx.satellitedaemon.db.DbImage; import org.openslx.satellitedaemon.db.DbImage.Status; @@ -206,16 +207,16 @@ public class ThriftConnection if ( !isAuthenticated ) { try { ByteBuffer tmpBuffer = theClient - .startServerAuthentication( Globals + .startServerAuthentication( Identity .getOrganizationName() ); byte[] toEncrypt = new byte[ tmpBuffer.remaining() ]; tmpBuffer.get( toEncrypt ); AsymEncryptionHandler aeh = new AsymEncryptionHandler( - Globals.getPrivateKey() ); + Identity.getPrivateKey() ); byte[] byteArray = aeh.encryptMessage( toEncrypt ); sSD = theClient.serverAuthenticate( - Globals.getOrganizationName(), + Identity.getOrganizationName(), ByteBuffer.wrap( byteArray ) ); } catch ( AuthenticationException e ) { log.error( "ThriftConnection: AuthenticationException: Server Authetication was not sucessful.", e ); @@ -253,8 +254,9 @@ public class ThriftConnection client.set( newClient ); return newClient; } - - public static boolean publishUser(UserInfo userInfo) { + + public static boolean publishUser( UserInfo userInfo ) + { ImageServer.Client theClient = null; theClient = getConnection(); if ( theClient == null ) { |