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