diff options
author | Tao Bao <tbao@google.com> | 2016-02-04 20:22:39 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-02-04 20:22:39 +0100 |
commit | 7b6027dde49e5f14e9cde6de4fa542b146f41a2f (patch) | |
tree | d9d9b43a46b67a65a702c1b3142a3455f1fef386 /applypatch/imgpatch.cpp | |
parent | Merge "uncrypt: add options to setup bcb and clear bcb." (diff) | |
parent | Merge "Switch from mincrypt to BoringSSL in applypatch and updater." (diff) | |
download | android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar.gz android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar.bz2 android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar.lz android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar.xz android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.tar.zst android_bootable_recovery-7b6027dde49e5f14e9cde6de4fa542b146f41a2f.zip |
Diffstat (limited to 'applypatch/imgpatch.cpp')
-rw-r--r-- | applypatch/imgpatch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/applypatch/imgpatch.cpp b/applypatch/imgpatch.cpp index 3e72b2cb5..c9944dfc1 100644 --- a/applypatch/imgpatch.cpp +++ b/applypatch/imgpatch.cpp @@ -26,7 +26,7 @@ #include <string.h> #include "zlib.h" -#include "mincrypt/sha.h" +#include "openssl/sha.h" #include "applypatch.h" #include "imgdiff.h" #include "utils.h" @@ -109,7 +109,7 @@ int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size, printf("failed to read chunk %d raw data\n", i); return -1; } - if (ctx) SHA_update(ctx, patch->data + pos, data_len); + if (ctx) SHA1_Update(ctx, patch->data + pos, data_len); if (sink((unsigned char*)patch->data + pos, data_len, token) != data_len) { printf("failed to write chunk %d raw data\n", i); @@ -236,7 +236,7 @@ int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size, (long)have); return -1; } - if (ctx) SHA_update(ctx, temp_data, have); + if (ctx) SHA1_Update(ctx, temp_data, have); } while (ret != Z_STREAM_END); deflateEnd(&strm); |