From 86a3221cbbb558f181e7f4e130b0c0904508f033 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Tue, 18 Jun 2024 23:44:45 +0200 Subject: [PATCH] add public keys to symbols --- src/main/java/org/biscuitsec/biscuit/token/Biscuit.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/biscuitsec/biscuit/token/Biscuit.java b/src/main/java/org/biscuitsec/biscuit/token/Biscuit.java index f68b3ebf..efb03f92 100644 --- a/src/main/java/org/biscuitsec/biscuit/token/Biscuit.java +++ b/src/main/java/org/biscuitsec/biscuit/token/Biscuit.java @@ -95,6 +95,10 @@ static Biscuit make(final SecureRandom rng, final KeyPair root, final Option container = SerializedBiscuit.make(root, root_key_id, authority, next); if (container.isLeft()) { throw container.getLeft(); @@ -342,6 +346,10 @@ public Biscuit attenuate(final SecureRandom rng, final KeyPair keypair, Block bl symbols.add(s); } + for(PublicKey pk: block.publicKeys) { + symbols.insert(pk); + } + ArrayList blocks = new ArrayList<>(); for (Block b : copiedBiscuit.blocks) { blocks.add(b);