Summary
Testing the API service with invalid certificate paths (e.g., /etc/hosts) caused the SSL handshake to fail (e.g., PEM lib error). The child process dies, and the parent process "falls through" to the CLI target validation, resulting in a misleading Cannot specify the target(s) error instead of the actual SSL failure.
Steps to Reproduce
Start the API service with the command:
poetry run nettacker --start-api --api-host 127.0.0.1 --api-port 8080 --api-debug-mode --api-cert /etc/hosts --api-cert-key /etc/hosts
The error message of Cannot specify the target(s) was returned:
Expected Behavior
The API service should terminate immediately with a clear message such as Failed to load SSL configuration. Please check your --api-cert and --api-cert-key files..
Environment
- macOS (Apple Silicon, Homebrew Python)
- Python 3.12
- Nettacker 0.4.0
- Installed and executed via Poetry