Unable to sign hlkx package using HLK studio in Win Server 2016

I have completed tests on my driver and lastly i want to sign it using my EV code signing certificate.
I select the “use the certificate store” option and choose my EV code signing cert. The wizard also asks me the password to login to my Safenet token and finally completes with a message “Successfully packaged the project” and a .hlkx file is generated at the designated path.
But when I upload it to my Microsoft Dashboard, it says
“The file you selected is not a valid format for submission. Verify your selection and, if needed, recreate your submission package and try again.”

On the other hand, signtool does not recognize the .hlkx file as a valid file for signing, so how can I get my .hlkx file signed?

I have gone through the following thread which is somewhat relevant but I didn’t get the solution.
http://www.osronline.com/showThread.CFM?link=287826

Might be separate issues.

Part of the process I always have to do is this:
rename HLKX to .zip, extract contents, then repackage using the windows zip
utility back to a zip and then rename to hlkx. The portal can then properly
unpack my submission.

I also recall signing my new package after this? There was a link for the
sign tool with an example C# code. I used that to create a tool that
allowed me to sign the package in the first place.

Hope this helps.

On Thu, Aug 16, 2018 at 7:03 AM xxxxx@gmail.com
wrote:

> I have completed tests on my driver and lastly i want to sign it using my
> EV code signing certificate.
> I select the “use the certificate store” option and choose my EV code
> signing cert. The wizard also asks me the password to login to my Safenet
> token and finally completes with a message “Successfully packaged the
> project” and a .hlkx file is generated at the designated path.
> But when I upload it to my Microsoft Dashboard, it says
> “The file you selected is not a valid format for submission. Verify your
> selection and, if needed, recreate your submission package and try again.”
>
> On the other hand, signtool does not recognize the .hlkx file as a valid
> file for signing, so how can I get my .hlkx file signed?
>
> I have gone through the following thread which is somewhat relevant but I
> didn’t get the solution.
> http://www.osronline.com/showThread.CFM?link=287826
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

Also, I believe this hits on the utility you need to create to sign your
hlkx package outside of the hlk studio.

https://www.osronline.com/showthread.cfm?link=286631

On Thu, Aug 16, 2018 at 8:03 AM Jesse Conn wrote:

> Might be separate issues.
>
> Part of the process I always have to do is this:
> rename HLKX to .zip, extract contents, then repackage using the windows
> zip utility back to a zip and then rename to hlkx. The portal can then
> properly unpack my submission.
>
> I also recall signing my new package after this? There was a link for the
> sign tool with an example C# code. I used that to create a tool that
> allowed me to sign the package in the first place.
>
> Hope this helps.
>
> On Thu, Aug 16, 2018 at 7:03 AM xxxxx@gmail.com
> wrote:
>
>> I have completed tests on my driver and lastly i want to sign it using my
>> EV code signing certificate.
>> I select the “use the certificate store” option and choose my EV code
>> signing cert. The wizard also asks me the password to login to my Safenet
>> token and finally completes with a message “Successfully packaged the
>> project” and a .hlkx file is generated at the designated path.
>> But when I upload it to my Microsoft Dashboard, it says
>> “The file you selected is not a valid format for submission. Verify your
>> selection and, if needed, recreate your submission package and try again.”
>>
>> On the other hand, signtool does not recognize the .hlkx file as a valid
>> file for signing, so how can I get my .hlkx file signed?
>>
>> I have gone through the following thread which is somewhat relevant but I
>> didn’t get the solution.
>> http://www.osronline.com/showThread.CFM?link=287826
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> Visit the list online at: <
>> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>>
>> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>> software drivers!
>> Details at http:
>>
>> To unsubscribe, visit the List Server section of OSR Online at <
>> http://www.osronline.com/page.cfm?name=ListServer&gt;
>>
></http:>

Thanks Jesse,

I’ve tried applied the first approach but no luck. Regarding the second point, can you guide me to the link that you used for manually signing?

Sorry I didn’t see your second reply earlier. Now following that approach.

After a lot of tries, I decided to contact the digicert help center. The guys asked me to go through the following link to update my code signing certificate on the Microsoft dashboard. The problem was that I had re-keyed my certificate in the hardware token and the the signable file uploaded at the dashboard account was signed with the previous key.

https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/update-a-code-signing-certificate