Skip to content

Commit 26016f3

Browse files
committed
remove condition we do not need
1 parent 491cbf3 commit 26016f3

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

sdk/src/main/java/io/opentdf/platform/sdk/Planner.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ Map<String, List<Config.KASInfo>> resolveKeys(List<Autoconfigure.KeySplitStep> s
162162
logger.info("no public key provided for KAS at {}, retrieving", splitInfo.kas);
163163
var getKI = new Config.KASInfo();
164164
getKI.URL = splitInfo.kas;
165-
if (!tdfConfig.autoconfigure) {
166-
getKI.Algorithm = tdfConfig.wrappingKeyType.toString();
167-
}
165+
getKI.Algorithm = tdfConfig.wrappingKeyType.toString();
168166
getKI.KID = splitInfo.kid;
169167
getKI = services.kas().getPublicKey(getKI);
170168
latestKASInfo.put(splitInfo.kas, getKI);

sdk/src/test/java/io/opentdf/platform/sdk/PlannerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ void testFillingInKeysWithAutoConfigure() {
9595
Config.KASInfo kasInfo = invocation.getArgument(0, Config.KASInfo.class);
9696
var ret = new Config.KASInfo();
9797
ret.URL = kasInfo.URL;
98-
assertThat(kasInfo.Algorithm).isNullOrEmpty();
9998
if (Objects.equals(kasInfo.URL, "https://kas1.example.com")) {
10099
ret.PublicKey = "pem1";
101100
ret.Algorithm = "rsa:2048";

0 commit comments

Comments
 (0)