test: vboot: Move key creation into a function

This code is repeated so move it into a function with a parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
1 file changed