diff --git a/READMe.md b/READMe.md index 1da0453..1243543 100644 --- a/READMe.md +++ b/READMe.md @@ -18,9 +18,11 @@ A simple CLI tool to sign files with Trusted Signing The CLI expects the following environment variables to be set or you can pass them as arguments. You need to create an Azure App Registration (you can use [this](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/walkthrough-register-app-azure-active-directory) article to get the credentials): -- `AZURE_CLIENT_ID` -- `AZURE_CLIENT_SECRET` -- `AZURE_TENANT_ID` +- `AZURE_CLIENT_ID` (or use `--azure-client-id`) +- `AZURE_CLIENT_SECRET` (or use `--azure-client-secret`) +- `AZURE_TENANT_ID` (or use `--azure-tenant-id`) +- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME` (or use `--account/-a`) +- `AZURE_CERTIFICATE_PROFILE_NAME` (or use `--certificate/-c`) Signing a single file: `trusted-signing-cli -e -a -c file1.exe` diff --git a/src/main.rs b/src/main.rs index 628daaa..71eeb4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,12 +60,20 @@ struct Args { #[arg(long, short = 'e', verbatim_doc_comment)] endpoint: String, - /// Code Signing Account name - #[arg(long, short = 'a')] + /// Trusted Signing Account name + #[arg( + long, + env = "AZURE_TRUSTED_SIGNING_ACCOUNT_NAME", + short = 'a' + )] account: String, /// Certificate Profile name - #[arg(long, short = 'c')] + #[arg( + long, + env = "AZURE_CERTIFICATE_PROFILE_NAME", + short = 'c' + )] certificate: String, /// File digest algorithm