Skip to content

Conversation

@hyperfinitism
Copy link
Contributor

During the review of PR #124 unnecessary conditional branching was discovered in src/certs.rs. This pull request removes that branch to simplify the write path while preserving existing behaviour.

Testing

Environment

  • VM: Google Cloud Platform N2D (Milan)
  • OS: Ubuntu 24.04.1
  • Kernel: 6.14.0-1017-gcp

Steps

# 1. Normal download succeeds
snpguest fetch ca pem . milan
# → ark.pem and ask.pem are created

# 2. Make ark.pem read-only
chmod -w ark.pem

# 3. Attempt to overwrite; expect a write-error
snpguest fetch ca pem . milan

Output

$ chmod -w ark.pem
$ snpguest fetch ca pem . milan
ERROR: unable to create or overwrite ark certificate
because: Permission denied (os error 13)
Error: unable to create or overwrite ark certificate

Caused by:
    Permission denied (os error 13

@hyperfinitism hyperfinitism force-pushed the refactor-cert-file-write branch from d101af6 to fb39e1a Compare October 26, 2025 22:09
@DGonzalezVillal DGonzalezVillal merged commit 73afa98 into virtee:main Nov 11, 2025
12 checks passed
@hyperfinitism hyperfinitism deleted the refactor-cert-file-write branch November 22, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants