gpt4 book ai didi

windows - 签名的 ghostscript postscript 打印驱动程序

转载 作者:可可西里 更新时间:2023-11-01 09:20:36 29 4
gpt4 key购买 nike

我正在使用 ghostscript (lib/ghostpdf.inf) 附带的 Windows postscript 打印驱动程序从打印作业生成 postscript 文件。

但是 postscript 驱动程序没有数字签名,因此 Windows 8 和 Windows Server 2012 不允许在不启动到“允许未签名的驱动程序”模式的情况下安装它。

你知道是否有任何签名版本可以与最新的 Windows 版本一起使用吗?

如果不是这样,我自己编译和签名很好,但是我无法在 http://git.ghostscript.com/ghostpdl.git 的 git 存储库中找到 postscript 打印驱动程序的源代码。 .我可能只是监督它,因为我不熟悉构建驱动程序。

能否提示我在哪里可以找到 postscript 驱动程序文件来自己编译它?

编辑:.INF 文件如何告诉 Windows 驱动程序二进制文件所在的位置?我查看了“ClassGUID”,但它对所有驱动程序都是一样的,注册表项说明了一些关于 C:\Windows\System32\ntprint.dll 的内容。我不认为这对问题很重要,是吗?

最佳答案

要签署“ghostscript 驱动程序”,您只需签署 Ghostscript 附带的 INF 文件。

有一个 article on technet描述这样做所需的步骤。

步骤是:

1) 创建/获取证书
2) 确保您的计算机信任该证书(如果需要,将其放入您的证书存储区)
3) 下载并安装 Windows Driver Kit (WDK)
4) 将INF文件中的CatalogFile=oemprint.cat修改为ghostpdf.cat
5) 将DriverVer=01/02/2007,1.0.0.1更改为DriverVer=01/01/2013,1.0.0.1(也许你需要其他日期,你将在下一步中看到)
6) 使用 Inf2Cat 工具创建一个 cat 文件(对我来说位于 C:\Program Files (x86)\Windows Kits\8.0\bin\x86):

注意
使用 cmd.exe 而不是 powershell,因为 powershell 始终给出 Parameter format not correct. 错误

命令:

inf2cat.exe /driver:c:\path\to\folder\whereCatFileIsIn /os:7_X86,7_X64,8_X86,8_X64[,other OS you'd like to support]

7) 使用 signtool 对 cat 文件进行签名(与 Inf2Cat 工具相同的目录)

命令:

SignTool.exe sign /f "C:Path\to\my.pfx" /t http://timestamp.verisign.com/scripts/timestamp.dll "C:\Path\To\ghostpdf.cat"

(有关可用参数的更多信息,请参阅 signtool docs)

关于windows - 签名的 ghostscript postscript 打印驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19520540/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com