mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +01:00
Fix bug with localKeypair being generated twice
This commit is contained in:
@@ -30,7 +30,6 @@ public class SecretOwnerTaskImpl extends ReturnShardTaskImpl
|
|||||||
implements SecretOwnerTask {
|
implements SecretOwnerTask {
|
||||||
|
|
||||||
// private final Executor ioExecutor;
|
// private final Executor ioExecutor;
|
||||||
private final KeyPair localKeyPair;
|
|
||||||
private boolean cancelled = false;
|
private boolean cancelled = false;
|
||||||
private InetSocketAddress socketAddress;
|
private InetSocketAddress socketAddress;
|
||||||
private ClientHelper clientHelper;
|
private ClientHelper clientHelper;
|
||||||
@@ -51,7 +50,6 @@ public class SecretOwnerTaskImpl extends ReturnShardTaskImpl
|
|||||||
this.clientHelper = clientHelper;
|
this.clientHelper = clientHelper;
|
||||||
// this.streamReaderFactory = streamReaderFactory;
|
// this.streamReaderFactory = streamReaderFactory;
|
||||||
// this.streamWriterFactory = streamWriterFactory;
|
// this.streamWriterFactory = streamWriterFactory;
|
||||||
localKeyPair = crypto.generateAgreementKeyPair();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -139,11 +137,11 @@ public class SecretOwnerTaskImpl extends ReturnShardTaskImpl
|
|||||||
|
|
||||||
observer.onStateChanged(new State.Success());
|
observer.onStateChanged(new State.Success());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.warning("IO Error receiving payload" + e.getMessage());
|
LOG.warning("IO Error receiving payload " + e.getMessage());
|
||||||
// TODO reasons
|
// TODO reasons
|
||||||
observer.onStateChanged(new State.Failure());
|
observer.onStateChanged(new State.Failure());
|
||||||
} catch (GeneralSecurityException e) {
|
} catch (GeneralSecurityException e) {
|
||||||
LOG.warning("Security Error receiving payload" + e.getMessage());
|
LOG.warning("Security Error receiving payload " + e.getMessage());
|
||||||
observer.onStateChanged(new State.Failure());
|
observer.onStateChanged(new State.Failure());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user