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

Use modified getcontents on reception

parent b1010204
No related branches found
No related tags found
2 merge requests!170Release,!120Add 0 byte to message contents
......@@ -54,17 +54,18 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
var relationshipFingerprint []byte
//if it exists, check against all in the list
has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), append([]byte{0}, ecrMsg.GetContents()...))
modifiedContents := append([]byte{0}, ecrMsg.GetContents()...)
has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), modifiedContents)
if !has {
jww.INFO.Printf("checking backup %v", preimage.MakeDefault(identity.Source))
//if it doesnt exist, check against the default fingerprint for the identity
forMe = fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(),
ecrMsg.GetContents(), preimage.MakeDefault(identity.Source))
modifiedContents, preimage.MakeDefault(identity.Source))
}
if !forMe {
if jww.GetLogThreshold() == jww.LevelTrace {
expectedFP := fingerprint2.IdentityFP(ecrMsg.GetContents(),
expectedFP := fingerprint2.IdentityFP(modifiedContents,
preimage.MakeDefault(identity.Source))
jww.TRACE.Printf("Message for %d (%s) failed identity "+
"check: %v (expected-default) vs %v (received)", identity.EphId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment