summaryrefslogtreecommitdiff
path: root/test/sha256.c
Commit message (Collapse)AuthorAgeFilesLines
* test: Pass commandline arguments to run_testTom Hughes2020-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | run_test is called by the "runtest" console command. Console commands can take arguments, so pass along the arguments to run_test to allow parameters to be passed to run_test. The following command was used for automatic replacement: git grep --name-only 'void run_test(void)' |\ xargs sed -i 's#void run_test(void)#void run_test(int argc, char **argv)##' BRANCH=none BUG=b:155897971 TEST=make buildall -j TEST=Build and flash flash_write_protect test > runtest 1 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib20b955d5ec6b98f525c94c24aadefd7a6a320a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209418 Reviewed-by: Yicheng Li <yichengli@chromium.org> Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org>
* test/sha256: Fix parameter to memcmpNicolas Boichat2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | clang spots an issue with the parameter, we really want to compare the whole SHA256 digest. test/sha256.c:167:33: error: 'memcmp' call operates on objects of type 'const uint8_t' (aka 'const unsigned char') while the size is based on a different type 'const uint8_t *' (aka 'const unsigned char *') [-Werror,-Wsizeof-pointer-memaccess] if (memcmp(tmp, output, sizeof(output)) != 0) { ~~~~~~ ^~~~~~ test/sha256.c:167:33: note: did you mean to provide an explicit length? if (memcmp(tmp, output, sizeof(output)) != 0) { BRANCH=none BUG=chromium:854924 TEST=make CC=clang run-sha256 -j Change-Id: I7ca875a3981f987b60d62a12be7a4ca8b870b376 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1109659 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* sha256: add support for hmac_sha256, and add test for sha256Nicolas Boichat2017-06-141-0/+220
BRANCH=none BUG=b:38486828 TEST=make run-sha256 TEST=make buildall -j Change-Id: I4c5b5d81ae5650ebfbdc989a0d860eeb0a60f68b Reviewed-on: https://chromium-review.googlesource.com/530207 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>