Skip to content
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

Windows requires a digitally signed driver #187

Closed
qaisjp opened this issue Mar 3, 2016 · 23 comments
Closed

Windows requires a digitally signed driver #187

qaisjp opened this issue Mar 3, 2016 · 23 comments

Comments

@qaisjp
Copy link

qaisjp commented Mar 3, 2016

when installing "DokanSetup_redist.exe" in v1.0.0-RC1

image

I'm on Windows Enterprise 7

@Liryna
Copy link
Member

Liryna commented Mar 3, 2016

Did you update you windows 7 ?
The drivers are signed SHA1/SHA2, you can see it in the file properties.

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

image

I'm on a networked computer so I cannot update this computer. There was a recent update to this computer but I'm not sure if that's what you're talking about

image
image

@Liryna
Copy link
Member

Liryna commented Mar 3, 2016

Yes, Thanks this is what I am talking about.

There should be two signature but since your system is not updated it only see the SHA1 that is Microsoft deprecated....since 2016.

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

Okay well I've disabled verification using bcdedit /set nointegritychecks ON... lets hope it works..

@js69
Copy link

js69 commented Mar 3, 2016

Is Service Pack 1 installed for that Windows 7? The setup should fail if it isn't but let's verify anyway.

SHA2 for Windows 7 might need this Windows update:
https://technet.microsoft.com/en-us/library/security/3033929

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

No idea if SP1 is installed ... like I said I can't install any updates because updates are managed by my sysadmin.

@js69
Copy link

js69 commented Mar 3, 2016

You could post the setup log files, in your %TEMP% there should be Dokan* text files.

@Liryna
Copy link
Member

Liryna commented Mar 3, 2016

I question myself about the dokan signature process....
We are using SHA2 certificate to sign SHA1 & SHA2.

I am wondering if we need a SHA1 cert to sign SHA1 and cert SHA2 to sign SHA2.
@js69 do you know something about it ?
Because it is strange that @qaisjp see a mix of SHA1/SHA2.

Our sign script:
https://github.com/dokan-dev/dokany/blob/master/sign.ps1#L3

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

sha1 is for the countersign

image

if that makes a difference

@js69
Copy link

js69 commented Mar 3, 2016

DIFXAPP: ERROR: Unable to start service 'dokan' because of error 0x241

qaisjp: I think you should try to use the fixed driver package mentioned in issue 179:

https://drive.google.com/folderview?id=0B3E9tU82h-RMMmh3RkJFamM4WTA&usp=sharing

@js69
Copy link

js69 commented Mar 3, 2016

"I am wondering if we need a SHA1 cert to sign SHA1 and cert SHA2 to sign SHA2."

I don't think so. The only potential issue I would suspect is with non-updated Win 7 if you use a SHA2 cert for anything.

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

The fixed drivers aren't working either.

New set of logs: https://www.dropbox.com/sh/0cvw913y3kloans/AABNdN4Kf7HnKqjq1myC9GMQa?dl=0

@qaisjp
Copy link
Author

qaisjp commented Mar 3, 2016

Okay well I've reverted back to 0.7.3 (and an old version of winssh-fs)... the bug still probably exists for people in the same situation as me though.

@qaisjp qaisjp closed this as completed Mar 3, 2016
@Liryna
Copy link
Member

Liryna commented Mar 3, 2016

0.7.x will work because there was sign SHA1 before 2016.

This is a Microsoft limitations, I don't think we can do much with it sorry.

@js69
Copy link

js69 commented Mar 3, 2016

You could perhaps create a test driver setup signed with your old SHA1-cert to verify that is the reason here.

@js69
Copy link

js69 commented Mar 3, 2016

qaisjp, you don't have any chance of installing https://support.microsoft.com/en-us/kb/3033929 on your machine?

@js69
Copy link

js69 commented Mar 3, 2016

Some useful info on certificate issues can be found here:

http://www.davidegrayson.com/signing/#kmod

@GrantGatchel
Copy link

Installing the Security Update for Windows 7 (KB3033929) helped me:
https://www.microsoft.com/en-us/download/details.aspx?id=46078

@js69
Copy link

js69 commented Mar 11, 2016

Liryna, I think on WIn7 we should install KB3033929 as well with the bundle like we do it with the UCRT KB update.

@Liryna
Copy link
Member

Liryna commented Mar 11, 2016

It seems that we will need to do it yes. it is really strange that even without this patch it cannot validate the SHA1....

@js69
Copy link

js69 commented May 6, 2016

Liryna, I've implemented KB3033929 installation with the bundle but that's not a final or elegant solution.

The update requires a restart before it becomes active:

Applied execute package: Win71_KB3033929_x64, result: 0x0, restart: Required

Because that restart is not scheduled by WiX Burn before the Dokan driver is installed, users will still see the unsigned driver warning. After restart the driver though is installed correctly because the KB3033929-updated DLLs will then allow SHA256-signed drivers.

Adding the KB3033929 msu files also increases the size of DokanSetup_redist.exe to 110 MB.

Scheduling the restart before Dokan driver installation is only possible with a custom bootstrapper.

As an alternative I'd rather implement a check for install status of KB3033929 and show an error in case it isn't already installed (only relevant for WIn 7).

@Liryna
Copy link
Member

Liryna commented May 6, 2016

@js69 Thank you for the test !
I think your solution of showing an error on Win7 would be the best solution as you said !

Rondom added a commit to Rondom/dokany that referenced this issue Jun 13, 2016
KB3033929 is needed to support SHA2-signatures on Windows 7 / 2008 R2.
MSI installation now fails if it is not installed.
Closes dokan-dev#187 and dokan-dev#244.
Rondom added a commit to Rondom/dokany that referenced this issue Jun 20, 2016
Due to some oddity, we need to specify a version that is one version
lower than the one we are actually searching for.
References: dokan-dev#260, dokan-dev#244, dokan-dev#187

Quoting WiX-documentation:
Important: When doing a locale-neutral search for a file, you must set
the MinVersion property to one revision number lower than the actual
version you want to search for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants