mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Log warning on failure to set handshake public key
This commit is contained in:
@@ -29,6 +29,7 @@ import org.briarproject.briar.api.conversation.DeletionResult;
|
|||||||
import org.briarproject.briar.api.handshakekeyexchange.HandshakeKeyExchangeManager;
|
import org.briarproject.briar.api.handshakekeyexchange.HandshakeKeyExchangeManager;
|
||||||
import org.briarproject.briar.client.ConversationClientImpl;
|
import org.briarproject.briar.client.ConversationClientImpl;
|
||||||
|
|
||||||
|
import java.security.GeneralSecurityException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -163,8 +164,14 @@ public class HandshakeKeyExchangeManagerImpl extends ConversationClientImpl
|
|||||||
}
|
}
|
||||||
LOG.info("Adding contact's handshake public key");
|
LOG.info("Adding contact's handshake public key");
|
||||||
PublicKey handshakePublicKey = new AgreementPublicKey(body.getRaw(0));
|
PublicKey handshakePublicKey = new AgreementPublicKey(body.getRaw(0));
|
||||||
contactManager
|
|
||||||
.setHandshakePublicKey(txn, contactId, handshakePublicKey);
|
try {
|
||||||
|
contactManager
|
||||||
|
.setHandshakePublicKey(txn, contactId, handshakePublicKey);
|
||||||
|
} catch (GeneralSecurityException e) {
|
||||||
|
LOG.warning("Security exception when adding remote handshake public key");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user