2016-04-21 123 views
2

是否可以通過命令行從sys驅動程序文件中提取數字簽名證書?從.sys文件提取證書

要麼使用第三方工具或內置的Windows工具?

感謝

回答

2

使用PowerShell它很容易:

$driverFile = 'C:\temp\myDriver.sys'; 
$outputFile = 'C:\temp\output.cer'; 
$exportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert; 

$cert = (Get-AuthenticodeSignature $driverFile).SignerCertificate; 
[System.IO.File]::WriteAllBytes($outputFile, $cert.Export($exportType));