如何将版本信息添加到openssl 3.0.2 fips.dll?

发布于 2025-01-26 19:32:48 字数 1594 浏览 2 评论 0原文

在Windows上,我基本上运行了这些批处理命令来构建OpenSSL 3.0.2 FIPS模块( fips.dll ):

perl Configure VC-WIN64A -MT -Z7 no-shared enable-fips
nmake

构建完成后, fips.dll 大多数是空白详细信息

#include <winver.h>

LANGUAGE 0x09,0x01

1 VERSIONINFO
  FILEVERSION 3,0,2,0
  PRODUCTVERSION 3,0,2,0
  FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x01L
#else
  FILEFLAGS 0x00L
#endif
  FILEOS VOS__WINDOWS32
  FILETYPE VFT_APP
  FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            // Required:
            VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\0"
            VALUE "FileDescription", "OpenSSL application\0"
            VALUE "FileVersion", "3.0.2\0"
            VALUE "InternalName", "openssl\0"
            VALUE "OriginalFilename", "openssl\0"
            VALUE "ProductName", "The OpenSSL Toolkit\0"
            VALUE "ProductVersion", "3.0.2\0"
            // Optional:
            //VALUE "Comments", "\0"
            VALUE "LegalCopyright", "Copyright 1998-2022 The OpenSSL Authors. All rights reserved.\0"
            //VALUE "LegalTrademarks", "\0"
            //VALUE "PrivateBuild", "\0"
            //VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 0x4b0
    END
END

​.rc 详细信息 fips.dll
也许某些脚本可以添加版本信息,希望以后fips文件校验和有效吗?

On Windows, I basically run these batch commands to build the OpenSSL 3.0.2 FIPS module (fips.dll):

perl Configure VC-WIN64A -MT -Z7 no-shared enable-fips
nmake

After the build completes, the fips.dll has mostly blank details

3.0.2

However, during the build process, an openssl.rc is created with these details

#include <winver.h>

LANGUAGE 0x09,0x01

1 VERSIONINFO
  FILEVERSION 3,0,2,0
  PRODUCTVERSION 3,0,2,0
  FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x01L
#else
  FILEFLAGS 0x00L
#endif
  FILEOS VOS__WINDOWS32
  FILETYPE VFT_APP
  FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            // Required:
            VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\0"
            VALUE "FileDescription", "OpenSSL application\0"
            VALUE "FileVersion", "3.0.2\0"
            VALUE "InternalName", "openssl\0"
            VALUE "OriginalFilename", "openssl\0"
            VALUE "ProductName", "The OpenSSL Toolkit\0"
            VALUE "ProductVersion", "3.0.2\0"
            // Optional:
            //VALUE "Comments", "\0"
            VALUE "LegalCopyright", "Copyright 1998-2022 The OpenSSL Authors. All rights reserved.\0"
            //VALUE "LegalTrademarks", "\0"
            //VALUE "PrivateBuild", "\0"
            //VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 0x4b0
    END
END

Question

Is there a way to include those openssl.rc details into the final fips.dll?
Maybe there's an option to some script which can add the version info and hopefully the FIPS file checksum is still valid afterwards?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无人问我粥可暖 2025-02-02 19:32:48

解决如下:

复制此构建生成的资源文件以

C:\OpenSSL-Builds\openssl-3.0.2\apps\openssl-bin-openssl.res

下载

C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\version.res

并运行

resourcehacker.exe.exe -open
“ c:\ openssl-builds \ openssloutput-3.0.2 \ fips64 \ fips.dll” -save fips.dll
-action AddoverWrite -Resource“ C:\ openssl-Builds \ openssloutput-3.0.2 \ fips64 \ version.res”

重要,在下面运行此命令以再生FIPS模块配置文件。此配置
每次加载FIPS模块以将数据传递到FIPS时,都可以使用文件
模块自我测试。

openssl.exe fipsInstall -模块
“ C:\ openssl-Builds \ openssloutput-3.0.2 \ fips64 \ fips.dll” -out
“ c:\ openssl-builds \ openssloutput-3.0.2 \ fips64 \ fips.cnf”

fips.dll现在应显示更新版本Info

“

Resolved as follows:

Copy this build generated resource file from

C:\OpenSSL-Builds\openssl-3.0.2\apps\openssl-bin-openssl.res

to

C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\version.res

Download and run

ResourceHacker.exe -open
"C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\fips.dll" -save fips.dll
-action addoverwrite -resource "C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\version.res"

Important, run this command below to regenerate a FIPS module configuration file. This configuration
file can be used each time a FIPS module is loaded in order to pass data to the FIPS
module self tests.

openssl.exe fipsinstall -module
"C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\fips.dll" -out
"C:\OpenSSL-Builds\OpenSSLoutput-3.0.2\FIPS64\fips.cnf"

The fips.dll should now show the updated version info

openssl3.0.version.info

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文