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

finished auth (no tests)

parent f6e604fa
No related branches found
No related tags found
3 merge requests!510Release,!207WIP: Client Restructure,!203Symmetric broadcast
...@@ -54,6 +54,7 @@ type State interface { ...@@ -54,6 +54,7 @@ type State interface {
// ratcheted // ratcheted
// The confirm sends as a critical message, if the round send on fails, it // The confirm sends as a critical message, if the round send on fails, it
// will be auto resent by the cmix client // will be auto resent by the cmix client
// This will not be useful if either side has ratcheted
ReplayConfirm(partner *id.ID) (id.Round, error) ReplayConfirm(partner *id.ID) (id.Round, error)
// ReplayRequests will iterate through all pending contact requests and replay // ReplayRequests will iterate through all pending contact requests and replay
......
...@@ -7,8 +7,8 @@ import ( ...@@ -7,8 +7,8 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/auth/store" "gitlab.com/elixxir/client/auth/store"
"gitlab.com/elixxir/client/cmix/rounds"
"gitlab.com/elixxir/client/cmix/identity/receptionID" "gitlab.com/elixxir/client/cmix/identity/receptionID"
"gitlab.com/elixxir/client/cmix/rounds"
"gitlab.com/elixxir/client/e2e/ratchet" "gitlab.com/elixxir/client/e2e/ratchet"
"gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/crypto/contact"
cAuth "gitlab.com/elixxir/crypto/e2e/auth" cAuth "gitlab.com/elixxir/crypto/e2e/auth"
...@@ -236,7 +236,7 @@ func (rrs *receivedRequestService) Process(message format.Message, ...@@ -236,7 +236,7 @@ func (rrs *receivedRequestService) Process(message format.Message,
//autoconfirm if we should //autoconfirm if we should
if autoConfirm || reset { if autoConfirm || reset {
_, _ = state.confirmRequestAuth(c, state.params.getConfirmTag(reset)) _, _ = state.confirm(c, state.params.getConfirmTag(reset))
//handle callbacks //handle callbacks
if autoConfirm { if autoConfirm {
state.callbacks.Confirm(c, receptionID, round) state.callbacks.Confirm(c, receptionID, round)
......
...@@ -2,7 +2,16 @@ package auth ...@@ -2,7 +2,16 @@ package auth
import "gitlab.com/xx_network/primitives/id" import "gitlab.com/xx_network/primitives/id"
//todo implement replay confirm // ReplayConfirm is used to resend a confirm
func (s *state) ReplayConfirm(partner *id.ID) (id.Round, error) { func (s *state) ReplayConfirm(partner *id.ID) (id.Round, error) {
return 0, nil
confirmPayload, mac, keyfp, err := s.store.LoadConfirmation(partner)
if err != nil {
return 0, err
}
rid, err := sendAuthConfirm(s.net, partner, keyfp,
confirmPayload, mac, s.event, s.params.ResetConfirmTag)
return rid, err
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment