Skip to content

Commit 41482d7

Browse files
authored
Merge pull request ClickHouse#91367 from ClickHouse/backport/25.8/90985
Backport ClickHouse#90985 to 25.8: Libssh forward to master
2 parents e43b158 + 691889b commit 41482d7

File tree

15 files changed

+125
-123
lines changed

15 files changed

+125
-123
lines changed

contrib/libssh

Submodule libssh updated 429 files

contrib/libssh-cmake/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ set(libssh_SRCS
3535
${LIB_SOURCE_DIR}/src/external/blowfish.c
3636
${LIB_SOURCE_DIR}/src/external/chacha.c
3737
${LIB_SOURCE_DIR}/src/external/poly1305.c
38+
${LIB_SOURCE_DIR}/src/external/sntrup761.c
3839
${LIB_SOURCE_DIR}/src/getpass.c
3940
${LIB_SOURCE_DIR}/src/init.c
4041
${LIB_SOURCE_DIR}/src/kdf.c
@@ -61,6 +62,7 @@ set(libssh_SRCS
6162
${LIB_SOURCE_DIR}/src/string.c
6263
${LIB_SOURCE_DIR}/src/threads.c
6364
${LIB_SOURCE_DIR}/src/token.c
65+
${LIB_SOURCE_DIR}/src/ttyopts.c
6466
${LIB_SOURCE_DIR}/src/wrapper.c
6567
# some files of libssh/src/ are missing - why?
6668

@@ -69,15 +71,21 @@ set(libssh_SRCS
6971
# files missing - why?
7072

7173
# LIBCRYPT specific
74+
${LIB_SOURCE_DIR}/src/crypto_common.c
75+
${LIB_SOURCE_DIR}/src/curve25519_crypto.c
7276
${LIB_SOURCE_DIR}/src/dh_crypto.c
7377
${LIB_SOURCE_DIR}/src/ecdh_crypto.c
78+
${LIB_SOURCE_DIR}/src/getrandom_crypto.c
79+
${LIB_SOURCE_DIR}/src/gzip.c
7480
${LIB_SOURCE_DIR}/src/libcrypto.c
81+
${LIB_SOURCE_DIR}/src/md_crypto.c
7582
${LIB_SOURCE_DIR}/src/pki_crypto.c
83+
${LIB_SOURCE_DIR}/src/pki_context.c
84+
${LIB_SOURCE_DIR}/src/sntrup761.c
7685
${LIB_SOURCE_DIR}/src/threads/libcrypto.c
7786

7887
${LIB_SOURCE_DIR}/src/bind.c
7988
${LIB_SOURCE_DIR}/src/bind_config.c
80-
${LIB_SOURCE_DIR}/src/options.c
8189
${LIB_SOURCE_DIR}/src/server.c
8290
)
8391

contrib/libssh-cmake/linux/aarch64-musl/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/aarch64/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/loongarch64/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/ppc64le/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/riscv64/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/s390x/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/x86-64-musl/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

9494
/* Define to 1 if you have DSA */

contrib/libssh-cmake/linux/x86-64/config.h

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -82,64 +82,37 @@
8282
/* Define to 1 if you have the <pthread.h> header file. */
8383
#define HAVE_PTHREAD_H 1
8484

85-
/* Define to 1 if you have eliptic curve cryptography in openssl */
85+
/* Define to 1 if you have elliptic curve cryptography in openssl */
8686
#define HAVE_OPENSSL_ECC 1
8787

88-
/* Define to 1 if you have eliptic curve cryptography in gcrypt */
88+
/* Define to 1 if you have elliptic curve cryptography in gcrypt */
8989
/* #undef HAVE_GCRYPT_ECC */
9090

91-
/* Define to 1 if you have eliptic curve cryptography */
91+
/* Define to 1 if you have elliptic curve cryptography */
9292
#define HAVE_ECC 1
9393

94-
/* Define to 1 if you have DSA */
95-
/* #undef HAVE_DSA */
96-
97-
/* Define to 1 if you have gl_flags as a glob_t sturct member */
94+
/* Define to 1 if you have gl_flags as a glob_t struct member */
9895
#define HAVE_GLOB_GL_FLAGS_MEMBER 1
9996

100-
/* Define to 1 if you have OpenSSL with Ed25519 support */
101-
#define HAVE_OPENSSL_ED25519 1
97+
/* Define to 1 if you have gcrypt with ChaCha20/Poly1305 support */
98+
/* #undef HAVE_GCRYPT_CHACHA_POLY */
10299

103-
/* Define to 1 if you have OpenSSL with X25519 support */
104-
#define HAVE_OPENSSL_X25519 1
100+
/* Define to 1 if you have gcrypt with curve25519 support */
101+
/* #undef HAVE_GCRYPT_CURVE25519 */
105102

106103
/*************************** FUNCTIONS ***************************/
107104

108-
/* Define to 1 if you have the `EVP_aes128_ctr' function. */
109-
#define HAVE_OPENSSL_EVP_AES_CTR 1
110-
111-
/* Define to 1 if you have the `EVP_aes128_cbc' function. */
112-
#define HAVE_OPENSSL_EVP_AES_CBC 1
113-
114-
/* Define to 1 if you have the `EVP_aes128_gcm' function. */
115-
/* #undef HAVE_OPENSSL_EVP_AES_GCM */
116-
117-
/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
118-
#define HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK 1
119-
120-
/* Define to 1 if you have the `CRYPTO_ctr128_encrypt' function. */
121-
#define HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT 1
105+
/* Define to 1 if you have the `EVP_chacha20' function. */
106+
#define HAVE_OPENSSL_EVP_CHACHA20 1
122107

123-
/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */
124-
#define HAVE_OPENSSL_EVP_CIPHER_CTX_NEW 1
125-
126-
/* Define to 1 if you have the `EVP_KDF_CTX_new_id' function. */
127-
/* #undef HAVE_OPENSSL_EVP_KDF_CTX_NEW_ID */
108+
/* Define to 1 if you have the `EVP_KDF_CTX_new_id' or `EVP_KDF_CTX_new` function. */
109+
#define HAVE_OPENSSL_EVP_KDF_CTX 1
128110

129111
/* Define to 1 if you have the `FIPS_mode' function. */
130112
#if USE_BORINGSSL
131113
#define HAVE_OPENSSL_FIPS_MODE 1
132114
#endif
133115

134-
/* Define to 1 if you have the `EVP_DigestSign' function. */
135-
#define HAVE_OPENSSL_EVP_DIGESTSIGN 1
136-
137-
/* Define to 1 if you have the `EVP_DigestVerify' function. */
138-
#define HAVE_OPENSSL_EVP_DIGESTVERIFY 1
139-
140-
/* Define to 1 if you have the `OPENSSL_ia32cap_loc' function. */
141-
/* #undef HAVE_OPENSSL_IA32CAP_LOC */
142-
143116
/* Define to 1 if you have the `snprintf' function. */
144117
#define HAVE_SNPRINTF 1
145118

@@ -212,6 +185,12 @@
212185
/* Define to 1 if you have the `cmocka_set_test_filter' function. */
213186
/* #undef HAVE_CMOCKA_SET_TEST_FILTER */
214187

188+
/* Define to 1 if we have support for blowfish */
189+
/* #undef HAVE_BLOWFISH */
190+
191+
/* Define to 1 if we have support for ML-KEM */
192+
/* #undef HAVE_MLKEM */
193+
215194
/*************************** LIBRARIES ***************************/
216195

217196
/* Define to 1 if you have the `crypto' library (-lcrypto). */
@@ -229,13 +208,18 @@
229208
/* Define to 1 if you have the `cmocka' library (-lcmocka). */
230209
/* #undef HAVE_CMOCKA */
231210

211+
/* Define to 1 if you have the `libfido2' library (-lfido2).
212+
* This is required for interacting with FIDO2/U2F devices over USB-HID. */
213+
/* #undef HAVE_LIBFIDO2 */
214+
232215
/**************************** OPTIONS ****************************/
233216

234217
#define HAVE_GCC_THREAD_LOCAL_STORAGE 1
235218
/* #undef HAVE_MSC_THREAD_LOCAL_STORAGE */
236219

237220
#define HAVE_FALLTHROUGH_ATTRIBUTE 1
238221
#define HAVE_UNUSED_ATTRIBUTE 1
222+
/* #undef HAVE_WEAK_ATTRIBUTE */
239223

240224
#define HAVE_CONSTRUCTOR_ATTRIBUTE 1
241225
#define HAVE_DESTRUCTOR_ATTRIBUTE 1
@@ -262,6 +246,14 @@
262246
/* Define to 1 if you want to enable DH group exchange algorithms */
263247
/* #undef WITH_GEX */
264248

249+
/* Define to 1 if you want to enable insecure none cipher and MAC */
250+
/* #undef WITH_INSECURE_NONE */
251+
252+
/* Define to 1 if you want to allow libssh to execute arbitrary commands from
253+
* configuration files or options (match exec, proxy commands and OpenSSH-based
254+
* proxy-jumps). */
255+
/* #undef WITH_EXEC */
256+
265257
/* Define to 1 if you want to enable blowfish cipher support */
266258
/* #undef WITH_BLOWFISH_CIPHER */
267259

@@ -280,6 +272,15 @@
280272
/* Define to 1 if you want to enable NaCl support */
281273
/* #undef WITH_NACL */
282274

275+
/* Define to 1 if you want to enable PKCS #11 URI support */
276+
/* #undef WITH_PKCS11_URI */
277+
278+
/* Define to 1 if we want to build a support for PKCS #11 provider. */
279+
/* #undef WITH_PKCS11_PROVIDER */
280+
281+
/* Define to 1 if you want to enable FIDO2/U2F support */
282+
/* #undef WITH_FIDO2 */
283+
283284
/*************************** ENDIAN *****************************/
284285

285286
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most

0 commit comments

Comments
 (0)