Skip to content
Snippets Groups Projects
Commit 2bbba3ff authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

added preimages to precanned e2e

parent 8836bfe6
No related branches found
No related tags found
3 merge requests!67Release,!60Hotfic/preimage,!55fully implemented trial hashing of identity fingerprints. Needs tests.
......@@ -12,6 +12,8 @@ import (
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/auth"
"gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/interfaces/preimage"
"gitlab.com/elixxir/client/storage/edge"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/primitives/id"
......@@ -103,6 +105,27 @@ func (c *Client) MakePrecannedAuthenticatedChannel(precannedID uint) (contact.Co
// the channel
c.network.CheckGarbledMessages()
//add the e2e and rekey firngeprints
//e2e
sessionPartner, err := c.storage.E2e().GetPartner(precan.ID)
if err != nil {
jww.FATAL.Panicf("Cannot find %s right after creating: %+v", precan.ID, err)
}
me := c.storage.GetUser().ReceptionID
c.storage.GetEdge().Add(edge.Preimage{
Data: sessionPartner.GetE2EPreimage(),
Type: preimage.E2e,
Source: precan.ID[:],
}, me)
//rekey
c.storage.GetEdge().Add(edge.Preimage{
Data: sessionPartner.GetRekeyPreimage(),
Type: preimage.Rekey,
Source: precan.ID[:],
}, me)
return precan, err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment