use new mbedtls_sha256 methods that are not deprecated
@@ -210,8 +210,8 @@ int tls_client_get_id(uint8_t id[], size_t len, const char query[])
if (strchr(query, '.')) {
mbedtls_sha256_context ctx;
mbedtls_sha256_init(&ctx);
- mbedtls_sha256_update(&ctx, (uint8_t*) &query[0], strlen(query));
- mbedtls_sha256_finish(&ctx, hash);
+ mbedtls_sha256_update_ret(&ctx, (uint8_t*) &query[0], strlen(query));
+ mbedtls_sha256_finish_ret(&ctx, hash);
memset(id, 0, len);
memcpy(id, hash, MIN(len, sizeof(hash)));
