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

fixed request fingerprints

parent e2780ba2
Branches
Tags
No related merge requests found
...@@ -114,14 +114,15 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, ...@@ -114,14 +114,15 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader,
ecrFmt.SetOwnership(ownership) ecrFmt.SetOwnership(ownership)
ecrPayload, mac := cAuth.Encrypt(newPrivKey, partner.DhPubKey, ecrPayload, mac := cAuth.Encrypt(newPrivKey, partner.DhPubKey,
salt, ecrFmt.data, grp) salt, ecrFmt.data, grp)
fp := cAuth.MakeOwnershipProofFP(ownership) confirmFp := cAuth.MakeOwnershipProofFP(ownership)
requestfp := cAuth.MakeRequestFingerprint(partner.DhPubKey)
/*construct message*/ /*construct message*/
baseFmt.SetEcrPayload(ecrPayload) baseFmt.SetEcrPayload(ecrPayload)
baseFmt.SetSalt(salt) baseFmt.SetSalt(salt)
baseFmt.SetPubKey(newPubKey) baseFmt.SetPubKey(newPubKey)
cmixMsg.SetKeyFP(fp) cmixMsg.SetKeyFP(requestfp)
cmixMsg.SetMac(mac) cmixMsg.SetMac(mac)
cmixMsg.SetContents(baseFmt.Marshal()) cmixMsg.SetContents(baseFmt.Marshal())
cmixMsg.SetRecipientID(partner.ID) cmixMsg.SetRecipientID(partner.ID)
...@@ -131,7 +132,7 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, ...@@ -131,7 +132,7 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader,
//fixme: channel is bricked if the first store succedes but the second fails //fixme: channel is bricked if the first store succedes but the second fails
//store the in progress auth //store the in progress auth
err = storage.Auth().AddSent(partner.ID, partner.DhPubKey, newPrivKey, err = storage.Auth().AddSent(partner.ID, partner.DhPubKey, newPrivKey,
newPrivKey, fp) newPrivKey, confirmFp)
if err != nil { if err != nil {
return errors.Errorf("Failed to store auth request: %s", err) return errors.Errorf("Failed to store auth request: %s", err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment