Skip to content
Snippets Groups Projects
Commit 1f6e3d8f authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add more debug info

parent 29348f4c
Branches
Tags
1 merge request!23Release
...@@ -87,16 +87,20 @@ func (m *Manager) handleRequest(cmixMsg format.Message, ...@@ -87,16 +87,20 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
myPubKey := diffieHellman.GeneratePublicKey(myHistoricalPrivKey, grp) myPubKey := diffieHellman.GeneratePublicKey(myHistoricalPrivKey, grp)
jww.TRACE.Printf("handleRequest MYPUBKEY: %v", myPubKey.Bytes()) jww.INFO.Printf("handleRequest MYPUBKEY: %v", myPubKey.Bytes())
jww.TRACE.Printf("handleRequest PARTNERPUBKEY: %v", partnerPubKey.Bytes()) jww.INFO.Printf("handleRequest PARTNERPUBKEY: %v", partnerPubKey.Bytes())
//decrypt the message //decrypt the message
jww.INFO.Printf("handleRequest SALT: %v", baseFmt.GetSalt())
jww.INFO.Printf("handleRequest ECRPAYLOAD: %v", baseFmt.GetEcrPayload())
jww.INFO.Printf("handleRequest MAC: %v", cmixMsg.GetMac())
success, payload := cAuth.Decrypt(myHistoricalPrivKey, success, payload := cAuth.Decrypt(myHistoricalPrivKey,
partnerPubKey, baseFmt.GetSalt(), baseFmt.GetEcrPayload(), partnerPubKey, baseFmt.GetSalt(), baseFmt.GetEcrPayload(),
cmixMsg.GetMac(), grp) cmixMsg.GetMac(), grp)
if !success { if !success {
jww.WARN.Printf("Recieved auth request failed " + jww.WARN.Printf("Received auth request failed " +
"its mac check") "its mac check")
return return
} }
...@@ -151,7 +155,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message, ...@@ -151,7 +155,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
switch rType { switch rType {
// if this is a duplicate, ignore the message // if this is a duplicate, ignore the message
case auth.Receive: case auth.Receive:
jww.WARN.Printf("Recieved new Auth request for %s, "+ jww.WARN.Printf("Received new Auth request for %s, "+
"is a duplicate", partnerID) "is a duplicate", partnerID)
return return
// if we sent a request, then automatically confirm // if we sent a request, then automatically confirm
...@@ -226,16 +230,19 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest, ...@@ -226,16 +230,19 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest,
return return
} }
jww.TRACE.Printf("handleConfirm PARTNERPUBKEY: %v", partnerPubKey.Bytes()) jww.INFO.Printf("handleConfirm PARTNERPUBKEY: %v", partnerPubKey.Bytes())
jww.TRACE.Printf("handleConfirm SRMYPUBKEY: %v", sr.GetMyPubKey().Bytes()) jww.INFO.Printf("handleConfirm SRMYPUBKEY: %v", sr.GetMyPubKey().Bytes())
// decrypt the payload // decrypt the payload
jww.INFO.Printf("handleConfirm SALT: %v", baseFmt.GetSalt())
jww.INFO.Printf("handleConfirm ECRPAYLOAD: %v", baseFmt.GetEcrPayload())
jww.INFO.Printf("handleConfirm MAC: %v", cmixMsg.GetMac())
success, payload := cAuth.Decrypt(sr.GetMyPrivKey(), success, payload := cAuth.Decrypt(sr.GetMyPrivKey(),
partnerPubKey, baseFmt.GetSalt(), baseFmt.GetEcrPayload(), partnerPubKey, baseFmt.GetSalt(), baseFmt.GetEcrPayload(),
cmixMsg.GetMac(), grp) cmixMsg.GetMac(), grp)
if !success { if !success {
jww.WARN.Printf("Recieved auth confirmation failed its mac " + jww.WARN.Printf("Received auth confirmation failed its mac " +
"check") "check")
m.storage.Auth().Done(sr.GetPartner()) m.storage.Auth().Done(sr.GetPartner())
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment