vcsjones / AzureSignTool

SignTool Library and Azure Key Vault Support
MIT License
285 stars 90 forks source link

File not found error #191

Open ahrensdc opened 1 year ago

ahrensdc commented 1 year ago

Hi,

I'm testing AzureSignTool on my Windows 10 system. When I run the command:

"AzureSignTool sign -fd sha256 -kvu https://cstestkv.vault.azure.net/ -kvi 1b-redacted -kvt 335-redacted -kvs Z7redacted -kvc SignTest -v -ifl c:\users\davidah\filelist.txt"

I get the error "The file '' does not exist."

filelist.txt contains 2 lines: minikube.exe notepad.exe

The files, filelist.txt, minikube.exe and notepad.exe are all in the current working directory.

Regards, Dave

ahrensdc commented 1 year ago

I've downloaded version 3.0 and that works well.

vcsjones commented 1 year ago

Thanks. Any chance your file list has a blank line in it?

ahrensdc commented 1 year ago

Hi Kevin,

When i downgraded to AzureSignTool 3.0, everything worked fine.

-Dave

On Thu, Jan 26, 2023 at 8:35 AM Kevin Jones @.***> wrote:

[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe.

Thanks. Any chance your file list has a blank line in it?

— Reply to this email directly, view it on GitHub https://github.com/vcsjones/AzureSignTool/issues/191#issuecomment-1405278012, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLBH3ZZF4U5LVJS3NCNSCDWUKRSXANCNFSM6AAAAAATSDOOJU . You are receiving this because you authored the thread.Message ID: @.***>

ahrensdc commented 1 year ago

filelist.txt

Here's the file.

KapuKapu commented 1 year ago

I had the same problem calling AzureSignTool from a ps1 script with multiple files.

$filesToSign = Get-ChildItem -Path .\*.exe -File | Select-Object -ExpandProperty FullName
$optionFiles = '"{0}"' -f ($filesToSign -join '" "')
AzureSignTool sign -fd sha256 -kvu https://cstestkv.vault.azure.net/ -kvi 1b-redacted -kvt 335-redacted -kvs Z7redacted -kvc SignTest $optionFiles

One file worked but multiple file failed with the same error. I fixed it by changing the call to AzureSignTool to:

Invoke-Expression -Command "AzureSignTool sign -fd sha256 -kvu https://cstestkv.vault.azure.net/ -kvi 1b-redacted -kvt 335-redacted -kvs Z7redacted -kvc SignTest $optionFiles"