diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-11-02 14:00:17 +0100 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-11-02 14:09:45 +0100 |
commit | f15c031ef064e622100cb572afce5e96635114db (patch) | |
tree | cb6e9e3b1c7a90893c36f2c5c5c07906db8635dc /node-admin/src/test/java/com | |
parent | 13a0217c1d9c12ef3294fd9829170ffa5a72e757 (diff) |
Encapsulate key identifier in own object
Enforces invariants and avoids having to pass raw byte arrays around.
Diffstat (limited to 'node-admin/src/test/java/com')
-rw-r--r-- | node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/maintenance/coredump/CoredumpHandlerTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |