云服务器内容精选

  • 数字签名CMS文件验签操作步骤 1.在"Demo安装包下载"章节中,“表1 Android/Windows/Mac/Electron Demo资源下载路径”中下载的Demo包; 2.下载Demo包到本地; 3.从华为support官网https://support.huawei.com/additionalres/pki 下载根CA证书和4个吊销证书,文件如下: CA文件:Huawei Software Integrity Protection Root CA.der CRL文件:HuaweiRootCA.crl、HuaweiCodeSigningCA.crl、HuaweiCodeSigningCA 2.crl、HuaweiCodeSigningCA 3.crl 4.转换CA证书与CRL文件格式从DER到PEM CRL文件: openssl crl -inform DER -in "HuaweiRootCA.crl" -out HuaweiRootCaCrl.pem openssl crl -inform DER -in "HuaweiCodeSigningCA 3.crl" -out HuaweiCodeSigningCA3.pem openssl crl -inform DER -in "HuaweiCodeSigningCA 2.crl" -out HuaweiCodeSigningCA2.pem openssl crl -inform DER -in HuaweiCodeSigningCA.crl -out HuaweiCodeSigningCA.pem CA文件: openssl x509 -inform DER -in "Huawei Software Integrity Protection Root CA.der" -out HuaweiRootCA.pem 5. 记事本打开步骤4中的文件,将CRL文件粘贴到CA文件后"HuaweiRootCA.pem" 6.CMS验证 openssl cms -verify -inform DER -crl_check_all -in hmwsdk-win-demo-win32.zip.cms -content hmwsdk-win-demo-win32.zip -CAfile HuaweiRootCA.pem -out cmsVerifiedData -binary -purpose any -certsout tmpCertChain.pem 命令执行结果示例,如下所示表示验签成功: CMS Verification successful
  • SHA256值比较操作步骤 1.在"Demo安装包下载"章节中,“表1 Android/Windows/Mac/Electron Demo资源下载路径”中下载的Demo包; 2.下载Demo包到本地; 3.打开本地命令提示符框,输入如下命令,在本地生成已下载的Demo包的SHA256值,其中,“D:\hmwsdk-win-demo-win32.zip”为SDK包的本地存放路径和SDK包名,请根据实际情况修改。 certutil -hashfile D:\hmwsdk-win-demo-win32.zip SHA256 命令执行结果示例,如下所示: SHA256 的 D:\hmwsdk-win-demo-win32.zip 哈希: 67244236887ae862adbe2c8ee2f4612e5d483d0562087c7f084484318655d702 CertUtil: -hashfile 命令成功完成。 对比查询的SDK包的SHA256值和下载后的SDK包的SHA256值。如果一致,则表示下载过程不存在篡改和丢包。
  • Demo安装包下载 Demo下载后可参考Demo 包完整性校验进行包完整性校验。 Android Demo安装包下载 图1 Android Demo安装包下载二维码 使用手机浏览器扫一扫下载 Windows Demo安装包下载 图2 Windows Demo安装包下载链接 32位Windows Demo下载链接:hmwsdk-win-demo-win32.zip 完整性校验 hwmsdk-win-demo-win32-sha256 64位Windows Demo下载链接:hmwsdk-win-demo-x64.zip 完整性校验 hwmsdk-win-demo-x64-sha256 Mac Demo安装包下载 图3 Mac Demo安装包下载链接 Intel芯片版Mac Demo下载链接:hwmsdk-mac-demo.dmg 完整性校验hwmsdk-mac-demo-sha256 M系列芯片版Mac Demo下载链接:hwmsdk-mac-arm64-demo.dmg 完整性校验hwmsdk-mac-arm64-demo-sha256 Electron Demo安装包下载 图4 Electron Demo安装包下载链接 32位Windows Electron Demo下载链接:hwmsdk-electron-demo-win-ia32.zip 完整性校验 hwmsdk-electron-demo-win-ia32-sha256 64位Windows Electron Demo下载链接:hwmsdk-electron-demo-win-x64.zip 完整性校验 hwmsdk-electron-demo-win-x64-sha256 Intel芯片版Mac Electron Demo下载链接:hwmsdk-electron-demo-mac.dmg 完整性校验 hwmsdk-electron-demo-mac-sha256 M系列芯片版Mac Electron Demo下载链接:hwmsdk-electron-demo-mac-arm64.dmg 完整性校验 hwmsdk-electron-demo-mac-arm64-sha256 父主题: Demo体验