Replace zkgroup with libsignal-client
This commit is contained in:
parent
e4441dddbb
commit
73ea6e4251
|
@ -53,9 +53,9 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.signal</groupId>
|
||||
<artifactId>zkgroup-java</artifactId>
|
||||
<version>0.8.2</version>
|
||||
<groupId>org.whispersystems</groupId>
|
||||
<artifactId>signal-client-java</artifactId>
|
||||
<version>0.10.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.whispersystems</groupId>
|
||||
|
|
|
@ -703,7 +703,7 @@ public class SubscriptionController {
|
|||
this.receiptCredentialRequest = receiptCredentialRequest;
|
||||
}
|
||||
|
||||
@ExactlySize(ReceiptCredentialRequest.SIZE)
|
||||
@NotEmpty
|
||||
public byte[] getReceiptCredentialRequest() {
|
||||
return receiptCredentialRequest;
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ public class SubscriptionController {
|
|||
this.receiptCredentialResponse = receiptCredentialResponse;
|
||||
}
|
||||
|
||||
@ExactlySize(ReceiptCredentialResponse.SIZE)
|
||||
@NotEmpty
|
||||
public byte[] getReceiptCredentialResponse() {
|
||||
return receiptCredentialResponse;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ public class RedeemReceiptRequest {
|
|||
}
|
||||
|
||||
@NotEmpty
|
||||
@ExactlySize({ReceiptCredentialPresentation.SIZE})
|
||||
public byte[] getReceiptCredentialPresentation() {
|
||||
return receiptCredentialPresentation;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class IssuedReceiptsManagerTest {
|
|||
@Test
|
||||
void testRecordIssuance() {
|
||||
Instant now = Instant.ofEpochSecond(NOW_EPOCH_SECONDS);
|
||||
byte[] request1 = new byte[ReceiptCredentialRequest.SIZE];
|
||||
byte[] request1 = new byte[20];
|
||||
SECURE_RANDOM.nextBytes(request1);
|
||||
when(receiptCredentialRequest.serialize()).thenReturn(request1);
|
||||
CompletableFuture<Void> future = issuedReceiptsManager.recordIssuance("item-1", receiptCredentialRequest, now);
|
||||
|
@ -67,7 +67,7 @@ class IssuedReceiptsManagerTest {
|
|||
assertThat(future).succeedsWithin(Duration.ofSeconds(3));
|
||||
|
||||
// same item with new request should fail
|
||||
byte[] request2 = new byte[ReceiptCredentialRequest.SIZE];
|
||||
byte[] request2 = new byte[20];
|
||||
SECURE_RANDOM.nextBytes(request2);
|
||||
when(receiptCredentialRequest.serialize()).thenReturn(request2);
|
||||
future = issuedReceiptsManager.recordIssuance("item-1", receiptCredentialRequest, now);
|
||||
|
|
|
@ -119,7 +119,7 @@ class DonationControllerTest {
|
|||
receiptSerialBytes = new byte[ReceiptSerial.SIZE];
|
||||
SECURE_RANDOM.nextBytes(receiptSerialBytes);
|
||||
receiptSerial = new ReceiptSerial(receiptSerialBytes);
|
||||
presentation = new byte[ReceiptCredentialPresentation.SIZE];
|
||||
presentation = new byte[25];
|
||||
SECURE_RANDOM.nextBytes(presentation);
|
||||
receiptCredentialPresentationFactory = mock(DonationController.ReceiptCredentialPresentationFactory.class);
|
||||
receiptCredentialPresentation = mock(ReceiptCredentialPresentation.class);
|
||||
|
|
Loading…
Reference in New Issue