summaryrefslogtreecommitdiff
path: root/src/apk_csum.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-13 14:28:52 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-13 14:28:52 +0300
commitb30024d2bd5a4d91a9efacdadfd02d7c9a7839f4 (patch)
treebbef6a71b8c900148fd6a1c4c433ab7219eaa1d6 /src/apk_csum.h
parent3cbccbaf99fde94477f1a32a7f4dab36d061e2ca (diff)
downloadapk-tools-b30024d2bd5a4d91a9efacdadfd02d7c9a7839f4.tar.gz
apk-tools-b30024d2bd5a4d91a9efacdadfd02d7c9a7839f4.tar.bz2
apk-tools-b30024d2bd5a4d91a9efacdadfd02d7c9a7839f4.tar.xz
apk-tools-b30024d2bd5a4d91a9efacdadfd02d7c9a7839f4.zip
openssl: register engines, and use oneshot digest when possible
to actually get hardware acceleration if available.
Diffstat (limited to 'src/apk_csum.h')
-rw-r--r--src/apk_csum.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/apk_csum.h b/src/apk_csum.h
index 564339b..f2335d3 100644
--- a/src/apk_csum.h
+++ b/src/apk_csum.h
@@ -43,11 +43,7 @@ static inline int csum_valid(csum_p csum)
static inline void csum_blob(apk_blob_t blob, csum_p csum)
{
- csum_ctx_t ctx;
-
- csum_init(&ctx);
- csum_process(&ctx, (csum_p) blob.ptr, blob.len);
- csum_finish(&ctx, csum);
+ EVP_Digest(blob.ptr, blob.len, csum, NULL, EVP_md5(), NULL);
}
#endif