Skip to content
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

Check for invalid private keys in wallet_decrypt_unsafe #1128

Merged
merged 6 commits into from Sep 11, 2018

Conversation

Projects
None yet
3 participants
@SergiySW
Copy link
Collaborator

commented Aug 30, 2018

I.e. corrupted database

@PlasmaPower

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2018

We already check for this in rai::wallet_store::fetch, right?

@SergiySW

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 31, 2018

Yes, and return general bool error that can mean several different things. Also not showed to user, only assert

@PlasmaPower

This comment has been minimized.

Copy link
Contributor

commented Aug 31, 2018

Ok, then this change seems good. 👍

@rkeene rkeene added the enhancement label Aug 31, 2018

@rkeene rkeene added this to the V17.0 milestone Aug 31, 2018

}
else
{
std::cout << boost::str (boost::format ("Pub: %1% Prv: %2% Invalid private key!\n") % account.to_account () % key.data.to_string ());

This comment has been minimized.

Copy link
@rkeene

rkeene Aug 31, 2018

Contributor

Should this be stderr, rather than stdout ?

This comment has been minimized.

Copy link
@SergiySW

SergiySW Aug 31, 2018

Author Collaborator

If add "Invalid private key" to different line

@rkeene

rkeene approved these changes Sep 11, 2018

Copy link
Contributor

left a comment

This looks good

@rkeene rkeene merged commit f94707e into nanocurrency:master Sep 11, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.