mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
u2f: Fix leaking message digest contexts (#4052)
* u2f: Fix leaking message digest contexts * Github: fix doxygen version to 1.12 Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
||||
|
||||
- name: 'Generate documentation'
|
||||
uses: mattnotmitt/doxygen-action@edge
|
||||
uses: mattnotmitt/doxygen-action@1.12.0
|
||||
env:
|
||||
DOXY_SRC_ROOT: "${{ github.workspace }}"
|
||||
DOXY_CONFIG_DIR: "${{ github.workspace }}/documentation/doxygen"
|
||||
|
||||
@@ -280,6 +280,8 @@ static uint16_t u2f_register(U2fData* U2F, uint8_t* buf) {
|
||||
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, private, sizeof(private)));
|
||||
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, req->app_id, sizeof(req->app_id)));
|
||||
MCHECK(mbedtls_md_hmac_finish(&hmac_ctx, handle.hash));
|
||||
|
||||
mbedtls_md_free(&hmac_ctx);
|
||||
}
|
||||
|
||||
// Generate public key
|
||||
@@ -387,6 +389,8 @@ static uint16_t u2f_authenticate(U2fData* U2F, uint8_t* buf) {
|
||||
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, priv_key, sizeof(priv_key)));
|
||||
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, req->app_id, sizeof(req->app_id)));
|
||||
MCHECK(mbedtls_md_hmac_finish(&hmac_ctx, mac_control));
|
||||
|
||||
mbedtls_md_free(&hmac_ctx);
|
||||
}
|
||||
|
||||
if(memcmp(req->key_handle.hash, mac_control, sizeof(mac_control)) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user