indygreg / indygreg/PyOxidizer
Read p12-password from env or stdin
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Other secret arguments have variants like `--remote-shared-secret-env ` and `--smartcard-pin-env ` so it would make sense to add an argument `--p12-password-env` which reads from that environment variable..
Another way to pass in the secret without writing to disk is by stdin, but that's also doesn't work. By convention passing a file named `-` reads from stdin:
```
rcodesign analyze-certificate --p12-file ../empty/developer_key <<<"$DEVELOPER_KEY_PWD"
nalyze-certificate --p12-file ../empty/developer_key <<<"$DEVELOPER_KEY_PWD"
Please enter password for p12 file:
```
```
rcodesign analyze-certificate --p12-file ../empty/developer_key --p12-password-file - <<<"$DEVELOPER_KEY_PWD"
DEVELOPER_KEY_PWD" --p12-file ../empty/developer_key --p12-password-file - <<<"$D
Error: I/O error: No such file or directory (os error 2)
```
This works on linux, because `/dev/stdin` is available there: `rcodesign analyze-certificate --p12-file ../empty/developer_key --p12-password-file /dev/stdin <<<"$DEVELOPER_KEY_PWD"`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the rcodesign analyze-certificate command and review the existing --remote-shared-secret-env and --smartcard-pin-env handling. Check how --p12-password-file currently reads paths, including the reported '-' case. Done means supporting --p12-password-env and a documented stdin path for p12 passwords without requiring a password file on disk.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100