Skip to content
Snippets Groups Projects
Commit a1999ca9 authored by Timo Teräs's avatar Timo Teräs
Browse files

crypto/mbedtls: fix assert to test

a copy/paste error from openssl implementation to mbedtls
parent a6ce0a1b
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ int apk_digest_ctx_init(struct apk_digest_ctx *dctx, uint8_t alg)
int apk_digest_ctx_reset(struct apk_digest_ctx *dctx)
{
assert(dctx->alg != APK_DIGEST_NONE);
if (dctx->alg == APK_DIGEST_NONE) return 0;
if (mbedtls_md_starts(&dctx->mdctx)) return -APKE_CRYPTO_ERROR;
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment