11cb0ef41Sopenharmony_ci@echo off
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci@REM From December 2023, new certificates use DigiCert cloud HSM service for EV signing.
41cb0ef41Sopenharmony_ci@REM They provide a client side app smctl.exe for managing certificates and signing process.
51cb0ef41Sopenharmony_ci@REM Release CI machines are configured to have it in the PATH so this can be used safely.
61cb0ef41Sopenharmony_cismctl sign -k key_nodejs -i %1
71cb0ef41Sopenharmony_ciif not ERRORLEVEL 1 (
81cb0ef41Sopenharmony_ci    echo Successfully signed %1 using smctl
91cb0ef41Sopenharmony_ci    exit /b 0
101cb0ef41Sopenharmony_ci)
111cb0ef41Sopenharmony_ciecho Could not sign %1 using smctl
121cb0ef41Sopenharmony_ciexit /b 1