libsignal-service-java/update-kbs-settings.patch

39 lines
1.6 KiB
Diff
Raw Normal View History

2022-12-20 20:45:54 +00:00
From d432b9234521947d7bb07434f69a30b407700f5c Mon Sep 17 00:00:00 2001
From: Greyson Parrelli <greyson@signal.org>
Date: Thu, 20 Oct 2022 13:12:27 -0400
Subject: [PATCH 2/2] [Signal-Android] Updated KBS settings.
9941ffe79c2508eb9b1f1fa78b47b84c465d1199
---
.../internal/contacts/crypto/RemoteAttestationCipher.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/service/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/RemoteAttestationCipher.java b/service/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/RemoteAttestationCipher.java
index 05073edf..32e86c70 100644
--- a/service/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/RemoteAttestationCipher.java
+++ b/service/src/main/java/org/whispersystems/signalservice/internal/contacts/crypto/RemoteAttestationCipher.java
@@ -24,6 +24,11 @@ import java.util.Set;
public final class RemoteAttestationCipher {
+ private static final Set<String> ALLOWED_ADVISORIES = new HashSet<String>() {{
+ add("INTEL-SA-00334");
+ add("INTEL-SA-00615");
+ }};
+
private RemoteAttestationCipher() {
}
@@ -100,7 +105,7 @@ public final class RemoteAttestationCipher {
if ("OK".equals(entity.getIsvEnclaveQuoteStatus())) {
return true;
} else if ("SW_HARDENING_NEEDED".equals(entity.getIsvEnclaveQuoteStatus())) {
- return entity.getAdvisoryIds().length == 1 && "INTEL-SA-00334".equals(entity.getAdvisoryIds()[0]);
+ return Arrays.stream(entity.getAdvisoryIds()).allMatch(ALLOWED_ADVISORIES::contains);
} else {
return false;
}
--
2.30.2