diff --git a/keepercommander/api.py b/keepercommander/api.py index 1da4a1e32..ad83ace7a 100644 --- a/keepercommander/api.py +++ b/keepercommander/api.py @@ -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'] diff --git a/keepercommander/enterprise.py b/keepercommander/enterprise.py index 2613c579d..74808877f 100644 --- a/keepercommander/enterprise.py +++ b/keepercommander/enterprise.py @@ -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() diff --git a/keepercommander/loginv3.py b/keepercommander/loginv3.py index 2985ad28f..ebdad678b 100644 --- a/keepercommander/loginv3.py +++ b/keepercommander/loginv3.py @@ -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'