Skip to content

Commit 7c8d816

Browse files
authored
Merge pull request #1565 from Altinity/revert-1560-features/25.3/fips-ch-binary-extended-testing
Revert "SSL/ACVP Test Integration for FIPS - second try"
2 parents 87c961e + 527b583 commit 7c8d816

File tree

13 files changed

+1
-725
lines changed

13 files changed

+1
-725
lines changed

contrib/openssl-cmake/CMakeLists.txt

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ docker cp $id:$lib_dir/build/ssl/libssl.a $OUTPUT_DIR
4242
docker cp $id:$lib_dir/build/crypto/libcrypto.a $OUTPUT_DIR
4343
docker cp $id:$lib_dir/include $OUTPUT_DIR
4444
45-
# Extract pre-built test harness libraries (symbol-localized, with libstdc++ baked in)
46-
docker cp $id:/harness-output/libawslc_shim.a $OUTPUT_DIR
47-
docker cp $id:/harness-output/libawslc_handshaker.a $OUTPUT_DIR
48-
docker cp $id:/harness-output/libawslc_acvp_server.a $OUTPUT_DIR
49-
5045
docker rm $id"
5146
)
5247

@@ -75,12 +70,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${AWSLC_BINARIES_DIR
7570

7671
add_custom_target(build-awslc
7772
COMMENT "Build AWS-LC in FIPS mode with docker"
78-
DEPENDS
79-
${AWSLC_BINARIES_DIR}/libssl.a
80-
${AWSLC_BINARIES_DIR}/libcrypto.a
81-
${AWSLC_BINARIES_DIR}/libawslc_shim.a
82-
${AWSLC_BINARIES_DIR}/libawslc_handshaker.a
83-
${AWSLC_BINARIES_DIR}/libawslc_acvp_server.a
73+
DEPENDS ${AWSLC_BINARIES_DIR}/libssl.a ${AWSLC_BINARIES_DIR}/libcrypto.a
8474
)
8575

8676
if(ARCH_AARCH64)
@@ -93,20 +83,7 @@ add_custom_command(
9383
OUTPUT
9484
"${AWSLC_BUILD_DIR}/output/libssl.a"
9585
"${AWSLC_BUILD_DIR}/output/libcrypto.a"
96-
"${AWSLC_BUILD_DIR}/output/libawslc_shim.a"
97-
"${AWSLC_BUILD_DIR}/output/libawslc_handshaker.a"
98-
"${AWSLC_BUILD_DIR}/output/libawslc_acvp_server.a"
9986
COMMENT "Building AWS-LC in FIPS mode using docker"
100-
# Copy test harness build inputs into the Docker context directory
101-
COMMAND ${CMAKE_COMMAND} -E copy
102-
${ClickHouse_SOURCE_DIR}/programs/ssl-common/posix_spawn_2.c
103-
${AWSLC_BUILD_DIR}/posix_spawn_2.c
104-
COMMAND ${CMAKE_COMMAND} -E copy
105-
${ClickHouse_SOURCE_DIR}/programs/ssl-common/glibc_compat.c
106-
${AWSLC_BUILD_DIR}/glibc_compat.c
107-
COMMAND ${CMAKE_COMMAND} -E copy
108-
${CMAKE_CURRENT_SOURCE_DIR}/build_test_harness.sh
109-
${AWSLC_BUILD_DIR}/build_test_harness.sh
11087
COMMAND bash -c "chmod +x ${AWSLC_BUILD_DIR}/build_awclc_fips.sh"
11188
COMMAND bash -c "${AWSLC_BUILD_DIR}/build_awclc_fips.sh ${AWSLC_BINARIES_DIR} ${DOCKERFILE_PATH}"
11289
WORKING_DIRECTORY ${AWSLC_BUILD_DIR}
@@ -115,9 +92,6 @@ add_custom_command(
11592
${AWSLC_BUILD_DIR}/build_awclc_fips.sh
11693
${AWSLC_BUILD_DIR}/check_version.c
11794
${DOCKERFILE_PATH}
118-
${ClickHouse_SOURCE_DIR}/programs/ssl-common/posix_spawn_2.c
119-
${ClickHouse_SOURCE_DIR}/programs/ssl-common/glibc_compat.c
120-
${CMAKE_CURRENT_SOURCE_DIR}/build_test_harness.sh
12195
)
12296

12397
add_library(crypto UNKNOWN IMPORTED GLOBAL)
@@ -156,45 +130,6 @@ target_compile_options(ssl INTERFACE
156130
target_compile_options(global-group INTERFACE "-Wno-deprecated-declarations")
157131
target_compile_options(global-group INTERFACE "-Wno-poison-system-directories")
158132

159-
# ── Test harness IMPORTED libraries ──────────────────────────────────────────
160-
# These archives are built inside Docker (build_test_harness.sh), partially
161-
# linked with libstdc++ via `ld -r`, and symbol-localized so only the entry
162-
# point is globally visible. No --allow-multiple-definition needed.
163-
164-
add_library(awslc_shim STATIC IMPORTED GLOBAL)
165-
add_dependencies(awslc_shim build-awslc)
166-
set_target_properties(awslc_shim PROPERTIES
167-
IMPORTED_LOCATION "${AWSLC_BINARIES_DIR}/libawslc_shim.a")
168-
169-
add_library(awslc_handshaker STATIC IMPORTED GLOBAL)
170-
add_dependencies(awslc_handshaker build-awslc)
171-
set_target_properties(awslc_handshaker PROPERTIES
172-
IMPORTED_LOCATION "${AWSLC_BINARIES_DIR}/libawslc_handshaker.a")
173-
174-
add_library(awslc_acvp_server STATIC IMPORTED GLOBAL)
175-
add_dependencies(awslc_acvp_server build-awslc)
176-
set_target_properties(awslc_acvp_server PROPERTIES
177-
IMPORTED_LOCATION "${AWSLC_BINARIES_DIR}/libawslc_acvp_server.a")
178-
179-
# ── Test harness program libraries ───────────────────────────────────────────
180-
# Linked into the main clickhouse binary via clickhouse_program_install()
181-
# in programs/CMakeLists.txt. The entry-point .cpp files stay in programs/.
182-
183-
add_library(clickhouse-ssl-shim-lib
184-
${ClickHouse_SOURCE_DIR}/programs/ssl-shim/SslShim.cpp)
185-
target_link_libraries(clickhouse-ssl-shim-lib PRIVATE awslc_shim ssl crypto)
186-
add_dependencies(clickhouse-ssl-shim-lib build-awslc)
187-
188-
add_library(clickhouse-ssl-handshaker-lib
189-
${ClickHouse_SOURCE_DIR}/programs/ssl-handshaker/SslHandshaker.cpp)
190-
target_link_libraries(clickhouse-ssl-handshaker-lib PRIVATE awslc_handshaker ssl crypto)
191-
add_dependencies(clickhouse-ssl-handshaker-lib build-awslc)
192-
193-
add_library(clickhouse-acvp-server-lib
194-
${ClickHouse_SOURCE_DIR}/programs/acvp-server/AcvpServer.cpp)
195-
target_link_libraries(clickhouse-acvp-server-lib PRIVATE awslc_acvp_server crypto)
196-
add_dependencies(clickhouse-acvp-server-lib build-awslc)
197-
198133
else() # FIPS_CLICKHOUSE
199134

200135

contrib/openssl-cmake/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,3 @@ RUN test $(/aws-lc-AWS-LC-FIPS-2.0.0/build/tool/bssl isfips) = 1
3030

3131
# execute all test
3232
RUN find /aws-lc-AWS-LC-FIPS-2.0.0/build -iname '*test*' -type f -executable -print -exec {} \;
33-
34-
# Build test harness libraries for ClickHouse FIPS testing integration
35-
COPY posix_spawn_2.c glibc_compat.c /tmp/
36-
COPY build_test_harness.sh /tmp/
37-
RUN chmod +x /tmp/build_test_harness.sh && \
38-
/tmp/build_test_harness.sh /aws-lc-AWS-LC-FIPS-2.0.0 /harness-output

contrib/openssl-cmake/Dockerfile.aarch64

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,3 @@ RUN test $(/aws-lc-AWS-LC-FIPS-2.0.0/build/tool/bssl isfips) = 1
3030

3131
# execute all test
3232
RUN find /aws-lc-AWS-LC-FIPS-2.0.0/build -iname '*test*' -type f -executable -print -exec {} \;
33-
34-
# Build test harness libraries for ClickHouse FIPS testing integration
35-
COPY posix_spawn_2.c glibc_compat.c /tmp/
36-
COPY build_test_harness.sh /tmp/
37-
RUN chmod +x /tmp/build_test_harness.sh && \
38-
/tmp/build_test_harness.sh /aws-lc-AWS-LC-FIPS-2.0.0 /harness-output

contrib/openssl-cmake/build_test_harness.sh

Lines changed: 0 additions & 95 deletions
This file was deleted.

programs/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ else()
6262
message(STATUS "ClickHouse keeper-client mode: OFF")
6363
endif()
6464

65-
if (FIPS_CLICKHOUSE AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
66-
set(ENABLE_CLICKHOUSE_SSL_SHIM 1)
67-
set(ENABLE_CLICKHOUSE_SSL_HANDSHAKER 1)
68-
set(ENABLE_CLICKHOUSE_ACVP_SERVER 1)
69-
endif()
70-
7165
configure_file (config_tools.h.in ${CONFIG_INCLUDE_PATH}/config_tools.h)
7266

7367
macro(clickhouse_target_link_split_lib target name)
@@ -231,16 +225,6 @@ if (ENABLE_CLICKHOUSE_KEEPER_CLIENT)
231225
list(APPEND CLICKHOUSE_BUNDLE clickhouse-keeper-client)
232226
endif ()
233227

234-
if (ENABLE_CLICKHOUSE_SSL_SHIM)
235-
clickhouse_program_install(clickhouse-ssl-shim ssl-shim)
236-
endif()
237-
if (ENABLE_CLICKHOUSE_SSL_HANDSHAKER)
238-
clickhouse_program_install(clickhouse-ssl-handshaker ssl-handshaker)
239-
endif()
240-
if (ENABLE_CLICKHOUSE_ACVP_SERVER)
241-
clickhouse_program_install(clickhouse-acvp-server acvp-server)
242-
endif()
243-
244228
add_custom_target (clickhouse-bundle ALL DEPENDS ${CLICKHOUSE_BUNDLE})
245229

246230
if (USE_BINARY_HASH)

programs/acvp-server/AcvpServer.cpp

Lines changed: 0 additions & 6 deletions
This file was deleted.

programs/config_tools.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@
55
#cmakedefine01 ENABLE_CLICKHOUSE_KEEPER
66
#cmakedefine01 ENABLE_CLICKHOUSE_KEEPER_CLIENT
77
#cmakedefine01 ENABLE_CLICKHOUSE_KEEPER_CONVERTER
8-
#cmakedefine01 ENABLE_CLICKHOUSE_SSL_SHIM
9-
#cmakedefine01 ENABLE_CLICKHOUSE_SSL_HANDSHAKER
10-
#cmakedefine01 ENABLE_CLICKHOUSE_ACVP_SERVER

programs/main.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ int mainEntryClickHouseKeeperBench(int argc, char ** argv);
6464
int mainEntryClickHouseKeeperDataDumper(int argc, char ** argv);
6565
#endif
6666

67-
#if ENABLE_CLICKHOUSE_SSL_SHIM
68-
int mainEntryClickHouseSslShim(int argc, char ** argv);
69-
#endif
70-
#if ENABLE_CLICKHOUSE_SSL_HANDSHAKER
71-
int mainEntryClickHouseSslHandshaker(int argc, char ** argv);
72-
#endif
73-
#if ENABLE_CLICKHOUSE_ACVP_SERVER
74-
int mainEntryClickHouseAcvpServer(int argc, char ** argv);
75-
#endif
76-
7767
// install
7868
int mainEntryClickHouseInstall(int argc, char ** argv);
7969
int mainEntryClickHouseStart(int argc, char ** argv);
@@ -125,15 +115,6 @@ std::pair<std::string_view, MainFunc> clickhouse_applications[] =
125115
#endif
126116
#if USE_NURAFT
127117
{"keeper-data-dumper", mainEntryClickHouseKeeperDataDumper},
128-
#endif
129-
#if ENABLE_CLICKHOUSE_SSL_SHIM
130-
{"ssl-shim", mainEntryClickHouseSslShim},
131-
#endif
132-
#if ENABLE_CLICKHOUSE_SSL_HANDSHAKER
133-
{"ssl-handshaker", mainEntryClickHouseSslHandshaker},
134-
#endif
135-
#if ENABLE_CLICKHOUSE_ACVP_SERVER
136-
{"acvp-server", mainEntryClickHouseAcvpServer},
137118
#endif
138119
// install
139120
{"install", mainEntryClickHouseInstall},

0 commit comments

Comments
 (0)