Commit b30024d2 authored by Timo Teräs's avatar Timo Teräs

openssl: register engines, and use oneshot digest when possible

to actually get hardware acceleration if available.
parent 3cbccbaf
......@@ -255,6 +255,7 @@ static void init_openssl(void)
OpenSSL_add_all_algorithms();
#ifndef OPENSSL_NO_ENGINE
ENGINE_load_builtin_engines();
ENGINE_register_all_complete();
#endif
}
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment