Code Monkey home page Code Monkey logo

yubikey-code-signing's Introduction

yubikey-code-signing

This repo aiming to help that quite complicated digital code signing process.

Requirements

This repo used Yubikey 5C FIPS device, please be sure that your own device support features below.

Windows SDK - signtool.exe

To get that tool, please refer to Windows SDK site, install relevant windows SDK version Then you can find your signtool like below C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 For configuring your signtool.exe, please open

  • โŠž Win + R
  • enter sysdm.cpl
  • Click advanced tab and environment variables
  • Under system variables open Path then paste your signtool folder
  • then finish and close all tabs open a new editor as administrator

You must be sure, you need to generate .csr files before and send it to them to code signing provider. They will generate .crt files, download them and follow these lines below. If you don't know how to generate .csr files , follow providers documentation..

Installation

Root Certificate : my own certificate started like 1705XXXXXX.crt(includes your company information and timestamp )

Intermediate Certificate : my own certificate started like CodeSigning_CABundle.crt(includes code signing provider information)

After install all required programs, please follow the lines below.

  1. Open Yubikey Manager and select tab(Authentication or Digital Signature that tab used for generate .csr files before) Enter Import button and select your Root certificate. If you not created Management Key select use default checkbox, or enter your own Management Key. yubikey

  2. Be sure that you get your certificates(.crt) from your digital code sign provider (ex: signmycode) You must get 3 more certificates for importing to Yubikey. These called(maybe different for you)

  • AAACertificateServices.crt (ROOT)
  • SectigoPublicCodeSigningCAEVE36.crt (INTERMEDIATE 1)
  • SectigoPublicCodeSigningRootE46_AAA.crt (INTERMEDIATE 2)

Open powershell as administrator, then

cd "C:\Program Files\Yubico\YubiKey Manager"

Enter the lines below (give your own .crt paths)

.\ykman.exe piv certificates import 82 "C:\Users\ege\AAACertificateServices.crt"  
.\ykman.exe piv certificates import 83 "C:\Users\ege\SectigoPublicCodeSigningCAEVE36.crt"
.\ykman.exe piv certificates import 84 "C:\Users\ege\SectigoPublicCodeSigningRootE46_AAA.crt"     
  1. Get your ROOT_THUMBPRINT, double click your Root Certificate then click details tab, you can see below as Thumbprint Copy the Thumbprint value now that is your ROOT_THUMBPRINT. Now, follow the last step.

thumbprint

  1. For sign your .exe applications, follow the lines
signtool sign /sha1 ROOT_THUMBPRINT /fd SHA256 /t PROVIDER_TIMESTAMP "YOUR .EXE FILE"

That's look like below:


signtool sign /sha1 XXXXXXXXXXXXXXXXXXXXXXX /fd SHA256 /t http://timestamp.sectigo.com "C:\Users\ege\MyTestApp.exe"

code_signing

yubikey-code-signing's People

Contributors

egemengulpinar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.