gen_test_vbpubks.sh 763 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. #
  6. # Generate test vboot public keys and keyblocks for testing.
  7. # Load common constants and variables.
  8. . "$(dirname "$0")/common.sh"
  9. function generate_vpubks {
  10. algorithmcounter=0
  11. for keylen in ${key_lengths[@]}
  12. do
  13. for hashalgo in ${hash_algos[@]}
  14. do
  15. ${FUTILITY} vbutil_key --pack \
  16. --in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \
  17. --out ${TESTKEY_DIR}/key_rsa${keylen}.${hashalgo}.vbpubk \
  18. --version 1 \
  19. --algorithm ${algorithmcounter}
  20. let algorithmcounter=algorithmcounter+1
  21. done
  22. done
  23. }
  24. check_test_keys
  25. generate_vpubks