Skip to content

Commit

Permalink
Ensure encryption is over the signed fields, not the raw fields (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkwdwrd committed Feb 6, 2021
1 parent 0eb86c8 commit 04131e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ func (c *ToznySDKV3) GenerateRealmBrokerNoteToken(ctx context.Context, broker id
}
// Encrypt the signed note and add the encrypted version of the access
// key to the note for the reader to be able to decrypt the note
encryptedNoteBody := e3dbClients.EncryptData(rawNoteBody, accessKey)
encryptedNoteBody := e3dbClients.EncryptData(signedNote.Data, accessKey)
signedNote.Data = *encryptedNoteBody
signedNote.EncryptedAccessKey = encryptedAccessKey
// Write the broker note
Expand Down

0 comments on commit 04131e8

Please sign in to comment.