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

Feature/attest verifier mc seed bugfix #1943

Merged
merged 4 commits into from
May 10, 2022
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
4 changes: 3 additions & 1 deletion attest/verifier/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ fn main() {
purge_expired_cert(&root_anchor_path);
purge_expired_cert(&chain_path);

if !(root_anchor_path.exists() && signer_key_path.exists() && chain_path.exists()) {
if !(root_anchor_path.exists() && signer_key_path.exists() && chain_path.exists())
|| env::var("MC_SEED").is_ok()
{
const ROOT_SUBJECT: &str = "C=US,ST=CA,L=Santa Clara,O=Intel Corporation,CN=Simulation Intel SGX Attestation Report Signing CA\0";
const SIGNER_SUBJECT: &str = "C=US,ST=CA,L=Santa Clara,O=Intel Corporation,CN=Simulation Intel SGX Attestation Report Signer\0";

Expand Down
2 changes: 1 addition & 1 deletion attest/verifier/data/sim/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pem
*.crt
*.key
*.key
2 changes: 1 addition & 1 deletion tools/local-network/local_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(self, name, node_num, client_port, peer_port, admin_port, admin_htt
self.ledger_distribution_process = None
self.admin_http_gateway_process = None
self.ledger_dir = os.path.join(WORK_DIR, f'node-ledger-{self.node_num}')
self.ledger_distribution_dir = os.path.join(WORK_DIR, f'node-ledger-distribution-{self.node_num}')
self.ledger_distribution_dir = os.path.join(TARGET_DIR, f'node-ledger-distribution-{self.node_num}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To expose it to the shared docker volume

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that needed? It it a weird hack to only put one of these things over there and not the others.
It also gets in the way of cleaning up past runs by deleting the work dir.
Why not move the entire work dir under target?

self.msg_signer_key_file = os.path.join(WORK_DIR, f'node-scp-{self.node_num}.pem')
self.tokens_config_file = os.path.join(WORK_DIR, f'node-tokens-{self.node_num}.json')
subprocess.check_output(f'openssl genpkey -algorithm ed25519 -out {self.msg_signer_key_file}', shell=True)
Expand Down