-
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 pgp_key_t methods for noexcept and fix few coverity issues. #2265
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2265 +/- ##
==========================================
+ Coverage 83.90% 84.00% +0.09%
==========================================
Files 113 113
Lines 23092 23066 -26
==========================================
+ Hits 19376 19377 +1
+ Misses 3716 3689 -27 ☔ View full report in Codecov by Sentry. |
3012047
to
28194c7
Compare
@@ -1596,7 +1590,9 @@ pgp_key_t::lock() | |||
return true; | |||
} | |||
|
|||
material().clear_secret(); | |||
if (material()) { |
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.
maybe it will be good to add assert not null here
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.
Thanks, addressed this and the next comments.
@@ -1687,7 +1683,9 @@ pgp_key_t::unprotect(const pgp_password_provider_t &password_provider, | |||
} | |||
pkt_ = std::move(*decrypted_seckey); | |||
/* current logic is that unprotected key should be additionally unlocked */ | |||
material().clear_secret(); | |||
if (material()) { |
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.
maybe it will be good to add assert not null here
28194c7
to
23830bf
Compare
.github/workflows/windows-native.yml
Outdated
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.
I believe the root cause is here: #2150
We have to use bash shell instead of setting up MSVC development environment (somthing like https://github.com/ilammy/msvc-dev-cmd)
36dad54
to
e7bd36d
Compare
12b03b4
to
cf9e812
Compare
cf9e812
to
3c4cc4b
Compare
Having approvals and green CI - let's merge it. Thanks all! |
...also return key material from pgp_key_t by pointer instead of references.