[PATCH v2 13/14] test: vboot: Move key creation into a function