Fixed incomplete agreement
This commit is contained in:
parent
f2cea164ae
commit
71c2a48a1f
@ -65,6 +65,9 @@ public class DHExchange {
|
||||
agreement.init(keyPair.getPrivate());
|
||||
|
||||
thisPublicKey = keyPair.getPublic();
|
||||
agreement.doPhase(otherPublicKey, true);
|
||||
|
||||
generateSecret();
|
||||
|
||||
} catch (NoSuchAlgorithmException | InvalidKeySpecException | InvalidAlgorithmParameterException | InvalidKeyException e) {
|
||||
e.printStackTrace();
|
||||
@ -80,6 +83,7 @@ public class DHExchange {
|
||||
logger.log(Level.INFO, "Agreement phase...");
|
||||
agreement.doPhase(otherPublicKey, true);
|
||||
|
||||
generateSecret();
|
||||
} catch (NoSuchAlgorithmException | InvalidKeySpecException | InvalidKeyException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user