diff options
author | Adam Langley <agl@google.com> | 2015-09-24 10:57:52 -0700 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-09-24 11:04:03 -0700 |
commit | 1e4884f615b20946411a74e41eb9c6aa65e2d5f3 (patch) | |
tree | dd743d9d64af3145fe96b8d5fc2f3427544794bd /src/crypto/modes/gcm_test.c | |
parent | 08656b61d075740bfb24ddcce65223146259fc02 (diff) | |
download | external_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.zip external_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.tar.gz external_boringssl-1e4884f615b20946411a74e41eb9c6aa65e2d5f3.tar.bz2 |
external/boringssl: sync with upstream.
This change imports the current version of BoringSSL. The only local
change now is that |BORINGSSL_201509| is defined in base.h. This allows
this change to be made without (hopefully) breaking the build.
This change will need https://android-review.googlesource.com/172744 to
be landed afterwards to update a test.
Change-Id: I6d1f463f7785a2423bd846305af91c973c326104
Diffstat (limited to 'src/crypto/modes/gcm_test.c')
-rw-r--r-- | src/crypto/modes/gcm_test.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/crypto/modes/gcm_test.c b/src/crypto/modes/gcm_test.c index a8819ea..89ed792 100644 --- a/src/crypto/modes/gcm_test.c +++ b/src/crypto/modes/gcm_test.c @@ -55,6 +55,7 @@ #include <openssl/modes.h> #include "internal.h" +#include "../test/test_util.h" struct test_case { @@ -298,17 +299,6 @@ err: return 0; } -void hexdump(const char *msg, const void *in, size_t len) { - const uint8_t *data = in; - size_t i; - - fprintf(stderr, "%s: ", msg); - for (i = 0; i < len; i++) { - fprintf(stderr, "%02x", data[i]); - } - fprintf(stderr, "\n"); -} - static int run_test_case(unsigned test_num, const struct test_case *test) { size_t key_len, plaintext_len, additional_data_len, nonce_len, ciphertext_len, tag_len; @@ -367,8 +357,8 @@ static int run_test_case(unsigned test_num, const struct test_case *test) { if (!CRYPTO_gcm128_finish(&ctx, tag, tag_len) || (ciphertext && memcmp(out, ciphertext, plaintext_len) != 0)) { fprintf(stderr, "%u: encrypt failed.\n", test_num); - hexdump("got ", out, plaintext_len); - hexdump("want", ciphertext, plaintext_len); + hexdump(stderr, "got :", out, plaintext_len); + hexdump(stderr, "want:", ciphertext, plaintext_len); goto out; } |