-
Notifications
You must be signed in to change notification settings - Fork 136
Hmac sha implementation #2557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: inject-hash-cpp-experiment
Are you sure you want to change the base?
Hmac sha implementation #2557
Conversation
- Add LIEF version 0.13.0 as git submodule - Configure CMake to build LIEF from source - Update inject_hash implementation to use LIEF - Remove pre-built LIEF binaries - Add initial C++ implementation and tests This change improves portability and maintainability by using LIEF as a submodule instead of pre-built binaries.
- Add GitHub Actions workflow for Ubuntu and macOS - Add test script with detailed logging - Handle OS-specific library names - Add environment verification - Disable fail-fast to test both environments
- Adds flag to fetch C/C++ libraries
- Added fips_hashing implementation - Updated CMake configuration - Modified inject_hash_cpp to use fips_hashing - Removed test_sha256.cpp
- Created a new file called fips_hashing.c which has all the files on which HMAC and SHA are dependent on - Modified a few dependencies so that the dependency chain gets limited - inject_hash.cpp can now finally implement HMAC my simply including it into the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -183,10 +183,6 @@ DEFINE_METHOD_FUNCTION(EVP_PKEY_METHOD, EVP_PKEY_hmac_pkey_meth) { | |||
out->ctrl_str = hmac_ctrl_str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use of undeclared identifier 'out' [clang-diagnostic-error]
out->ctrl_str = hmac_ctrl_str;
^
@@ -0,0 +1,63 @@ | |||
#include <LIEF/LIEF.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'LIEF/LIEF.hpp' file not found [clang-diagnostic-error]
#include <LIEF/LIEF.hpp>
^
} | ||
std::vector<uint8_t> calculate_hash(HMAC_size(&ctx)); | ||
|
||
unsigned int calculate_hash_len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'calculate_hash_len' is not initialized [cppcoreguidelines-init-variables]
unsigned int calculate_hash_len; | |
unsigned int calculate_hash_len = 0; |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## inject-hash-cpp-experiment #2557 +/- ##
==============================================================
- Coverage 78.90% 78.75% -0.15%
==============================================================
Files 640 642 +2
Lines 109766 110241 +475
Branches 15526 15604 +78
==============================================================
+ Hits 86612 86824 +212
- Misses 22457 22719 +262
- Partials 697 698 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Integration of HMAC and SHA functionalities from the crypto submodule.