Skip to content
Snippets Groups Projects
Commit 82d7c69b authored by Jonah Husson's avatar Jonah Husson
Browse files

Merge branch 'restructure' of git.xx.network:elixxir/client into restructure

parents 79cbc843 74573154
Branches
Tags
3 merge requests!510Release,!207WIP: Client Restructure,!203Symmetric broadcast
......@@ -12,7 +12,6 @@ import (
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/catalog"
"gitlab.com/elixxir/client/e2e/ratchet/partner"
session "gitlab.com/elixxir/client/e2e/ratchet/partner/session"
"gitlab.com/elixxir/client/event"
......@@ -28,7 +27,7 @@ import (
func CheckKeyExchanges(instance *commsNetwork.Instance, grp *cyclic.Group,
sendE2E E2eSender, events event.Manager, manager *partner.Manager,
sendTimeout time.Duration) {
param Params, sendTimeout time.Duration) {
//get all sessions that may need a key exchange
sessions := manager.TriggerNegotiations()
......@@ -36,7 +35,7 @@ func CheckKeyExchanges(instance *commsNetwork.Instance, grp *cyclic.Group,
//start an exchange for every session that needs one
for _, sess := range sessions {
go trigger(instance, grp, sendE2E, events, manager, sess,
sendTimeout)
sendTimeout, param)
}
}
......@@ -46,7 +45,7 @@ func CheckKeyExchanges(instance *commsNetwork.Instance, grp *cyclic.Group,
// session while the latter on an extant session
func trigger(instance *commsNetwork.Instance, grp *cyclic.Group, sendE2E E2eSender,
events event.Manager, manager *partner.Manager, inputSession *session.Session,
sendTimeout time.Duration) {
sendTimeout time.Duration, params Params) {
var negotiatingSession *session.Session
jww.INFO.Printf("[REKEY] Negotiation triggered for session %s with "+
......@@ -81,7 +80,7 @@ func trigger(instance *commsNetwork.Instance, grp *cyclic.Group, sendE2E E2eSend
}
// send the rekey notification to the partner
err := negotiate(instance, grp, sendE2E, negotiatingSession,
err := negotiate(instance, grp, sendE2E, params, negotiatingSession,
sendTimeout)
// if sending the negotiation fails, revert the state of the session to
......
......@@ -89,7 +89,7 @@ func (m *manager) sendE2E(mt catalog.MessageType, recipient *id.ID,
return m.SendE2E(mt, recipient, payload, par)
}
rekey.CheckKeyExchanges(m.net.GetInstance(), m.grp, rekeySendFunc,
m.events, partner, 1*time.Minute)
m.events, partner, m.rekeyParams, 1*time.Minute)
}
//get a key to end to end encrypt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment