I am using SignTool
and a digital certificate to sign dll's.
Signing of dll's is one step of my build process. I use msbuild to build my applications, so it is one of the Target
and uses Exec Command
to sign the dlls as follows -
<Exec Command = "signtool sign /a /v /sha1 $(SHA1) $(binPath)\app.exe" />
where $(SHA) is the hash of the certificate
$(binPath) is the path of the binaries
Now this doesn't sign the dll's and gives me an error stating
SignTool Error: No certificates were found that met all the given criteria.
I tried debug
options according to this post
And i got following output
21:00:06,920 INFO - The following certificates were considered:
21:00:06,923 INFO - Issued to: <Issued to company name>
21:00:06,923 INFO -
21:00:06,923 INFO - Issued by: <Issued by company name>
21:00:06,923 INFO -
21:00:06,924 INFO - Expires: Mon Nov 28 05:29:59 2016
21:00:06,924 INFO -
21:00:06,924 INFO - SHA1 hash: D5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxDA
21:00:06,924 INFO -
21:00:06,924 INFO -
21:00:06,924 INFO - Issued to: <Issued to company name>
21:00:06,924 INFO -
21:00:06,924 INFO - Issued by: <Issued by company name>
21:00:06,924 INFO -
21:00:06,924 INFO - Expires: Sun Dec 10 05:29:59 2023
21:00:06,924 INFO -
21:00:06,924 INFO - SHA1 hash: D0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBC
21:00:06,924 INFO -
21:00:06,924 INFO -
21:00:06,925 INFO - Issued to: <Issued to company name>
21:00:06,925 INFO -
21:00:06,925 INFO - Issued by: <Issued by company name>
21:00:06,925 INFO -
21:00:06,925 INFO - Expires: Thu Jul 17 05:29:59 2036
21:00:06,925 INFO -
21:00:06,925 INFO - SHA1 hash: 91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx81
21:00:06,925 INFO -
21:00:06,925 INFO -
21:00:06,925 INFO - After EKU filter, 3 certs were left.
21:00:06,925 INFO - After expiry filter, 2 certs were left.
21:00:06,925 INFO - After Hash filter, 0 certs were left.
21:00:06,925 INFO - After Private Key filter, 0 certs were left.
21:00:06,925 INFO - SignTool Error: No certificates were found that met all the given criteria.
After getting this output I have no clue as to how should I proceed.
However there is one more observation,
SignTool
successfully signs the dll's when it is run through command prompt.
Now this is above thing is making me go crazy.
Request assistance.