[PD2] some anotations on what to change in client
This commit is contained in:
parent
8f29d75d27
commit
247d2e73dc
1 changed files with 11 additions and 7 deletions
|
@ -107,6 +107,7 @@ func sendCommand(clientKeyStore cryptoUtils.KeyStore, plainSubject, plainBody, u
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIX: adapt to api
|
||||||
cl, err := networking.NewClient[protocol.Packet](&clientKeyStore)
|
cl, err := networking.NewClient[protocol.Packet](&clientKeyStore)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -117,14 +118,17 @@ func sendCommand(clientKeyStore cryptoUtils.KeyStore, plainSubject, plainBody, u
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
subject, err := clientKeyStore.EncryptMessageContent(receiverCert, plainSubjectBytes)
|
// NOTE: this will stay the same
|
||||||
|
subject, err := clientKeyStore.EncryptMessageContent(receiverCert, uid, plainSubjectBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
body, err := clientKeyStore.EncryptMessageContent(receiverCert, plainBodyBytes)
|
body, err := clientKeyStore.EncryptMessageContent(receiverCert, uid, plainBodyBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIX: adapt to api
|
||||||
sendMsgPacket := protocol.NewSendMsgPacket(uid, subject, body)
|
sendMsgPacket := protocol.NewSendMsgPacket(uid, subject, body)
|
||||||
if err := cl.Connection.Send(sendMsgPacket); err != nil {
|
if err := cl.Connection.Send(sendMsgPacket); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue