Skip to content

Read p12-password from env or stdin #766

Description

@jamie-pate

Other secret arguments have variants like --remote-shared-secret-env <ENV VAR NAME> and --smartcard-pin-env <STRING> 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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions