diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/build_js_assets.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/build_js_assets.patch
new file mode 100644
index 0000000000000000000000000000000000000000..416e3037df0141acdc00336ee48fba8481f1efd3
--- /dev/null
+++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/build_js_assets.patch
@@ -0,0 +1,28 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+Patch for //build git repository of OpenHarmony 3.0 codebase.
+
+This is a workaround for problem with nodejs 17:
+ error:0308010C:digital envelope routines::unsupported
+
+Even if NODE_OPTIONS is set in the recipe, it has to be also set here
+since the environment passed to nodejs is reset in this script.
+
+Signed-off-by: Thierry Escande <thierry.escande@huawei.com>
+Upstream-Status: Inappropriate
+
+diff --git a/scripts/build_js_assets.py b/scripts/build_js_assets.py
+index 624d594..f6fcd1b 100755
+--- a/scripts/build_js_assets.py
++++ b/scripts/build_js_assets.py
+@@ -55,6 +55,8 @@ def build_ace(cmd, options):
+             "aceManifestPath": manifest,
+             "buildMode": options.build_mode,
+             "PATH": os.environ.get('PATH'),
++            "NODE_OPTIONS": "--openssl-legacy-provider",
++            "OPENSSL_MODULES": "../../../recipe-sysroot-native/usr/lib/ossl-modules",
+         }
+         if not os.path.exists(manifest) and options.hap_profile:
+             with open(options.hap_profile) as profile:
diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/test_xts_acts-Align-tests-list-with-mandatory-set.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/test_xts_acts-Align-tests-list-with-mandatory-set.patch
index 4688fa7c79f011d5f826705212f9e824d7140c9b..d2e70cbd34db2249c9a2f06bd2d0263302c62bac 100644
--- a/recipes-openharmony/openharmony/openharmony-standard-3.0/test_xts_acts-Align-tests-list-with-mandatory-set.patch
+++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/test_xts_acts-Align-tests-list-with-mandatory-set.patch
@@ -62,13 +62,3 @@ index a495343d..300aec75 100755
  ]
  
  _all_test_packages_ivi = [
-@@ -82,6 +82,9 @@ if (build_xts == true && XTS_SUITENAME == "acts") {
-   }
- 
-   selected_packages = exec_script(_select_script, _select_args, "list lines")
-+  # compileruntime is not being found as the part name is ccruntime
-+  # therefore it has to be added manually
-+  selected_packages += [ "${ACTS_ROOT}/compileruntime:compileruntime" ]
- 
-   selected_packages_ivi =
-       exec_script(_select_script, _select_args_ivi, "list lines")
diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
index 9dbbd715d229e6968bad8e53c6279431dd748164..6c53f53fb7399ac56f9883311aee2e5c700906f3 100644
--- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
+++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb
@@ -43,6 +43,7 @@ SRC_URI += "file://ts2abc-don-t-set-node_path-for-Linux-host-toolchain.patch;pat
 SRC_URI += "file://hdc-build-system-files.patch;patchdir=${S}/developtools/hdc_standard"
 SRC_URI += "file://build_packing-tool-path.patch;patchdir=${S}/build"
 SRC_URI += "file://build_node-path.patch;patchdir=${S}/build"
+SRC_URI += "file://build_js_assets.patch;patchdir=${S}/build"
 
 SRC_URI += "file://vendor-qemu-uhdf-files.patch;patchdir=${S}/drivers/peripheral"
 SRC_URI += "git://gitlab.eclipse.org/eclipse/oniro-core/openharmony-vendor-oniro.git;protocol=https;branch=main;rev=c7f69115d7af1a37f81bd4fc0462100d0aa87c2d;destsuffix=${S}/vendor/oniro"
@@ -109,6 +110,14 @@ OHOS_STANDARD_SYSTEM_CONFIG_DIR = "${OHOS_BUILD_CONFIGS_DIR}/standard_system"
 
 OHOS_PROJECT_BUILD_CONFIG_DIR = "${B}/build_configs"
 
+# Workaround for problem with nodejs 17:
+# error:0308010C:digital envelope routines::unsupported
+export NODE_OPTIONS = "--openssl-legacy-provider"
+export OPENSSL_CONF = "${RECIPE_SYSROOT_NATIVE}/usr/lib/ssl-3/openssl.cnf"
+export SSL_CERT_DIR = "${RECIPE_SYSROOT_NATIVE}/usr/lib/ssl-3/certs"
+export OPENSSL_ENGINES = "${RECIPE_SYSROOT_NATIVE}/usr/lib/engines-3"
+export OPENSSL_MODULES = "${RECIPE_SYSROOT_NATIVE}/usr/lib/ossl-modules"
+
 GN_ARGS += 'target_os="ohos"'
 GN_ARGS += 'target_cpu="${OHOS_DEVICE_CPU_ARCH}"'
 GN_ARGS += 'product_name="${OHOS_PRODUCT_NAME}"'