Add invitation to user message and comment out debug print statements
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -155,6 +155,7 @@ func (p *Peer) BuildInvitationAnswerMessage(myContactCard *meowlib.ContactCard)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	invitation.Payload = out
 | 
						invitation.Payload = out
 | 
				
			||||||
	msg.Destination = p.ContactLookupKey
 | 
						msg.Destination = p.ContactLookupKey
 | 
				
			||||||
 | 
						msg.Invitation = &invitation
 | 
				
			||||||
	msg.From = p.MyIdentity.Public
 | 
						msg.From = p.MyIdentity.Public
 | 
				
			||||||
	msg.Type = "1"
 | 
						msg.Type = "1"
 | 
				
			||||||
	return &msg, nil
 | 
						return &msg, nil
 | 
				
			||||||
@@ -184,10 +185,10 @@ func (p *Peer) DeserializeUserMessage(data []byte) (*meowlib.UserMessage, error)
 | 
				
			|||||||
// AsymEncryptMessage prepares a message to send to a specific peer contact
 | 
					// AsymEncryptMessage prepares a message to send to a specific peer contact
 | 
				
			||||||
func (p *Peer) AsymEncryptMessage(Message []byte) (*meowlib.EncryptedMessage, error) {
 | 
					func (p *Peer) AsymEncryptMessage(Message []byte) (*meowlib.EncryptedMessage, error) {
 | 
				
			||||||
	var enc *meowlib.EncryptedMessage
 | 
						var enc *meowlib.EncryptedMessage
 | 
				
			||||||
	fmt.Println("[AsymEncryptMessage] Destination is:", p.ContactLookupKey)
 | 
						// fmt.Println("[AsymEncryptMessage] Destination is:", p.ContactLookupKey)
 | 
				
			||||||
	fmt.Println("[AsymEncryptMessage] Contact encryption key is:", p.ContactEncryption)
 | 
						// fmt.Println("[AsymEncryptMessage] Contact encryption key is:", p.ContactEncryption)
 | 
				
			||||||
	fmt.Println("[AsymEncryptMessage] My signing key is:", p.MyIdentity.Private)
 | 
						// fmt.Println("[AsymEncryptMessage] My signing key is:", p.MyIdentity.Private)
 | 
				
			||||||
	fmt.Println("[AsymEncryptMessage] Signature should be verified with:", p.MyIdentity.Public)
 | 
						// fmt.Println("[AsymEncryptMessage] Signature should be verified with:", p.MyIdentity.Public)
 | 
				
			||||||
	enc, err := meowlib.AsymEncryptAndSign(p.ContactEncryption, p.MyIdentity.Private, Message)
 | 
						enc, err := meowlib.AsymEncryptAndSign(p.ContactEncryption, p.MyIdentity.Private, Message)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		fmt.Println(err.Error())
 | 
							fmt.Println(err.Error())
 | 
				
			||||||
@@ -198,9 +199,9 @@ func (p *Peer) AsymEncryptMessage(Message []byte) (*meowlib.EncryptedMessage, er
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// AsymDecryptMessage reads a message from a specific peer contact
 | 
					// AsymDecryptMessage reads a message from a specific peer contact
 | 
				
			||||||
func (p *Peer) AsymDecryptMessage(Message []byte, Signature []byte) (DecryptedMessage []byte, err error) {
 | 
					func (p *Peer) AsymDecryptMessage(Message []byte, Signature []byte) (DecryptedMessage []byte, err error) {
 | 
				
			||||||
	fmt.Println("[AsymDecryptMessage] Decrypting key is:", p.MyEncryptionKp.Private)
 | 
						// fmt.Println("[AsymDecryptMessage] Decrypting key is:", p.MyEncryptionKp.Private)
 | 
				
			||||||
	fmt.Println("[AsymDecryptMessage] Should have been encrypted with:", p.MyEncryptionKp.Public)
 | 
						// fmt.Println("[AsymDecryptMessage] Should have been encrypted with:", p.MyEncryptionKp.Public)
 | 
				
			||||||
	fmt.Println("[AsymDecryptMessage] Signature will be verified with:", p.ContactPublicKey)
 | 
						// fmt.Println("[AsymDecryptMessage] Signature will be verified with:", p.ContactPublicKey)
 | 
				
			||||||
	DecryptedMessage, err = meowlib.AsymDecryptAndCheck(p.MyEncryptionKp.Private, p.ContactPublicKey, Message, Signature)
 | 
						DecryptedMessage, err = meowlib.AsymDecryptAndCheck(p.MyEncryptionKp.Private, p.ContactPublicKey, Message, Signature)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		fmt.Println(err.Error())
 | 
							fmt.Println(err.Error())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user