diff options
author | Michael Petretti | 2014-08-26 16:15:16 +0200 |
---|---|---|
committer | Michael Petretti | 2014-08-26 16:15:16 +0200 |
commit | 77ea24ceae1c070e0276736398dfb2e41de5e714 (patch) | |
tree | 7eee63e2f0174ef20be1a9a6033a6ff598f7fea1 /src | |
parent | changed static to nonstatic un db class (diff) | |
download | satellite-daemon-77ea24ceae1c070e0276736398dfb2e41de5e714.tar.gz satellite-daemon-77ea24ceae1c070e0276736398dfb2e41de5e714.tar.xz satellite-daemon-77ea24ceae1c070e0276736398dfb2e41de5e714.zip |
Authentication is now working again.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/Globals.java | 3 | ||||
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/Globals.java b/src/main/java/org/openslx/satellitedaemon/Globals.java index 38be1f3..fd8458d 100644 --- a/src/main/java/org/openslx/satellitedaemon/Globals.java +++ b/src/main/java/org/openslx/satellitedaemon/Globals.java @@ -67,9 +67,6 @@ public class Globals { } // Integers // - public static int getFiletransferPort() { - return tryToParseInt(properties.getProperty("FILETRANSFER_PORT")); - } public static int getThriftPort() { return tryToParseInt(properties.getProperty("THRIFT_PORT")); diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java index ed08c85..c77d6d6 100644 --- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java +++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java @@ -83,6 +83,7 @@ public class ThriftConnection { } catch (ImageDataException e) { if (e.isSetNumber() && e.getNumber().equals(ImageDataError.INVALID_DATA)) { + e.printStackTrace(); // Data in the db is not valid // TODO: add e.message into DB; } else { @@ -356,11 +357,15 @@ public class ThriftConnection { toEncrypt = theClient.startServerAuthentication(Globals .getOrganizationName()); log.info("The random String we want to encrypt: " + toEncrypt); + log.info("Length of the random String : " + toEncrypt.length()); EncryptWithServerIdPublicKey rse = new EncryptWithServerIdPublicKey( Globals.getThriftKeystoreAlias(), Globals.getThriftKeystorePassword(), Globals.getThriftKeystorePath()); byte[] byteArray = rse.encryptString(toEncrypt); + log.info( "Length of the byteArray of the random string after encryption :" + byteArray.length ); + ByteBuffer b = ByteBuffer.wrap( byteArray ); + log.info( "Length of the byteBuffer after encryption :" + b.remaining() ); sSD = theClient.serverAuthenticate( Globals.getOrganizationName(), ByteBuffer.wrap(byteArray)); |