Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

上传密钥:cms --config-file alice.yaml register-data-keys问题 #18

Open
qinjuana opened this issue Apr 18, 2024 · 1 comment
Open
Assignees

Comments

@qinjuana
Copy link

配置文件如下:

(required) str, capsule-manager's ip:port

host: "172.16.1.115:8888"

(required) str, capsule-manager's tee platform type, sim/sgx/tdx/csv

tee_plat: "sim"

(optional) capsule-manager's identity constraints

tee_constraints:

(optional) str, The measurement of TEE implement internal stuff

mr_plat:

(optional) str, The measurement of TEE instance boot time stuff

mr_boot:

(optional) str, The static measurement of trust application when loading the code

mr_ta:

(optional) str, The measurement or other identity of the trust application signer

mr_signer:

(optional) str, root ca cert path

root_ca_file:

(optional) str, sdk's private key path

private_key_file:

(optional) List[str], sdk's cert chain path

cert_chain_file:

common:

(required) str, should be generated from cert

party_id: "R6LXWH5TKM5KCWOUGA2OZKUZPW3HUV4WCYIPPNXBS52PGNAD5VLQ"

(required) List[str], cert chain files, the order is [cert, mid_ca_cert, root_ca_cert]

file num can be 1 if the cert is self-signed

cert_pems_file: alice.crt
scheme: "RSA"

(required) str, file contains private key

private_key_file: alice.key
出现下面错误
(capsule-manager-sdk1) root@wangweifengqinjuann2-4778:~# cms --config-file /home/alice.yaml register-data-keys
Traceback (most recent call last):
File "/root/miniconda3/envs/capsule-manager-sdk1/bin/cms", line 8, in
sys.exit(cms())
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/cli/cms.py", line 128, in register_data_keys
cert_pems, private_key = read_rsa_keypair(common)
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/cli/cms.py", line 37, in read_rsa_keypair
cert_pems_str.append(file.read_file(filename, "r"))
File "/root/miniconda3/envs/capsule-manager-sdk1/lib/python3.10/site-packages/sdc/util/file.py", line 26, in read_file
with open(file_path, mode) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'a'

@zhongtianq
Copy link
Collaborator

看起来是找不到配置的alice.crt这个文件,如果alice.crt不在你当前目录下,请配置绝对路径。
另外,certs_pems_file是一个List,请确认一下格式是否正确。如下:
cert_pems_file:
- alice.crt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants