Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions READMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <url> -a <account name> -c <certificate profile name> file1.exe`
Expand Down
14 changes: 11 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down