summaryrefslogtreecommitdiff
path: root/tests/sha_tests.c
Commit message (Collapse)AuthorAgeFilesLines
* vboot: bulk fix tabs and spacing inconsistencyJoel Kitching2018-08-031-67/+76
| | | | | | | | | | | | | | | | | | | Problem files were found with: find . -name '*.c' -o -name '*.h' | xargs grep '^ [^*]' and edited manually. Ignores utility/ and cgpt/, since they seem to globally adhere to a two-space tab convention. BUG=None TEST=make clean runtests TEST=emerge vboot_reference depthcharge Change-Id: I5a678484a119c8f1911f717e1968bdb4f1a0810f Reviewed-on: https://chromium-review.googlesource.com/1160131 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot: Remove the remainder of vb1 cryptolibRandall Spangler2016-11-061-1/+0
| | | | | | | | | | | | | | | At this point, all that's left are a few constants in the cryptolib header files, and they're only used by host-side code. So move them to a host-side header file and get rid of cryptolib. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I2235f0e84e13fef313afe54e749b73744b157884 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/400903 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Massive refactoring of external header files.Bill Richardson2013-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reduces the number of exported header files to the minimum needed by the existing userspace utilities and firmware implementations. BUG=chromium:221544 BRANCH=none TEST=manual, trybots CQ-DEPEND=CL:47019,CL:47022,CL:47023 sudo FEATURES=test emerge vboot_reference FEATURES=test emerge-$BOARD \ vboot_reference \ chromeos-cryptohome \ chromeos-installer \ chromeos-u-boot \ peach-u-boot \ depthcharge Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47021 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Get rid of some crufty macros.Gabe Black2013-03-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | These were macros that were never used, or that were only set to one thing and could be substituted up front. I left in code guarded by the HAVE_ENDIAN_H and HAVE_LITTLE_ENDIAN macros even though those are never defined because they guard a reportedly significantly faster implementation of some functionality, at least according to a comment in the source. It would be a good idea to enable that code path and see if it really does make a big difference before removing it entirely. BUG=None TEST=Built for Link, Daisy, and the host with FEATURES=test. Built depthcharge for Link and booted in normal mode. BRANCH=None Change-Id: I934a4dd0da169ac018ba07350d56924ab88b1acc Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/45687 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
* cryptolib: rename SHA* function to avoid openssl collisionfirmware-link-2348.BKees Cook2012-05-221-3/+3
| | | | | | | | | | | | | | | | When linking tools that need OpenSSL functions on the target, the resolution of SHA* functions was being redirected to the firmware cryptolib instead of the OpenSSL implementations, which was causing OpenSSL calls to crash. This renames the internal implementations to avoid the collision. BUG=None TEST=make runtests passes, mount-encrypted runs on target again. Change-Id: Ica4fb04faf203ae3b4118c540f18d40239753810 Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/23305 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Make vboot_reference build in MSVC command line environment.vbendeb2010-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mostly NOOP change which modifies the source code to compile cleanly in the MSVC command line build environment. A new makefile is introduced (msc/nmakefile) along with a README.txt in the same directory explaining how to build the code in the DOS window. As of this submission the build is running in a 32 bit environment, the intention is to use the same makefile for 64 bit builds in the future. Enabling high compilation warnings level allowed to identify a couple of bugs in the code which are being fixed. Not all sources are being compiled in the MSVC environment, only those in firmware/ and most of those in test/ subdirectories. The benchmark calculations require porting of the timer facilities and are being postponed. TEST Built in DOS and linux environments. Ran unit tests in linux environment. Review URL: http://codereview.chromium.org/2809037
* combined patch for:Gaurav Shah2010-03-311-2/+1
| | | | | | | http://codereview.chromium.org/1574005 http://codereview.chromium.org/1604001 Review URL: http://codereview.chromium.org/1585007
* Revert "VBoot Reference: Refactor Part 2 - Crypto Libraries"David Garcia2010-03-311-1/+2
| | | | | | This reverts commit e018a80a37aaa45681f45f5852f04d20aedd8b2d. Review URL: http://codereview.chromium.org/1593002
* VBoot Reference: Refactor Part 2 - Crypto LibrariesGaurav Shah2010-03-301-2/+1
| | | | | | | | Removing multiple top level includes - now padding.h, rsa.h and sha.h are used internally and cryptolib.h must be used instead for all modules that wish to use crypto functions. I am trying to separate refactors involving code movement from one file to another, and the movement of files themselves into separate CLs so that it's clear what changed. Review URL: http://codereview.chromium.org/1574005
* RSA signature verification and SHA-1/256/512 reference implementation for ↵Gaurav Shah2010-01-281-0/+99
verified boot. Also contains some preliminary tests for these primitives. Review URL: http://codereview.chromium.org/553023