combined patch for:
http://codereview.chromium.org/1574005
http://codereview.chromium.org/1604001
Review URL: http://codereview.chromium.org/1585007
diff --git a/tests/big_firmware_tests.c b/tests/big_firmware_tests.c
index 2368b47..44328ea 100644
--- a/tests/big_firmware_tests.c
+++ b/tests/big_firmware_tests.c
@@ -9,9 +9,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "firmware_image.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/big_kernel_tests.c b/tests/big_kernel_tests.c
index 7fc5fb3..c78f622 100644
--- a/tests/big_kernel_tests.c
+++ b/tests/big_kernel_tests.c
@@ -9,9 +9,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "kernel_image.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/firmware_image_tests.c b/tests/firmware_image_tests.c
index fd19560..a2ce472 100644
--- a/tests/firmware_image_tests.c
+++ b/tests/firmware_image_tests.c
@@ -8,9 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "firmware_image.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/firmware_rollback_tests.c b/tests/firmware_rollback_tests.c
index 9973ec7..3608db7 100644
--- a/tests/firmware_rollback_tests.c
+++ b/tests/firmware_rollback_tests.c
@@ -8,9 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "firmware_image.h"
-#include "rsa_utility.h"
#include "utility.h"
#include "rollback_index.h"
#include "test_common.h"
diff --git a/tests/firmware_splicing_tests.c b/tests/firmware_splicing_tests.c
index c71b8b4..c3259b7 100644
--- a/tests/firmware_splicing_tests.c
+++ b/tests/firmware_splicing_tests.c
@@ -8,10 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "firmware_image.h"
-#include "padding.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/firmware_verify_benchmark.c b/tests/firmware_verify_benchmark.c
index 8eafc70..3d06dc9 100644
--- a/tests/firmware_verify_benchmark.c
+++ b/tests/firmware_verify_benchmark.c
@@ -8,10 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "firmware_image.h"
-#include "padding.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "timer_utils.h"
#include "utility.h"
diff --git a/tests/kernel_image_tests.c b/tests/kernel_image_tests.c
index c8f8035..eee0417 100644
--- a/tests/kernel_image_tests.c
+++ b/tests/kernel_image_tests.c
@@ -8,9 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "kernel_image.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/kernel_rollback_tests.c b/tests/kernel_rollback_tests.c
index eafbaaa..08f874c 100644
--- a/tests/kernel_rollback_tests.c
+++ b/tests/kernel_rollback_tests.c
@@ -8,9 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "kernel_image.h"
-#include "rsa_utility.h"
#include "rollback_index.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/kernel_splicing_tests.c b/tests/kernel_splicing_tests.c
index da29eb1..d4c9bb5 100644
--- a/tests/kernel_splicing_tests.c
+++ b/tests/kernel_splicing_tests.c
@@ -8,10 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "kernel_image.h"
-#include "padding.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "utility.h"
diff --git a/tests/kernel_verify_benchmark.c b/tests/kernel_verify_benchmark.c
index c3259fc..369785c 100644
--- a/tests/kernel_verify_benchmark.c
+++ b/tests/kernel_verify_benchmark.c
@@ -8,10 +8,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
#include "kernel_image.h"
-#include "padding.h"
-#include "rsa_utility.h"
#include "test_common.h"
#include "timer_utils.h"
#include "utility.h"
diff --git a/tests/rollback_index_mock.c b/tests/rollback_index_mock.c
index 6317214..37dde48 100644
--- a/tests/rollback_index_mock.c
+++ b/tests/rollback_index_mock.c
@@ -7,8 +7,8 @@
#include "rollback_index.h"
-#include <stdio.h>
#include <stdint.h>
+#include <stdio.h>
uint16_t g_firmware_key_version = 0;
uint16_t g_firmware_version = 0;
diff --git a/tests/rsa_padding_test.c b/tests/rsa_padding_test.c
index b565e78..4ccb4b4 100644
--- a/tests/rsa_padding_test.c
+++ b/tests/rsa_padding_test.c
@@ -7,8 +7,8 @@
#include <stdio.h>
+#include "cryptolib.h"
#include "file_keys.h"
-#include "rsa_utility.h"
int main(int argc, char* argv[]) {
int i;
diff --git a/tests/rsa_padding_test.h b/tests/rsa_padding_test.h
index 2257784..ce1ab24 100644
--- a/tests/rsa_padding_test.h
+++ b/tests/rsa_padding_test.h
@@ -12,9 +12,7 @@
#ifndef VBOOT_REFERENCE_RSA_PADDING_TEST_H_
#define VBOOT_REFERENCE_RSA_PADDING_TEST_H_
-#include <inttypes.h>
-
-#include "rsa.h"
+#include "cryptolib.h"
/* The modulus of the public key (RSA-1024). */
static const uint8_t pubkey_n[] = {
diff --git a/tests/rsa_verify_benchmark.c b/tests/rsa_verify_benchmark.c
index ba108be..ccd6eaf 100644
--- a/tests/rsa_verify_benchmark.c
+++ b/tests/rsa_verify_benchmark.c
@@ -6,10 +6,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cryptolib.h"
#include "file_keys.h"
-#include "padding.h"
-#include "rsa.h"
-#include "rsa_utility.h"
#include "timer_utils.h"
#include "utility.h"
diff --git a/tests/sha_benchmark.c b/tests/sha_benchmark.c
index b36695b..8532ffa 100644
--- a/tests/sha_benchmark.c
+++ b/tests/sha_benchmark.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sha.h"
+#include "cryptolib.h"
#include "timer_utils.h"
#include "utility.h"
diff --git a/tests/sha_test_vectors.h b/tests/sha_test_vectors.h
index 640c06b..c75e916 100644
--- a/tests/sha_test_vectors.h
+++ b/tests/sha_test_vectors.h
@@ -8,15 +8,15 @@
#ifndef VBOOT_REFERENCE_SHA_TEST_VECTORS_H_
#define VBOOT_REFERENCE_SHA_TEST_VECTORS_H_
-#include "sha.h"
+#include "cryptolib.h"
-char *oneblock_msg = "abc";
-char *multiblock_msg1 = "abcdbcdecdefdefgefghfghighijhijkijkl"
+char* oneblock_msg = "abc";
+char* multiblock_msg1 = "abcdbcdecdefdefgefghfghighijhijkijkl"
"jklmklmnlmnomnopnopq";
-char *multiblock_msg2= "abcdefghbcdefghicdefghijdefghijkefghi"
+char* multiblock_msg2= "abcdefghbcdefghicdefghijdefghijkefghi"
"jklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnop"
"qrsmnopqrstnopqrstu";
-char *long_msg;
+char* long_msg;
uint8_t sha1_results[][SHA1_DIGEST_SIZE] = {
{
diff --git a/tests/sha_tests.c b/tests/sha_tests.c
index 2c07b3f..2b75a03 100644
--- a/tests/sha_tests.c
+++ b/tests/sha_tests.c
@@ -9,8 +9,7 @@
#include <stdlib.h>
#include <string.h>
-#include "sha.h"
-
+#include "cryptolib.h"
#include "sha_test_vectors.h"
int SHA1_tests(void) {
diff --git a/tests/test_common.c b/tests/test_common.c
index b57f6ed..2591310 100644
--- a/tests/test_common.c
+++ b/tests/test_common.c
@@ -9,8 +9,8 @@
#include <stdio.h>
+#include "cryptolib.h"
#include "file_keys.h"
-#include "rsa_utility.h"
#include "utility.h"
/* ANSI Color coding sequences. */