jennifer stepler wdk program manager. agenda catalog signing vs. embedded signing. how to...

12
Embedded Signing of Drivers Jennifer Stepler WDK Program Manager

Upload: karin-martin

Post on 02-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Embedded Signing of DriversJennifer Stepler

WDK Program Manager

Page 2: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

AgendaCatalog signing vs. embedded signing.How to embed-sign:

Getting StartedPreparing your signing certificateUsing SignTool

Validate your signature.Tips.

Page 3: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Catalog Signing and Embedded SigningCatalog signing:

Catalog contains a hash of all the files in the INF file. Signing the catalog signs the driver package for device installation purposes.

NOTE: Bugs in INF files will result in “unsigned driver” error messages.

Embedded signing:Every binary in the driver package is signed. Embed signing the binaries improves boot loading performance.

Page 4: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Catalog Signing or Embedded Signing

Catalog Signing Embedded Signing

What The .cat file All of the binaries in the Driver Package

Who WHQL YOU

When When you pass the logo tests

Before or after the catalog file is generated and signed

How Logo submission SignTool PLUS code -signing certificate PLUS cross-certificate

Why Seamless device installation

Improve boot performance – x86 TOO

Page 5: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Getting StartedYou need:

Your code signing certificate. The same certificate you use to sign catalog files to submit to WHQL.

Signtool.exe – The tool you use to sign catalog files and binaries.

A cross-signing certificate – Download from:http://www.microsoft.com/whdc/winlogo/drvsign/crosscert.mspx

Page 6: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Preparing Your Signing CertificateFirst, add your code-signing certificate in

your Personal certificate store:You received a .pvk and a .spc file from

VeriSign. Convert them to a .pfx file:pvk2pfx –pvk mypvkfile.pvk –pi mypvkpassword –

spc myspcfile.spc –pfx mypfxfile.pfx –o pfxpassword –f

Add the .pfx file to your Personal certificate store:

Double-click the .pfx file and use the wizard.

Page 7: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Your Signing Certificate

Page 8: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Using SignToolSignTool sign /v /ac <absolutepath>\CrossCertificateFile /s my /

n ”SPCCertificateName’”/t http://timestamp.verisign.com/scripts/timestamp.dll DriverFileName.sys

Where: The sign command configures SignTool to embed a signature in the file

DriverFileName.sys. The /v verbose option configures the tool to print execution and warning

messages. The /ac CrossCertificateFile option specifies the cross-certificate .cer file

that is associated with the SPC that is specified by SPCCertificateName. USE ABSOLUTE PATH.

The /s SPCCertificateStore option specifies the name of the certificate store that holds the SPC that is specified by SPCCertificateName. As described in Software Publisher Certificate (SPC), the certificate information must be contained in .pfx file, and the information in the .pfx file must be added to the Personal certificate store of the local computer. The Personal certificate store is specified by the option /s my.

The /n SPCCertificateName option specifies the name of the certificate in the SPCCertificateStore certificate store. USE QUOTES

The /t http://timestamp.verisign.com/scripts/timestamp.dll option supplies the URL to the publicly-available time-stamp server that VeriSign provides.

DriverFileName.sys is the name of the driver file.

Page 9: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Validate Your SignatureUse SignTool:

SignTool verify /v /kp DriverFileName.sys

The TOP certificate in the chain should be:Microsoft Code Verification Root:

Page 10: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

TipsYou cannot see a cross-certificate in any GUI

that displays a certificate chain (such as File Properties).

You cannot see your signature on the individual binaries in Device Manager (until they fix the bug…).

You can validate that a given binary is “signed” by a given cat file by using SignTool:

SignTool verify /v /kp /c catalogfile.cat DriverFileName.sys

You should embed sign ALL boot load Windows Vista drivers (even x86) to improve boot performance.

Page 11: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

ReferencesWHDC Web siteWDK Documentation Collection

Page 12: Jennifer Stepler WDK Program Manager. Agenda Catalog signing vs. embedded signing. How to embed-sign: Getting Started Preparing your signing certificate

Disclaimer© 2007 Microsoft Corporation. All rights reserved. Microsoft,

Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.