Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keepercommander/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ def login_and_get_mc_params_login_v3(params: KeeperParams, mc_id):
mc_params.rsa_key = params.rsa_key
mc_params.rsa_key2 = params.rsa_key2
mc_params.ecc_key = params.ecc_key
mc_params.forbid_rsa = params.forbid_rsa
mc_params.forbid_rsa = resp.forbidKeyType2

mc_params.session_token = loginv3.CommonHelperMethods.bytes_to_url_safe_str(resp.encryptedSessionToken)
mc_params.msp_tree_key = params.enterprise['unencrypted_tree_key']
Expand Down
12 changes: 8 additions & 4 deletions keepercommander/enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,14 @@ def load(self, params): # type: (KeeperParams) -> None
rq.enterprisePublicKey = rsa_public_key
rq.encryptedEnterprisePrivateKey = rsa_encrypted_private_key
rq.keyType = proto.RSA
api.communicate_rest(params, rq, 'enterprise/set_enterprise_key_pair')
self._enterprise._rsa_key = rsa_private_key
keys['rsa_public_key'] = utils.base64_url_encode(rsa_public_key)
keys['rsa_encrypted_private_key'] = utils.base64_url_encode(rsa_encrypted_private_key)
try:
api.communicate_rest(params, rq, 'enterprise/set_enterprise_key_pair')
self._enterprise._rsa_key = rsa_private_key
keys['rsa_public_key'] = utils.base64_url_encode(rsa_public_key)
keys['rsa_encrypted_private_key'] = utils.base64_url_encode(rsa_encrypted_private_key)
except:
logging.info('Failed to set enterprise RSA key')
pass

if 'ecc_encrypted_private_key' not in keys:
ec_private, ec_public = crypto.generate_ec_key()
Expand Down
2 changes: 1 addition & 1 deletion keepercommander/loginv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def accountSummary(params: KeeperParams):
return api.communicate_rest(params, rq, 'login/account_summary', rs_type=AccountSummary_pb2.AccountSummaryElements)

@staticmethod
def loginToMc(rest_context, session_token, mc_id):
def loginToMc(rest_context, session_token, mc_id): # type: (Any, str, int) -> enterprise_pb2.LoginToMcResponse

endpoint = 'authentication/login_to_mc'

Expand Down
Loading