Signing usbser.sys ?????

Hi everybody,
we developed a custom USB device and we own our VID+PID.
When we connect it to a PC we only need the usbser.sys standard driver to generate a virtual serial driver.
Of course we have problems with 8.1 and 10 PCs.

I read that if the device present itself with Class02 and SubClass02, Win10 loads the driver without the need of the INF file. Is it true? I will test soon …

For other OSs we needed to change the INF file, inserting our VID and PID numbers.
This way we lost the sign of the MS driver.
I read about a way to re-sign only the INF file but I don’t know if it is true and how.

Anybody can help me??

It is correct that on Windows 10, the driver will get loaded based on the class subclass match. For 8.1 and older, a custom inf is required.

Sent from my Windows Phone


From: xxxxx@eos.pr.itmailto:xxxxx
Sent: ‎9/‎29/‎2015 6:55 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Signing usbser.sys ???

Hi everybody,
we developed a custom USB device and we own our VID+PID.
When we connect it to a PC we only need the usbser.sys standard driver to generate a virtual serial driver.
Of course we have problems with 8.1 and 10 PCs.

I read that if the device present itself with Class02 and SubClass02, Win10 loads the driver without the need of the INF file. Is it true? I will test soon …

For other OSs we needed to change the INF file, inserting our VID and PID numbers.
This way we lost the sign of the MS driver.
I read about a way to re-sign only the INF file but I don’t know if it is true and how.

Anybody can help me??


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thanks for the confirmation.

So, have sense to sign the INF file only for 8.1 and older?
How can I do it?

I downloaded the WDKs for 8.1 and 10 and both do not include (for example) the signtool and makecert tools ?!?!?!

Hmmm… you did not look very hard, methinks. Try:

C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe
C:\Program Files (x86)\Windows Kits\10\bin\x64\makecert.exe

for “x64” substitute the architecture of your choice, including “arm64” if that’s what you need.

Peter
OSR
@OSRDrivers

Peter,
you’re probably right but this is what I have in that folder (x64):

C:\Program Files (x86)\Windows Kits\8.1\bin\x64>
C:\Program Files (x86)\Windows Kits\8.1\bin\x64>
C:\Program Files (x86)\Windows Kits\8.1\bin\x64>dir
Il volume nell’unit? C non ha etichetta.
Numero di serie del volume: 2CCF-DA9D

Directory di C:\Program Files (x86)\Windows Kits\8.1\bin\x64

25/09/2015 18:59

.
25/09/2015 18:59 ..
22/08/2013 04:04 453.120 DRIVERS.dll
22/08/2013 04:33 31.232 stampinf.exe
22/08/2013 04:04 265.728 WindowsPrefast.dll
3 File 750.080 byte
2 Directory 477.206.237.184 byte disponibili

C:\Program Files (x86)\Windows Kits\8.1\bin\x64>

.. and this is under x86 folder:

C:\Program Files (x86)\Windows Kits\8.1\bin\x86>
C:\Program Files (x86)\Windows Kits\8.1\bin\x86>dir
Il volume nell'unit? C non ha etichetta.
Numero di serie del volume: 2CCF-DA9D

Directory di C:\Program Files (x86)\Windows Kits\8.1\bin\x86

25/09/2015 19:01 .
25/09/2015 19:01 ..
17/06/2013 22:52 195.584 binplace.exe
21/08/2013 20:40 371.712 DRIVERS.dll
31/07/2013 11:25 32.768 Inf2Cat.exe
18/06/2013 05:47 395 inf2cat.exe.manifest
31/07/2013 11:25 60.416 Microsoft.Whos.Shared.IO.Cabinets.dll
31/07/2013 11:25 26.624 Microsoft.Whos.Shared.IO.Catalogs.dll
31/07/2013 11:25 24.576 Microsoft.Whos.Shared.Xml.InfReader.dll
31/07/2013 11:25 146.432 Microsoft.Whos.Winqual.Submissions.SubmissionBuilder.dll
31/07/2013 11:25 28.672 Microsoft.Whos.Xml.NonXmlDataReader.dll
21/08/2013 18:39 179.200 NMake2MSBuild.exe
20/02/2014 03:40 57.856 ProjectUpgradeTool.exe
21/08/2013 16:42 287 ProjectUpgradeTool.exe.config
21/08/2013 21:04 30.208 stampinf.exe
17/06/2013 22:53 35.848 SymbolCheck.dll
21/08/2013 20:40 225.792 WindowsPrefast.dll
18/06/2013 05:47 142.518 WindowsProtectedFiles.xml
17/06/2013 22:53 90.112 wmimofck.exe
25/09/2015 19:00 x64
17 File 1.649.000 byte
3 Directory 477.206.237.184 byte disponibili

C:\Program Files (x86)\Windows Kits\8.1\bin\x86>

I don’t know what to say! Here’s what I get:

C:\Program Files (x86)\Windows Kits\8.1\bin\x86>dir
Volume in drive C has no label.
Volume Serial Number is CF74-A0AB

Directory of C:\Program Files (x86)\Windows Kits\8.1\bin\x86

08/08/2015 06:48 PM

.
08/08/2015 06:48 PM ..
10/25/2013 03:04 PM 1033
05/28/2014 03:35 PM AccChecker
08/21/2013 10:03 PM 122,984 accevent.exe

... (about 170 files omitted here for length) ...

10/24/2014 07:21 PM 554,128 wsutilhelper.dll
05/28/2014 04:11 PM x64
10/24/2014 07:21 PM 259,224 xpsanalyzer.exe
08/21/2013 10:03 PM 60,520 xpsconverter.exe
175 File(s) 39,111,288 bytes
8 Dir(s) 1,474,845,605,888 bytes free

C:\Program Files (x86)\Windows Kits\8.1\bin\x86>

These are the kind of mysteries that I really hate.

Peter
OSR
@OSRDrivers

xxxxx@eos.pr.it wrote:

Peter,
you’re probably right but this is what I have in that folder (x64):

Il volume nell’unit? C non ha etichetta.
Numero di serie del volume: 2CCF-DA9D

Directory di C:\Program Files (x86)\Windows Kits\8.1\bin\x64

25/09/2015 18:59

.
> 25/09/2015 18:59 ..
> 22/08/2013 04:04 453.120 DRIVERS.dll
> 22/08/2013 04:33 31.232 stampinf.exe
> 22/08/2013 04:04 265.728 WindowsPrefast.dll
> 3 File 750.080 byte
> 2 Directory 477.206.237.184 byte disponibili

Did you install the 8.1 SDK as well? The WDK is no longer standalone.
First Visual Studio 2013, then the 8.1 SDK, then the 8.1 WDK.

--
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I can’t honestly recall, but I don’t think I’ve installed the SDK separate since maybe Windows 8?

Does anybody know for sure if it’s still required? Or, maybe if you DON’T install the SDK everything “works” (like, compile and link and stuff) but you don’t get the extra goodies that the OP is missing??

Peter
OSR
@OSRDrivers

The sdk is required to make the wdk usable. It contains shared tools and the shared headers (inc\shared). It comes with VS so most people don’t think about managing that dependency independently.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Tuesday, September 29, 2015 10:49 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Signing usbser.sys ???



I can’t honestly recall, but I don’t think I’ve installed the SDK separate since maybe Windows 8?

Does anybody know for sure if it’s still required? Or, maybe if you DON’T install the SDK everything “works” (like, compile and link and stuff) but you don’t get the extra goodies that the OP is missing??

Peter
OSR
@OSRDrivers


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Wait… so you do NOT have to install the SDK as a separate step, right? You install VS, then you install the WDK, and you’re good to go… right?

Peter
OSR
@OSRDrivers

If you install VS that comes with the matching SDK (ie version match) you are almost always good to go. If the VS SKU (it used to be VS Express, but I don’t know specifically anymore) you choose only installs the modern subset of the SDK you need to install the standalone SDK to get the rest. Nearly all of the SKUs install the full sdk and you don’t have to install it separately.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Tuesday, September 29, 2015 11:18 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Signing usbser.sys ???



Wait… so you do NOT have to install the SDK as a separate step, right? You install VS, then you install the WDK, and you’re good to go… right?

Peter
OSR
@OSRDrivers


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

TU Doron.

Peter
OSR
@OSRDrivers

Vivek Gupta wrote:

It is correct that on Windows 10, the driver will get loaded based on
the class subclass match.

I would personally be interested to know why, after 15+ years, this change was finally made.

Now that we have added support for USB host on mobile sku, we wanted to go further and support USB serial devices as well. Mobile sku doesn’t allow third party infs. This was the primary reason for doing it.

We also converted the driver to wdf so that we feel more confident about its quality.

Sent from my Windows Phone

-----Original Message-----
From: “xxxxx@gmail.com
Sent: ‎9/‎29/‎2015 12:55 PM
To: “Windows System Software Devs Interest List”
Subject: RE:[ntdev] Signing usbser.sys ???

Vivek Gupta wrote:

> It is correct that on Windows 10, the driver will get loaded based on
> the class subclass match.

I would personally be interested to know why, after 15+ years, this change was finally made.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Vivek Gupta wrote:

Now that we have added support for USB host on mobile sku,
we wanted to go further and support USB serial devices as well.
Mobile sku doesn’t allow third party infs. This was the primary
reason for doing it.

Interesting. So how do you know (for example) what “baud rates” to list in the Ports control panel? Weren’t those listed in the third party INF’s, before?

Ok guys,
since the operations is becoming larger than expected, I’d like to return to original question.

How can i sign the INF file to allow the installation of the usbser.sys driver ???
Based on that, I will install the required tools …

xxxxx@gmail.com wrote:

Vivek Gupta wrote:

> Now that we have added support for USB host on mobile sku,
> we wanted to go further and support USB serial devices as well.
> Mobile sku doesn’t allow third party infs. This was the primary
> reason for doing it.
Interesting. So how do you know (for example) what “baud rates” to list in the Ports control panel? Weren’t those listed in the third party INF’s, before?

I’m not sure this matters very much any more. The app just asks for
what it wants, and today’s hardware makes that happen. USB CDC/ACM
doesn’t provide any way to enumerate supported rates.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@eos.pr.it wrote:

How can i sign the INF file to allow the installation of the usbser.sys driver ???
Based on that, I will install the required tools …

Just like always. The INF file uses Needs and Include to bring in
usbser.sys. Then, you run INF2CAT to produce a CAT file that will
encompass only the INF. Then you sign the CAT file. If you need to
target Win 10, you then shove those two files into a CAB and submit that
for attestation.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

OK, now I dowloaded the 8.1 SDK and I’ve found all the tools.
I wrote a batch file and its output is:

C:\Users\acer\Documents\vcidriver>vci

C:\Users\acer\Documents\vcidriver>“\Program Files (x86)\Windows Kits\8.1\bin\x86\Inf2Cat.exe” /v /driver:. /os:XP_X86,Vista_X86,Vista_X64,7_X86,7_X64,8_X86,8_X64,6_3_X86,6_3_X64
Processing directory (C:\Users\acer\Documents\vcidriver) file (globalsign rootca.crt)
Processing directory (C:\Users\acer\Documents\vcidriver) file (vci.bat)
Processing directory (C:\Users\acer\Documents\vcidriver) file (vci.inf)
Processing directory (C:\Users\acer\Documents\vcidriver) file (vci_ntamd64.cat)
Processing directory (C:\Users\acer\Documents\vcidriver) file (vci_ntx86.cat)
Parsing INF: C:\Users\acer\Documents\vcidriver\vci.inf
Finished parsing INFs
Processing INF: C:\Users\acer\Documents\vcidriver\vci.inf
Finished processing INFs
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…
Testing driver package…

Signability test complete.

Errors:
None

Warnings:
None

Catalog generation complete.
C:\Users\acer\Documents\vcidriver\vci_ntx86.cat
C:\Users\acer\Documents\vcidriver\vci_ntamd64.cat

C:\Users\acer\Documents\vcidriver>“\Program Files (x86)\Windows Kits\8.1\bin\x86\SignTool.exe” sign /v /ac “GlobalSign Root CA.crt” /tr http://timestamp.globalsign.com/scripts/timstamp.dll *.cat
SignTool Error: No certificates were found that met all the given criteria.

C:\Users\acer\Documents\vcidriver>

Now I have two cat files but the signtool returns error.
Are these commands correct?

Well… Look at the output from signtool.

You’re attempting to sign your cat file with a cross certificate, but you haven’t provided a certificate to use for signing. That doesn’t make sense.

Peter
OSR
@OSRDrivers