Bump libssh to 0.12.0

Update the `contrib/libssh` submodule from an upstream master snapshot
(`libssh-0.11.0-368-g47305a2f`) to the upstream release `libssh-0.12.0`,
tracked via the `ClickHouse/libssh-0.12.0` branch of the fork mirror. Both
the old and new pins are clean upstream commits, so no ClickHouse patches
needed to be carried forward.

Build integration changes in `contrib/libssh-cmake`:

- Bump the `libssh_VERSION_*` variables to 0.12.0.
- Add the new ML-KEM sources to the build. In 0.12.0, `kex.c` references
  `ssh_client_hybrid_mlkem_remove_callbacks` from an unguarded switch case,
  so `hybrid_mlkem.c` and `mlkem.c` are now mandatory. ClickHouse bundles
  OpenSSL 3.5, which provides the EVP ML-KEM API, so the OpenSSL backend
  `mlkem_crypto.c` is used (matching upstream's `OPENSSL_VERSION >= 3.5.0`
  logic).
- In every per-platform `config.h`: define `GLOBAL_CONF_DIR` (now used
  unconditionally via string concatenation in `options.c`), and enable
  `HAVE_OPENSSL_MLKEM` / `HAVE_MLKEM1024` to select the OpenSSL ML-KEM
  backend and the ML-KEM-1024 variants.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Konstantin Bogdanov
2026-06-23 22:47:51 +02:00
co-authored by Claude Opus 4.8
parent 51bbf03bcd
commit 09b249b939
12 changed files with 126 additions and 5 deletions
+1 -1
+5 -2
View File
@@ -7,8 +7,8 @@ endif()
# CMake variables needed by libssh_version.h.cmake, update them when you update libssh
set(libssh_VERSION_MAJOR 0)
set(libssh_VERSION_MINOR 9)
set(libssh_VERSION_PATCH 8)
set(libssh_VERSION_MINOR 12)
set(libssh_VERSION_PATCH 0)
set(LIB_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libssh")
set(LIB_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/libssh")
@@ -37,6 +37,7 @@ set(libssh_SRCS
${LIB_SOURCE_DIR}/src/external/poly1305.c
${LIB_SOURCE_DIR}/src/external/sntrup761.c
${LIB_SOURCE_DIR}/src/getpass.c
${LIB_SOURCE_DIR}/src/hybrid_mlkem.c
${LIB_SOURCE_DIR}/src/init.c
${LIB_SOURCE_DIR}/src/kdf.c
${LIB_SOURCE_DIR}/src/kex.c
@@ -47,6 +48,7 @@ set(libssh_SRCS
${LIB_SOURCE_DIR}/src/match.c
${LIB_SOURCE_DIR}/src/messages.c
${LIB_SOURCE_DIR}/src/misc.c
${LIB_SOURCE_DIR}/src/mlkem.c
${LIB_SOURCE_DIR}/src/options.c
${LIB_SOURCE_DIR}/src/packet.c
${LIB_SOURCE_DIR}/src/packet_cb.c
@@ -79,6 +81,7 @@ set(libssh_SRCS
${LIB_SOURCE_DIR}/src/gzip.c
${LIB_SOURCE_DIR}/src/libcrypto.c
${LIB_SOURCE_DIR}/src/md_crypto.c
${LIB_SOURCE_DIR}/src/mlkem_crypto.c
${LIB_SOURCE_DIR}/src/pki_crypto.c
${LIB_SOURCE_DIR}/src/pki_context.c
${LIB_SOURCE_DIR}/src/sntrup761.c
+12
View File
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
+12
View File
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
+12
View File
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
+12 -2
View File
@@ -14,6 +14,18 @@
/* Global client configuration file path */
#define GLOBAL_CLIENT_CONFIG "/etc/ssh/ssh_config"
/* Global configuration directory (libssh >= 0.12 uses it unconditionally) */
#define GLOBAL_CONF_DIR "/etc/ssh"
/* Define to 1 if we have support for ML-KEM in libgcrypt */
/* #undef HAVE_GCRYPT_MLKEM */
/* Define to 1 if we have support for ML-KEM in OpenSSL */
#define HAVE_OPENSSL_MLKEM 1
/* Define to 1 if we have support for ML-KEM1024 in either backend */
#define HAVE_MLKEM1024 1
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
@@ -188,8 +200,6 @@
/* Define to 1 if we have support for blowfish */
/* #undef HAVE_BLOWFISH */
/* Define to 1 if we have support for ML-KEM */
/* #undef HAVE_MLKEM */
/*************************** LIBRARIES ***************************/