From 0b13371165a7180e2f0207ac25b5bab8305a4088 Mon Sep 17 00:00:00 2001 From: perrze Date: Wed, 3 Apr 2024 10:03:58 +0200 Subject: [PATCH] Adding tests for secure keys feature --- tests/functional/tests.d/330-selfkeys.sh | 64 +++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/tests/functional/tests.d/330-selfkeys.sh b/tests/functional/tests.d/330-selfkeys.sh index cfd4d0ec0..5f1b6781a 100644 --- a/tests/functional/tests.d/330-selfkeys.sh +++ b/tests/functional/tests.d/330-selfkeys.sh @@ -464,12 +464,34 @@ EOS .value.key.line "ecdsa-sha2-nistp521 $b64 test@ecdsa521" \ .value.key.prefix "" +b64='AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBBTjpImSazDYONgM5plDyz7R2dFmVJMtKCYRemL+XNvVpyRc4e+V8GBF+UZFSc2ieCpGmcB54GfjryznSgyYHHYAAAAEc3NoOg==' + local fpe256_sk + fpe256_sk="SHA256:DRMDgE8K3ByBwYEcosmosvLfHMT7XabCzzM4MoIiIgU" + [ "$FP_TYPE" = md5 ] && fpe256_sk="dc:e1:9b:e4:64:97:d6:c3:47:a7:9b:33:3d:35:e2:cb" + script sk-ecdsa256 $a1 -osh selfAddIngressKey "<<< \"sk-ecdsa-sha2-nistp256@openssh.com $b64 test@ecdsa256-sk\"" + retvalshouldbe 0 + contain "key successfully added" + json $(cat <