Skip to content

Commit

Permalink
add public keys to symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Jun 18, 2024
1 parent e5fb061 commit 86a3221
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/biscuitsec/biscuit/token/Biscuit.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ static Biscuit make(final SecureRandom rng, final KeyPair root, final Option<Int

KeyPair next = new KeyPair(rng);

for(PublicKey pk: authority.publicKeys) {
authority.symbols.insert(pk);
}

Either<Error.FormatError, SerializedBiscuit> container = SerializedBiscuit.make(root, root_key_id, authority, next);
if (container.isLeft()) {
throw container.getLeft();
Expand Down Expand Up @@ -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<Block> blocks = new ArrayList<>();
for (Block b : copiedBiscuit.blocks) {
blocks.add(b);
Expand Down

0 comments on commit 86a3221

Please sign in to comment.