From f15c031ef064e622100cb572afce5e96635114db Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Wed, 2 Nov 2022 14:00:17 +0100 Subject: Encapsulate key identifier in own object Enforces invariants and avoids having to pass raw byte arrays around. --- .../hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'node-admin') diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java index 1d53f0974ab..fb6aabb2081 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.node.admin.maintenance.coredump; +import com.yahoo.security.KeyId; import com.yahoo.security.SealedSharedKey; import com.yahoo.security.SecretSharedKey; import com.yahoo.test.ManualClock; @@ -303,7 +304,7 @@ public class CoredumpHandlerTest { private static SecretSharedKey makeFixedSecretSharedKey() { byte[] keyBytes = bytesOf("very secret yes!"); // 128 bits var secretKey = new SecretKeySpec(keyBytes, "AES"); - byte[] keyId = bytesOf("the shiniest key"); + var keyId = KeyId.ofString("the shiniest key"); // We don't parse any of these fields in the test, so just use dummy contents. byte[] enc = bytesOf("hello world"); byte[] ciphertext = bytesOf("imaginary ciphertext"); -- cgit v1.2.3