Skip to content

Commit

Permalink
Update TDF.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleene authored Nov 26, 2024
1 parent 2b178c2 commit b30a3bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/src/main/java/io/opentdf/platform/sdk/TDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ public TDFObject createTDF(InputStream payload,
tdfConfig.attributes.toArray(new AttributeValueFQN[0]));
}

if (granter == null) {
throw new AutoConfigureException("Failed to create Granter"); // Replace with appropriate error handling
}

List<String> dk = defaultKases(tdfConfig);
tdfConfig.splitPlan = granter.plan(dk, () -> UUID.randomUUID().toString());

Expand Down

0 comments on commit b30a3bf

Please sign in to comment.