当前位置:网站首页>Create a self signed certificate to digitally sign exe files
Create a self signed certificate to digitally sign exe files
2022-07-24 00:53:00 【Yulong_】
It only needs a few simple steps to operate :
1、 Run with administrator privileges PowerShell
2、 Execute the following command
New-SelfSignedCertificate -Type Custom -Subject "CN= full name , O= Corporate name , C=CN, L= Shanghai , S= Shanghai " -KeyUsage DigitalSignature -FriendlyName "MailTool" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}") -NotAfter (Get-Date).AddYears(10)
3、 Execute the following command
$password = ConvertTo-SecureString -String 123456 -Force -AsPlainText
4、 Execute the command to export the certificate , You have to modify the path and other information according to the actual situation
Export-PfxCertificate -cert "Cert:\CurrentUser\My\1F1B377E08BE74E2D739F0FC638370A93DF0D946" -FilePath C:\Users\admin\Desktop\dump\ Signature \test.pfx -Password $password
Let's look at the signature catalogue , The following has been generated test.pfx file

5、 Now we use certificates to Test.exe To sign :
Administrator run CMD Command line , And switch to the signature directory , Execute the following command :
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool.exe" sign /f test.pfx /p 123456 /t http://timestamp.digicert.com /v "test.exe"This signtool.exe It's installation Windows I brought it with me when I developed the package , My path , Specific search , The result of executing the command is like this :

Let's look at Test.exe Certificate

Okay , It's all right .
Reference article :
Microsoft official documents :
New-SelfSignedCertificate (pki) | Microsoft Docs
SignTool.exe (Sign Tool) - .NET Framework | Microsoft Docs
Blog :
边栏推荐
- Communication module sorting (II) hc-05
- Notes and Reflections on the red dust of the sky (V) strong culture and weak culture
- How to use mitmproxy to get data return in automated testing?
- Tutorial on principles and applications of database system (043) -- MySQL query (V): Sorting Query Results
- 这是一道大水题
- Tutorial on the principle and application of database system (049) -- MySQL query (XI): sub query
- 暑假第四周总结
- Classic examples of C language - use 4 × The matrix displays all integers from 1 to 16 and calculates the sum of each row, column, and diagonal
- Interviewer: if the order is not paid within 30 minutes after it is generated, it will be automatically cancelled. How to realize it?
- Comparison of image preprocessing between pytorch opencv pil
猜你喜欢

How to improve data quality

Customize an object

Introduction to QT (2.1 the first procedure for the beginning of QT)

Redis common commands

Programmeur de cheval noir - test d'interface - test d'interface d'apprentissage de quatre jours - jour 4 - Postman lit des fichiers de données externes, lit des données de fichiers de données, IHRM P

Flutter | the easiest way to add header and footer to listview

网络系统实验:ping不通的问题解决

A good habit to develop when writing SQL

Solve the problem that MySQL inserts Chinese garbled code into the table

Centernet target detection model and centerfusion fusion target detection model
随机推荐
Prometheus+node exporter+grafana monitoring server system resources
Testers who have been employed for 3 months are facing employment confirmation. Leaders: 1 year of work experience is packaged into 5 years, and the probation period is eliminated
Dark horse programmer - interface test - four day learning interface test - day 4 - postman reads external data files, reads data files, IHRM project practice, employee management module, adds employe
How to relieve the pillow quickly
Flutter | firstwhere error reporting
Solve the problem that MySQL inserts Chinese garbled code into the table
Expérience du système réseau: résoudre les problèmes de ping
【电赛训练】非接触物体尺寸形态测量 2020年电赛G题
Unity metaverse (I). Ready player me & blender customize your Avatar
Tutorial on the principle and application of database system (044) -- MySQL query (VI): using the limit option to realize paging query
How to realize 485 wireless communication between multiple sensors and Siemens PLC?
采坑websocket总结
Centernet target detection model and centerfusion fusion target detection model
测试小码农也有大目标,最新BAT大厂面试题大总结(持续更新中...)
Tutorial on principles and applications of database system (039) -- MySQL query (I): syntax analysis of select command
Bean Validation使用篇----05
VIM common commands
Case error of MySQL branch statement
Intelligent OCR identification of express documents helps the logistics industry to upgrade Digitalization
MariaDB database upgrade version