-
Notifications
You must be signed in to change notification settings - Fork 55
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
Refactor low-level crypto to C++ style. #2292
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2292 +/- ##
==========================================
+ Coverage 84.81% 84.88% +0.06%
==========================================
Files 116 114 -2
Lines 23346 22783 -563
==========================================
- Hits 19802 19339 -463
+ Misses 3544 3444 -100 ☔ View full report in Codecov by Sentry. |
2a228c3
to
9f78304
Compare
02f053d
to
32a11db
Compare
7a9f582
to
da9d709
Compare
…e to use instead of structs.
da9d709
to
bd9aa80
Compare
RNP_LOG("Failed to derive kek: %s", e.what()); | ||
return RNP_ERROR_GENERIC; | ||
/* LCOV_EXCL_END */ | ||
for (size_t i = 1; i <= reps; i++) { |
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.
We can't have exception here anymore?
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.
We don't need to handle it here and now allow to pass it up. Check was added during initial transition from C to C++, when FFI didn't handle exceptions or something like that.
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.
-
IMHO wrappers in
botan_utils.hpp
andossl_utils.hpp
look like derivatives ofunique_ptr
with customDeleter
I am not at all saying that it shall be changed, just noting that it is a kind of reimplementation of standard library -
Purists would say that in the newer files
nullptr
shall be used and notNULL
Thanks for this suggestion! Somehow I missed the idea to use unique_ptr with custom deleter, with it it looks much better and cleaner, so updated the code.
Agree, missed this as well, updated code fore C++ return types. |
37b27b7
to
1397044
Compare
1397044
to
e75157c
Compare
e75157c
to
2052e7c
Compare
macos-12 GHA runner is not available anymore |
@maxirmx Is this good to merge now? |
This is rather huge PR, which would do simple things: