From 88632513c5f1e13c7fe3d9697614c4108ccb4d41 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Fri, 22 Apr 2022 20:02:17 +0000
Subject: [PATCH] Get both sides to the point where the ownership proof is
 verified and they are adding fingerprints for each other. Callback is still
 not quite working

---
 auth/confirm.go              | 4 ++--
 auth/receivedConfirm.go      | 8 +++++---
 cmix/message/fingerprints.go | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/auth/confirm.go b/auth/confirm.go
index 72d327cf1..d95658078 100644
--- a/auth/confirm.go
+++ b/auth/confirm.go
@@ -98,8 +98,8 @@ func (s *state) confirm(partner contact.Contact, serviceTag string) (
 		baseFmt.SetPubKey(dhPub)
 
 		jww.TRACE.Printf("SendConfirm PARTNERPUBKEY: %v",
-			partner.DhPubKey.Bytes())
-		jww.TRACE.Printf("SendConfirm MYPUBKEY: %v", dhPub.Bytes())
+			partner.DhPubKey.TextVerbose(16, 0))
+		jww.TRACE.Printf("SendConfirm MYPUBKEY: %v", dhPub.TextVerbose(16, 0))
 
 		jww.TRACE.Printf("SendConfirm ECRPAYLOAD: %v", baseFmt.GetEcrPayload())
 		jww.TRACE.Printf("SendConfirm MAC: %v", mac)
diff --git a/auth/receivedConfirm.go b/auth/receivedConfirm.go
index dd06dbbf1..202085d34 100644
--- a/auth/receivedConfirm.go
+++ b/auth/receivedConfirm.go
@@ -36,9 +36,11 @@ func (rcs *receivedConfirmService) Process(msg format.Message,
 		return
 	}
 
-	jww.TRACE.Printf("processing confirm: \n\t MYPUBKEY: %s "+
-		"\n\t PARTNERPUBKEY: %s \n\t ECRPAYLOAD: %s \n\t MAC: %s",
+	jww.TRACE.Printf("processing confirm: \n\t MYHISTORICALPUBKEY: %s\n\t"+
+		"MYPUBKEY: %s\n\t PARTNERPUBKEY: %s \n\t "+
+		"ECRPAYLOAD: %s \n\t MAC: %s",
 		state.e2e.GetHistoricalDHPubkey().TextVerbose(16, 0),
+		rcs.SentRequest.GetMyPubKey().TextVerbose(16, 0),
 		partnerPubKey.TextVerbose(16, 0),
 		base64.StdEncoding.EncodeToString(baseFmt.data),
 		base64.StdEncoding.EncodeToString(msg.GetMac()))
@@ -79,7 +81,7 @@ func (rcs *receivedConfirmService) Process(msg format.Message,
 
 	// check the ownership proof, this verifies the respondent owns the
 	// initial identity
-	if !cAuth.VerifyOwnershipProof(state.e2e.GetHistoricalDHPrivkey(),
+	if !cAuth.VerifyOwnershipProof(rcs.SentRequest.GetMyPrivKey(),
 		rcs.GetPartnerHistoricalPubKey(),
 		state.e2e.GetGroup(), ecrFmt.GetOwnership()) {
 		jww.WARN.Printf("Failed authenticate identity for auth "+
diff --git a/cmix/message/fingerprints.go b/cmix/message/fingerprints.go
index 071425109..bf6235b97 100644
--- a/cmix/message/fingerprints.go
+++ b/cmix/message/fingerprints.go
@@ -65,7 +65,7 @@ func (f *FingerprintsManager) pop(clientID *id.ID,
 // identity in the session
 func (f *FingerprintsManager) AddFingerprint(clientID *id.ID,
 	fingerprint format.Fingerprint, mp Processor) error {
-	jww.INFO.Printf("AddFingerprint: %s", fingerprint)
+	jww.TRACE.Printf("AddFingerprint: %s", fingerprint)
 	f.Lock()
 	defer f.Unlock()
 
-- 
GitLab