-
Notifications
You must be signed in to change notification settings - Fork 14
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
FILE-613: retrieve private key always #340
Conversation
ba6b4eb
to
b71daed
Compare
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.
Looks good from my side, don't know if we want to wait for Mateusz to return from vacation about the mutex question
b71daed
to
4216f84
Compare
4216f84
to
2dd815e
Compare
8ab40ac
to
52a7f91
Compare
@matszczygiel addressed the comments |
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.
Looks good, however, I am not sure about dropping the mutex around privkey()
da0c702
to
c30cbeb
Compare
Previously it was cached after the first call and it so happens that the key might sometimes change. Due to FFI layer issues, Libdrop instance cannot be destroyed and recreated thus leaving the only solution either a new API or the easier one - passing KeyStore in Arc<> and calling when needed. Signed-off-by: Lukas Pukenis <[email protected]>
c30cbeb
to
9704105
Compare
All comments addressed @Lipt0nas @matszczygiel . I gave a pipeline build to Windows to test. The tests failing in natlab are due to flakyness |
Private key retrieval was previously done on
device::new()
once and stored, however API users sometimes hcange the private key and need to recreate libdrop instance. However it's no tthe ideal way of doing things and thus this PR just queries for the private key each time it needs.