OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Run tests for cryptographic routine implementations - Message digests | 7 # Run tests for cryptographic routine implementations - Message digests |
8 # and RSA Signature verification. | 8 # and RSA Signature verification. |
9 | 9 |
10 return_code=0 | 10 return_code=0 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 do | 62 do |
63 echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:" | 63 echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:" |
64 cd ${UTIL_DIR} && ${TEST_DIR}/firmware_image_tests $algorithmcounter \ | 64 cd ${UTIL_DIR} && ${TEST_DIR}/firmware_image_tests $algorithmcounter \ |
65 ${TEST_DIR}/testkeys/key_rsa8192.pem \ | 65 ${TEST_DIR}/testkeys/key_rsa8192.pem \ |
66 ${TEST_DIR}/testkeys/key_rsa8192.keyb \ | 66 ${TEST_DIR}/testkeys/key_rsa8192.keyb \ |
67 ${TEST_DIR}/testkeys/key_rsa${keylen}.pem \ | 67 ${TEST_DIR}/testkeys/key_rsa${keylen}.pem \ |
68 ${TEST_DIR}/testkeys/key_rsa${keylen}.keyb | 68 ${TEST_DIR}/testkeys/key_rsa${keylen}.keyb |
69 let algorithmcounter=algorithmcounter+1 | 69 let algorithmcounter=algorithmcounter+1 |
70 done | 70 done |
71 done | 71 done |
| 72 echo -e "Peforming ${COL_YELLOW}PKCS #1 v1.5 Padding Tests${COL_STOP}..." |
| 73 ${TEST_DIR}/rsa_padding_test ${TEST_DIR}/testkeys/rsa_padding_test_pubkey.keyb |
72 } | 74 } |
73 | 75 |
74 function pre_work { | 76 function pre_work { |
75 # Generate a file with random bytes for signature tests. | 77 # Generate a file with random bytes for signature tests. |
76 echo "Generating test file..." | 78 echo "Generating test file..." |
77 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1 | 79 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1 |
78 echo "Generating signatures..." | 80 echo "Generating signatures..." |
79 generate_signatures $TEST_FILE | 81 generate_signatures $TEST_FILE |
80 } | 82 } |
81 | 83 |
(...skipping 25 matching lines...) Expand all Loading... |
107 echo | 109 echo |
108 echo "Testing high-level image verification..." | 110 echo "Testing high-level image verification..." |
109 test_verification | 111 test_verification |
110 | 112 |
111 echo | 113 echo |
112 echo "Cleaning up..." | 114 echo "Cleaning up..." |
113 cleanup | 115 cleanup |
114 | 116 |
115 exit $return_code | 117 exit $return_code |
116 | 118 |
OLD | NEW |