From 23aa08bdf729c22ec060f5a4c828797bbd90a381 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Tue, 25 Jan 2022 21:57:21 +0000
Subject: [PATCH] Compare User IDs, not keys

---
 auth/callback.go | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/auth/callback.go b/auth/callback.go
index 4e947c0f6..c0acff7b6 100644
--- a/auth/callback.go
+++ b/auth/callback.go
@@ -165,7 +165,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
 		return
 	} else {
 		//check if the relationship already exists,
-		rType, sr2, _, err := m.storage.Auth().GetRequest(partnerID)
+		rType, _, _, err := m.storage.Auth().GetRequest(partnerID)
 		if err != nil && !strings.Contains(err.Error(), auth.NoRequest) {
 			// if another error is received, print it and exit
 			em := fmt.Sprintf("Received new Auth request for %s, "+
@@ -201,13 +201,9 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
 				}
 
 				// Check if I need to resend by comparing the
-				// SIDH Keys
-				mySIDH := sr2.GetMySIDHPubKey()
-				theirSIDH := partnerSIDHPubKey
-				myBytes := make([]byte, mySIDH.Size())
-				theirBytes := make([]byte, theirSIDH.Size())
-				mySIDH.Export(myBytes)
-				theirSIDH.Export(theirBytes)
+				// IDs
+				myBytes := m.storage.GetUser().ReceptionID.Bytes()
+				theirBytes := partnerID.Bytes()
 				for i := 0; i < len(myBytes); i++ {
 					if myBytes[i] > theirBytes[i] {
 						// OK, this side is dropping
-- 
GitLab