Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

build --per_file_copt=external/score_baselibs.*/.*@-Wno-deprecated-declarations
build --per_file_copt=external/score_logging.*/.*@-Wno-deprecated-declarations
common --@score_baselibs//score/json:base_library=nlohmann # TODO : https://github.com/eclipse-score/baselibs/issues/57
common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build --java_language_version=17
build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17

# Treat deprecated declarations as errors
build --cxxopt=-Werror=deprecated-declarations
build --@rules_rust//rust/settings:extra_rustc_flag=-Ddeprecated
Comment thread
se-lo marked this conversation as resolved.

# Suppress deprecated warnings for grpc_adapter implementation. grpc_adapter will be removed in future
build --per_file_copt=score/crypto/src/ipc/grpc_adapter/.*@-Wno-error=deprecated-declarations

# Only contact license server every 59 secs per tool and not for every tool invocation to avoid flooding the license server
common --action_env=QNX_LICENSE_EXTSERVER_DELAY=59

Expand All @@ -39,7 +43,7 @@ build:shared --incompatible_strict_action_env
build:shared --sandbox_writable_path=/var/tmp
build:shared --host_platform=@score_bazel_platforms//:x86_64-linux
# Disable typedshm as it's not needed in this build
build:shared --@score_baselibs//score/memory/shared/flags:use_typedshmd=False
build:shared --@score_communication//score/memory/shared/flags:use_typedshmd=False

# Shared qnx configuration
build:shared_qnx --config=shared
Expand All @@ -53,7 +57,7 @@ build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKET
build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKETUTILS
build:shared_qnx --cxxopt=-DGRPC_POSIX_WAKEUP_FD
build:shared_qnx --cxxopt=-DIP_PKTINFO=0
build:shared_qnx --@score_baselibs//score/memory/shared/flags:use_typedshmd=false
build:shared_qnx --@score_communication//score/memory/shared/flags:use_typedshmd=false

# -------------------------------------------------------------------------------
# Config dedicated to host platform CPU:x86_64 and OS:Linux
Expand Down
30 changes: 16 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ use_repo(llvm, "llvm_toolchain", "llvm_toolchain_llvm")
bazel_dep(name = "score_toolchains_rust", version = "0.10.0", dev_dependency = True)

bazel_dep(name = "score_crates", version = "0.0.13")
bazel_dep(name = "score_logging", version = "0.2.0")

crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate", isolate = True)
crate.from_cargo(
Expand Down Expand Up @@ -332,13 +331,23 @@ bazel_dep(name = "score_docs_as_code", version = "8.3.0")
bazel_dep(name = "score_process_description", version = "2.1.1")
bazel_dep(name = "score_platform", version = "0.7.2")

# s-core baselibs
bazel_dep(name = "score_baselibs", version = "0.2.10")
# score baselibs
bazel_dep(name = "score_baselibs", version = "0.2.14")

# Force score_baselibs version to v0.2.10 to block transitive C++ refactoring crashes
single_version_override(
module_name = "score_baselibs",
version = "0.2.10",
# score communication
bazel_dep(name = "score_communication", version = "0.5.0")

# score logging
bazel_dep(name = "score_logging", version = "0.2.4")

# Temporarily track the upstream main branch adjusting to new baselibs structure
# Corresponds to 0.2.4 plus several commits
# Can be removed once as release including the following commit is done:
# https://github.com/eclipse-score/logging/commit/3fce1678fc0aee311c6ae24c293422fc51a91de5
git_override(
module_name = "score_logging",
commit = "3fce1678fc0aee311c6ae24c293422fc51a91de5",
remote = "https://github.com/eclipse-score/logging.git",
)

# Build settings utilities (bool_flag, string_flag, etc.)
Expand All @@ -360,10 +369,3 @@ bazel_dep(name = "score_itf", version = "0.5.0", dev_dependency = True)

# Provide the tools from the devcontainer to Bazel
bazel_dep(name = "score_devcontainer", version = "1.11.1")

# Temporarily track the upstream main branch containing our merged FFI fix
git_override(
module_name = "score_logging",
commit = "b4f272b0a036d46fc7ff2e9a051fdec95fd23b4f",
remote = "https://github.com/eclipse-score/logging.git",
)
24 changes: 17 additions & 7 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion score/crypto/src/api/data_plane/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cc_library(
"//score/crypto/src/daemon/common",
"//score/crypto/src/daemon/control_plane:request_handler_hdr",
"//score/crypto/src/daemon/mediator:mediator_operations",
"@score_baselibs//score/memory/shared",
"@score_communication//score/memory/shared",
"@score_baselibs//score/mw/log",
],
)
2 changes: 1 addition & 1 deletion score/crypto/src/daemon/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cc_binary(
"//score/crypto/src/daemon/provider:provider_manager_factory",
"//score/crypto/src/ipc:ipc_config",
"//score/crypto/src/ipc/grpc_adapter:grpc_control_server",
"@score_baselibs//score/memory/shared",
"@score_communication//score/memory/shared",
"@score_baselibs//score/mw/log",
],
)
Expand Down
4 changes: 2 additions & 2 deletions score/crypto/src/daemon/data_plane/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cc_library(
"//score/crypto/src/daemon/common",
"//score/crypto/src/daemon/data_manager",
"//score/crypto/src/daemon/mediator:mediator_operations",
"@score_baselibs//score/memory/shared",
"@score_communication//score/memory/shared",
],
)

Expand All @@ -50,7 +50,7 @@ cc_library(
"//score/crypto/src/daemon/common",
"//score/crypto/src/daemon/control_plane:request_handler_hdr",
"//score/crypto/src/daemon/data_manager",
"@score_baselibs//score/memory/shared",
"@score_communication//score/memory/shared",
"@score_baselibs//score/mw/log",
],
)
2 changes: 1 addition & 1 deletion score/cryptoki/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DEPS = [
"@score_crates//:libc",
"@score_crates//:serde",
"@score_crates//:serde_json",
"@score_baselibs//src/log/score_log",
"@score_baselibs//score/log_rust/score_log",
"@score_logging//score/mw/log/rust/score_log_bridge",

# --- Community Fallback (Crate Universe) ---
Expand Down
15 changes: 14 additions & 1 deletion score/cryptoki/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<!-- ----------------------------------------------------------------------------
Copyright (c) 2026 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Apache License Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0

SPDX-License-Identifier: Apache-2.0
----------------------------------------------------------------------------- -->

# Valeo Cryptoki Integration Guide

This document describes how the S-CORE Peer Package Rust PKCS#11 module (located under `//score/cryptoki`) is integrated into the `score_crypto` daemon, replacing the default SoftHSM implementation.
Expand Down Expand Up @@ -90,4 +103,4 @@ bazel run //score/tests/integration_tests:score_demo \
* **Toolchain Errors**: If you encounter errors mentioning `rules_rust` or missing toolchains, ensure you are including `--config=x86_64-linux` or `--config=aarch64-qnx` / `--config=x86_64-qnx` in your Bazel command. This is strictly required to activate the Ferrocene compiler capable of building the module.
* **Missing Symbols / Header Errors**: If the C++ compilation fails looking for `<cryptoki.h>`, ensure you have included `--//score/crypto/src/backend:pkcs11_backend=//score/cryptoki:cryptoki_cdylib_wrapped`.
* **LoadKey Failed**: If the client fails with `[FAIL] LoadKey failed`, ensure the token was initialized correctly in Step 1 and that the `CRYPTOKI_STORE` environment variable is set for the daemon before running it.
* **QNX Build Missing Headers**: If QNX fails to compile `typed_memory.h`, ensure `--@score_baselibs//score/memory/shared/flags:use_typedshmd=false` is correctly set in your `.bazelrc` for `shared_qnx`.
* **QNX Build Missing Headers**: If QNX fails to compile `typed_memory.h`, ensure `--@score_communication//score/memory/shared/flags:use_typedshmd=false` is correctly set in your `.bazelrc` for `shared_qnx`.
2 changes: 2 additions & 0 deletions third_party/soft_hsm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ cmake(
"RUN_AES_KEY_WRAP__TRYRUN_OUTPUT": "",
"RUN_AES_KEY_WRAP_PAD": "0",
"RUN_AES_KEY_WRAP_PAD__TRYRUN_OUTPUT": "",
# Ignore deprecation warnings for SoftHSM source code
"CMAKE_CXX_FLAGS": "-Wno-error=deprecated-declarations",
},
env = select({
"//platforms:is_qnx_aarch64": {
Expand Down
Loading