Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7399 from EOSIO/limit_se_yubihsm_to_r1
Browse files Browse the repository at this point in the history
throw error if trying to create non R1 key on SE or YubiHSM wallet
  • Loading branch information
spoonincode authored May 24, 2019
2 parents 98c0fe9 + 016bd87 commit 6205a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/wallet_plugin/se_wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ bool se_wallet::import_key(string wif_key) {
}

string se_wallet::create_key(string key_type) {
EOS_ASSERT(key_type.empty() || key_type == "R1", chain::unsupported_key_type_exception, "Secure Enclave wallet only supports R1 keys");
return (string)my->create();
}

Expand Down
1 change: 1 addition & 0 deletions plugins/wallet_plugin/yubihsm_wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ bool yubihsm_wallet::import_key(string wif_key) {
}

string yubihsm_wallet::create_key(string key_type) {
EOS_ASSERT(key_type.empty() || key_type == "R1", chain::unsupported_key_type_exception, "YubiHSM wallet only supports R1 keys");
return (string)my->create();
}

Expand Down

0 comments on commit 6205a88

Please sign in to comment.