From 2cf7e1cc37fbf94ae23629be297ee0f5bc9b9770 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..778fc6d67 100644 --- a/tests/functional/tests.d/330-selfkeys.sh +++ b/tests/functional/tests.d/330-selfkeys.sh @@ -463,13 +463,35 @@ 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 <