-
-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't specify hash algorithm for the Sign command #906
Comments
@thomaslevesque yes this would be nice, good feedback. FYI though, meanwhile you actually can use Example cake script, this is 2 min thrown together so not correct but hopefully you get the gist of it. FilePath assembly = File("assembly.dll");
SignToolSignSettings settings;
settings = new SignToolSignSettings
{
ArgumentCustomization = args => new ProcessArgumentBuilder()
.Append("SIGN")
.AppendSwitchQuoted("/tr", settings.TimeStampUri.AbsoluteUri)
.AppendSwitchQuoted("/sha1", settings.CertThumbprint)
.Append("/fd")
.Append("/td")
.AppendQuoted(assembly.MakeAbsolute(Context.Environment).FullPath),
TimeStampUri = new Uri("http://localhost"),
CertThumbprint ="0101010010101001"
};
Sign(
assembly,
settings
); This will ouptut something like While testing things you can even to hacky things like |
True, but it's equivalent to redoing most of the work done by |
Well you get tool resolution and validation of known parameters so a little more than just StartProcess 😉 |
Fixed by #1308 |
There are no properties in
SignToolSignSettings
to specify:/tr
instead of/t
)/fd
)/td
)Worse, it's also not possible to use
ArgumentCustomization
to add these settings manually, because all options must come before all file arguments. If they're added at the end, SignTool treats them as files, which of course don't exist.Suggested solution :
UseRfc3161TimestampServer
property inSignToolSignSettings
to control whether/t
or/tr
is usedSignatureDigestAlgorithm
to control the/fd
optionTimestampDigestAlgorithm
to control the/td
optionOR
A way to insert options before the file names with
ArgumentCustomization
. I suspect it would be more complex, since this is handled in theTool<TSettings>
base class.The text was updated successfully, but these errors were encountered: