accept encrypted username with confirm-username-hash requests

This commit is contained in:
Jonathan Klabunde Tomer authored and GitHub committed 2023-07-19 10:54:11 -07:00
1 parent ade2e9c6cf
commit 67343f6bdc
11 files changed
+175 -64

No files matched your search

@@ -18,6 +18,7 @@ import org.signal.libsignal.usernames.Username;
import org.whispersystems.textsecuregcm.entities.AccountIdentifierResponse;
import org.whispersystems.textsecuregcm.entities.AccountIdentityResponse;
import org.whispersystems.textsecuregcm.entities.ConfirmUsernameHashRequest;
import org.whispersystems.textsecuregcm.entities.EncryptedUsername;
import org.whispersystems.textsecuregcm.entities.ReserveUsernameHashRequest;
import org.whispersystems.textsecuregcm.entities.ReserveUsernameHashResponse;
import org.whispersystems.textsecuregcm.entities.UsernameHashResponse;
@@ -87,9 +88,10 @@ public class AccountTest {
.orElseThrow();
// confirm a username
final ConfirmUsernameHashRequest confirmUsernameHashRequest = new ConfirmUsernameHashRequest(
final ConfirmUsernameHashRequest confirmUsernameHashRequest = new ConfirmUsernameHashRequest(
reservedUsername.getHash(),
reservedUsername.generateProof()
reservedUsername.generateProof(),
new EncryptedUsername("cluck cluck i'm a parrot".getBytes())
);
// try unauthorized
Operations