问题描述
升级包和烧片包中, 预置的白牌包没有生效(体现在ssl证书在烧片和升级后没有导入)
环境信息
重现步骤
- manifest配置如下, 预期会包ssl证书打入hpm包
wbd_up_files: # 会自动打包集成到hpm里面的白牌包
files:
- file: ${board_path}/wbd_up_file/favicon.ico
dst: wbd_up_file/favicon.ico
- file: ${board_path}/wbd_up_file/filelist.conf
dst: wbd_up_file/filelist.conf
- file: ${board_path}/wbd_up_file/web_custom.xml
dst: wbd_up_file/web_custom.xml
- file: ${board_path}/wbd_up_file/customize.pfx
dst: wbd_up_file/customize.pfx
manufacture:
0502YGWD: # 烧片包
wbd_up_files: # 会自动打包集成到hpm里面的白牌包
files:
- file: ${board_path}/wbd_up_file/favicon.ico
dst: wbd_up_file/favicon.ico
- file: ${board_path}/wbd_up_file/filelist.conf
dst: wbd_up_file/filelist.conf
- file: ${board_path}/wbd_up_file/web_custom.xml
dst: wbd_up_file/web_custom.xml
- file: ${board_path}/wbd_up_file/customize.pfx
dst: wbd_up_file/customize.pfx
- 编译后, 烧片, 预置的ssl证书没有生效, 体现在web无响应
- 查看环境, 发现环境上白牌包tar包已经打入
70.183.12.117 iBMC-1711 /opt/bmc/apps/hica # ls /opt/bmc/white_branding/
wbd_up_file.tar.gz
- 使用通用的ssl证书做成的单独的白牌包, 升级后可以生效,导入ssl证书成功
0502YLAK: # 通用的SSL的白牌包
wbd_hpms:
# repo为存放白牌包定制文件的仓库地址,需要填写https下载的地址
- repo: https://.git
# tag为存放定制文件的分支tag号
tag: master
files:
# path为白牌定制文件存放路径,但是dst路径不可修改,均为"wbd_up_file/文件名"的格式,如下示例
- file: CI_Build/common_wbd/wbd_up_file/web_custom.xml
dst: wbd_up_file/web_custom.xml
- file: CI_Build/common_wbd/wbd_up_file/filelist.conf
dst: wbd_up_file/filelist.conf
- file: CI_Build/common_wbd/wbd_up_file/customize.pfx
dst: wbd_up_file/customize.pfx
# 下列文件都是制作白牌包必须文件,路径固定,不可删除
- file: /usr/share/bmcgo/wbd-packet/beforeaction.sh
- file: /usr/share/bmcgo/wbd-packet/afteraction.sh
dst: afteraction.sh
- file: /usr/share/bmcgo/wbd-packet/CfgFileList.conf
- file: /usr/share/bmcgo/wbd-packet/firstboot.sh
- file: /usr/share/bmcgo/wbd-packet/hpm_wbd.config
- file: /usr/share/bmcgo/wbd-packet/packetwbd.sh
- file: /usr/share/bmcgo/wbd-packet/update.cfg
# dst为最后制作出来的白牌包名称
期望结果
在配置wbd_up_files后, 预期烧片包和hpm包都能直接升级生效白牌包配置文件
实际结果
见问题描述
尝试过的解决方案
分析结论
这个是烧片后的一键收集日志
dump_null_20260401-0647.tar.gz (2.3 MB)
这条操作日志对应的是我手动升级 SSL白牌包的时间点, 在此之前, 没有尝试导入ssl的记录
2026-04-01 02:54:06 CLI,Administrator@192.168.109.123:9326,firmware_mgmt,Upgrade image.hpm started
2026-04-01 02:54:10 CLI,Administrator@192.168.109.123:9326,trust,Import custom certificate successfully
vyasa
(欧文健)
4
预制证书是否带有 PreSSLSeverCountry 字段?
从AI解包的情况来看, pfx中没有带这个字段;
我的XML文件里面带了
<?xml version="1.0" encoding="UTF-8"?>
<CUSTOM_CONFIG>
<!-- SSL证书预置信息,当前安装的SSL证书的签发者信息和预置信息一致时,认为当前SSL证书是预置证书,web会提醒用户安装新证书 -->
<PreSSLSeverCommonName VALUE="Henan Kunlun Technologies IT Product"/>
<PreSSLSeverOrgName VALUE="Henan Kunlun Technologies"/>
<PreSSLSeverCountry VALUE=""/>
</CUSTOM_CONFIG>
pfx文件解出后的字段
Shell openssl pkcs12 -in /tmp/customize_pre.pfx -passin "pass:" -nodes 2>/dev/null | openssl x509 -text -noout 2>&1 (查看证书完整内容) │
│ │
│ Certificate: │
│ Data: │
│ Version: 3 (0x2) │
│ Serial Number: │
│ 20:24:07:19:18:01:11:4b:4c:e9:1f:ff:cd:bc:47:60:86:11 │
│ Signature Algorithm: sha256WithRSAEncryption │
│ Issuer: O = Henan Kunlun Technologies, CN = Henan Kunlun Technologies Equipment CA 1 - G1 │
│ Validity │
│ Not Before: Jul 19 10:01:11 2024 GMT │
│ Not After : Jul 17 10:01:11 2034 GMT │
│ Subject: O = Henan Kunlun Technologies, CN = Henan Kunlun Technologies IT Product │
│ Subject Public Key Info: │
│ Public Key Algorithm: rsaEncryption │
│ Public-Key: (2048 bit) │
│ Modulus: │
│ 00:bb:db:29:d4:f1:f2:b2:6d:09:c4:6b:f4:ae:ed: │
│ de:04:c0:10:19:3c:0a:ae:98:89:08:a4:c0:55:74: │
│ db:38:17:fb:4f:95:a6:fe:85:13:22:e8:d7:8a:b4: │
│ ba:05:93:35:cc:f3:56:97:22:20:47:80:3c:6f:77: │
│ 9a:84:7e:e1:5f:a9:ae:76:e6:a5:66:1b:a5:f1:fb: │
│ e7:81:0c:f1:bf:1b:5a:44:ea:be:83:57:e7:0e:34: │
│ 01:63:1d:b4:49:62:35:64:53:be:ea:1f:63:61:61: │
│ 90:8a:ef:1d:97:9e:4c:bf:9e:46:1c:5d:df:e2:38: │
│ 04:14:30:a4:6b:bd:b0:e3:f9:15:1f:31:e4:b8:9f: │
│ 20:9d:24:56:a3:8a:68:bf:33:98:0f:4e:56:60:27: │
│ 20:08:00:35:a9:5d:d0:e7:e7:2f:b5:24:63:1b:da: │
│ 68:cd:80:bc:46:60:e9:62:4e:a9:30:82:be:39:e9: │
│ c8:c8:f4:3f:80:45:2d:bf:58:53:4d:1b:ae:4b:c4: │
│ 63:cc:92:11:e5:83:21:9e:9f:01:26:38:96:74:46: │
│ 59:67:fb:31:f8:5e:9f:24:ef:0c:bb:c5:b8:21:87: │
│ 58:f1:74:e8:23:a7:c6:1f:c0:f0:10:0b:ef:64:a5: │
│ 96:d0:b6:5f:56:49:e8:72:4c:1f:be:f0:be:d3:5b: │
│ 6e:67 │
│ Exponent: 65537 (0x10001) │
│ X509v3 extensions: │
│ X509v3 Authority Key Identifier: │
│ 10:08:B4:23:47:50:CC:24:1D:52:9D:35:E4:08:FE:2F:9A:E0:9D:5B │
│ X509v3 Subject Key Identifier: │
│ 55:92:E1:B9:1B:6E:80:36:33:AB:C8:83:71:99:0D:C9:60:FA:58:4B │
│ X509v3 Subject Alternative Name: │
│ email:support@kunlunit.com │
│ X509v3 Basic Constraints: │
│ CA:FALSE │
│ X509v3 Certificate Policies: │
│ Policy: 1.3.6.1.4.1.59988.201.1.4.1 │
│ CPS: http://support.kunlunit.com/pki │
│ X509v3 Key Usage: critical │
│ Digital Signature, Key Encipherment, Key Agreement │
│ X509v3 CRL Distribution Points: │
│ Full Name: │
│ URI:http://support.kunlunit.com/pki/equipment_ca1_g1crl.crl │
│ X509v3 Extended Key Usage: │
│ TLS Web Server Authentication, TLS Web Client Authentication │
│ Signature Algorithm: sha256WithRSAEncryption │
│ Signature Value: │
│ e0:ba:7b:ef:7e:51:d3:a0:08:4b:3e:ae:43:8c:51:84:55:fd:
AI分析证书结论
根据我的分析,这个 customize.pfx 证书文件中没有 PreSSLSeverCountry 字段。
检查结果总结
┌────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
│ 检查项 │ 结果 │
├────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ 证书主题 (Subject) │ O = Henan Kunlun Technologies, CN = Henan Kunlun Technologies IT Product │
│ 颁发者 (Issuer) │ O = Henan Kunlun Technologies, CN = Henan Kunlun Technologies Equipment CA 1 - G1 │
│ 有效期 │ 2024-07-19 至 2034-07-17 │
│ SAN (Subject Alternative Name) │ email:support@kunlunit.com │
│ 证书策略 OID │ 1.3.6.1.4.1.59988.201.1.4.1 │
│ 用途 │ 数字签名、密钥加密、密钥协商、TLS 服务器/客户端认证 │
│ PreSSLSeverCountry 字段 │ ❌ 不存在 │
└────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────┘
证书包含的标准 X509v3 扩展字段:
- Authority Key Identifier
- Subject Key Identifier
- Subject Alternative Name (仅 email)
- Basic Constraints (CA:FALSE)
- Certificate Policies
- Key Usage
- CRL Distribution Points
- Extended Key Usage
结论:该 PFX 证书是标准的 SSL 客户端/服务器证书,不包含 PreSSLSeverCountry 这类自定义字段。如果 V3 白牌包需要这个字段才能正常导入,可能需要重新生成包含该字段的证书。
是的 同一个证书; 证书我传上来了, 但是一直在社区审批中
vyasa
(欧文健)
9
再确认一下 web_custom.xml 是否一致呢,目前日志分析是定制的属性 PreSSLSeverCommonName, PreSSLSeverOrgName 或者 PreSSLSeverCountry 有差异。
这个是我的白牌包的内容
customize.tar (27.5 KB)
vyasa
(欧文健)
11
两种方式的 web_custom.xml 文件定制的 PreSSLSever 相关属性是否是相同的? 主要是看看 PreSSLSeverCountry 是否相同,从日志来看是该字段为空字符串导致的问题。
看起来证书本身没有这个字段, 是否只能重新生成证书?
vyasa
(欧文健)
13
可以先在 web_custom.xml 中给 PreSSLSeverCountry 填入一个非空值试试。证书正常应该都是包含国家信息的。