upa / mscp

mscp: transfer files over multiple SSH (SFTP) connections
GNU General Public License v3.0
129 stars 13 forks source link

Lots of compilation warning with OpenSSL 3+ #25

Open nbanb opened 2 months ago

nbanb commented 2 months ago

Hi

Here is the build output : lots of deprecated functions :

nba@lap-nba:/usr/src/mscp/build$ make
[  2%] Building C object libssh/src/CMakeFiles/ssh-static.dir/agent.c.o
[  2%] Building C object libssh/src/CMakeFiles/ssh-static.dir/auth.c.o
[  4%] Building C object libssh/src/CMakeFiles/ssh-static.dir/base64.c.o
[  6%] Building C object libssh/src/CMakeFiles/ssh-static.dir/bignum.c.o
[  6%] Building C object libssh/src/CMakeFiles/ssh-static.dir/buffer.c.o
[  8%] Building C object libssh/src/CMakeFiles/ssh-static.dir/callbacks.c.o
[ 10%] Building C object libssh/src/CMakeFiles/ssh-static.dir/channels.c.o
[ 10%] Building C object libssh/src/CMakeFiles/ssh-static.dir/client.c.o
[ 13%] Building C object libssh/src/CMakeFiles/ssh-static.dir/config.c.o
[ 13%] Building C object libssh/src/CMakeFiles/ssh-static.dir/connect.c.o
[ 15%] Building C object libssh/src/CMakeFiles/ssh-static.dir/connector.c.o
[ 17%] Building C object libssh/src/CMakeFiles/ssh-static.dir/crypto_common.c.o
[ 17%] Building C object libssh/src/CMakeFiles/ssh-static.dir/curve25519.c.o
[ 19%] Building C object libssh/src/CMakeFiles/ssh-static.dir/dh.c.o
[ 21%] Building C object libssh/src/CMakeFiles/ssh-static.dir/ecdh.c.o
[ 21%] Building C object libssh/src/CMakeFiles/ssh-static.dir/error.c.o
[ 23%] Building C object libssh/src/CMakeFiles/ssh-static.dir/getpass.c.o
[ 23%] Building C object libssh/src/CMakeFiles/ssh-static.dir/init.c.o
[ 26%] Building C object libssh/src/CMakeFiles/ssh-static.dir/kdf.c.o
[ 28%] Building C object libssh/src/CMakeFiles/ssh-static.dir/kex.c.o
[ 28%] Building C object libssh/src/CMakeFiles/ssh-static.dir/known_hosts.c.o
[ 30%] Building C object libssh/src/CMakeFiles/ssh-static.dir/knownhosts.c.o
[ 32%] Building C object libssh/src/CMakeFiles/ssh-static.dir/legacy.c.o
/usr/src/mscp/libssh/src/legacy.c: In function ‘ssh_userauth_privatekey_file’:
/usr/src/mscp/libssh/src/legacy.c:128:3: warning: ‘publickey_from_file’ is deprecated [-Wdeprecated-declarations]
  128 |   pubkey = publickey_from_file(session, pubkeyfile, &type);
      |   ^~~~~~
In file included from /usr/src/mscp/libssh/include/libssh/libssh.h:855,
                 from /usr/src/mscp/libssh/include/libssh/priv.h:173,
                 from /usr/src/mscp/libssh/src/legacy.c:32:
/usr/src/mscp/libssh/include/libssh/legacy.h:101:38: note: declared here
  101 | SSH_DEPRECATED LIBSSH_API ssh_string publickey_from_file(ssh_session session, const char *filename,
      |                                      ^~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c:132:5: warning: ‘privatekey_from_file’ is deprecated [-Wdeprecated-declarations]
  132 |     privkey = privatekey_from_file(session, filename, 0, passphrase);
      |     ^~~~~~~
/usr/src/mscp/libssh/include/libssh/legacy.h:96:43: note: declared here
   96 | SSH_DEPRECATED LIBSSH_API ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
      |                                           ^~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c:135:5: warning: ‘privatekey_from_file’ is deprecated [-Wdeprecated-declarations]
  135 |     privkey = privatekey_from_file(session, filename, type, passphrase);
      |     ^~~~~~~
/usr/src/mscp/libssh/include/libssh/legacy.h:96:43: note: declared here
   96 | SSH_DEPRECATED LIBSSH_API ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
      |                                           ^~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c:142:3: warning: ‘privatekey_free’ is deprecated [-Wdeprecated-declarations]
  142 |   privatekey_free(privkey);
      |   ^~~~~~~~~~~~~~~
/usr/src/mscp/libssh/include/libssh/legacy.h:95:32: note: declared here
   95 | SSH_DEPRECATED LIBSSH_API void privatekey_free(ssh_private_key prv);
      |                                ^~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c: In function ‘channel_select’:
/usr/src/mscp/libssh/src/legacy.c:294:3: warning: ‘ssh_channel_select’ is deprecated [-Wdeprecated-declarations]
  294 |   return ssh_channel_select(readchans, writechans, exceptchans, timeout);
      |   ^~~~~~
/usr/src/mscp/libssh/include/libssh/libssh.h:561:31: note: declared here
  561 | SSH_DEPRECATED LIBSSH_API int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans, ssh_channel *exceptchans, struct
      |                               ^~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c: In function ‘ssh_try_publickey_from_file’:
/usr/src/mscp/libssh/src/legacy.c:741:5: warning: ‘publickey_from_file’ is deprecated [-Wdeprecated-declarations]
  741 |     pubkey_string = publickey_from_file(session, pubkey_file, &pubkey_type);
      |     ^~~~~~~~~~~~~
/usr/src/mscp/libssh/src/legacy.c:511:12: note: declared here
  511 | ssh_string publickey_from_file(ssh_session session, const char *filename,
      |            ^~~~~~~~~~~~~~~~~~~
[ 32%] Building C object libssh/src/CMakeFiles/ssh-static.dir/log.c.o
[ 34%] Building C object libssh/src/CMakeFiles/ssh-static.dir/match.c.o
[ 34%] Building C object libssh/src/CMakeFiles/ssh-static.dir/messages.c.o
[ 36%] Building C object libssh/src/CMakeFiles/ssh-static.dir/misc.c.o
[ 39%] Building C object libssh/src/CMakeFiles/ssh-static.dir/options.c.o
[ 39%] Building C object libssh/src/CMakeFiles/ssh-static.dir/packet.c.o
[ 41%] Building C object libssh/src/CMakeFiles/ssh-static.dir/packet_cb.c.o
[ 43%] Building C object libssh/src/CMakeFiles/ssh-static.dir/packet_crypt.c.o
[ 43%] Building C object libssh/src/CMakeFiles/ssh-static.dir/pcap.c.o
[ 45%] Building C object libssh/src/CMakeFiles/ssh-static.dir/pki.c.o
[ 47%] Building C object libssh/src/CMakeFiles/ssh-static.dir/pki_container_openssh.c.o
[ 47%] Building C object libssh/src/CMakeFiles/ssh-static.dir/poll.c.o
[ 50%] Building C object libssh/src/CMakeFiles/ssh-static.dir/session.c.o
[ 50%] Building C object libssh/src/CMakeFiles/ssh-static.dir/scp.c.o
/usr/src/mscp/libssh/src/scp.c: In function ‘ssh_scp_new’:
/usr/src/mscp/libssh/src/scp.c:110:5: warning: ‘ssh_scp_free’ is deprecated [-Wdeprecated-declarations]
  110 |     ssh_scp_free(scp);
      |     ^~~~~~~~~~~~
In file included from /usr/src/mscp/libssh/include/libssh/priv.h:173,
                 from /usr/src/mscp/libssh/src/scp.c:30:
/usr/src/mscp/libssh/include/libssh/libssh.h:567:32: note: declared here
  567 | SSH_DEPRECATED LIBSSH_API void ssh_scp_free(ssh_scp scp);
      |                                ^~~~~~~~~~~~
/usr/src/mscp/libssh/src/scp.c: In function ‘ssh_scp_free’:
/usr/src/mscp/libssh/src/scp.c:303:9: warning: ‘ssh_scp_close’ is deprecated [-Wdeprecated-declarations]
  303 |         ssh_scp_close(scp);
      |         ^~~~~~~~~~~~~
/usr/src/mscp/libssh/src/scp.c:249:5: note: declared here
  249 | int ssh_scp_close(ssh_scp scp)
      |     ^~~~~~~~~~~~~
/usr/src/mscp/libssh/src/scp.c: In function ‘ssh_scp_push_file’:
/usr/src/mscp/libssh/src/scp.c:577:5: warning: ‘ssh_scp_push_file64’ is deprecated [-Wdeprecated-declarations]
  577 |     return ssh_scp_push_file64(scp, filename, (uint64_t) size, mode);
      |     ^~~~~~
/usr/src/mscp/libssh/src/scp.c:472:5: note: declared here
  472 | int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size,
      |     ^~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/scp.c: In function ‘ssh_scp_read’:
/usr/src/mscp/libssh/src/scp.c:1009:9: warning: ‘ssh_scp_accept_request’ is deprecated [-Wdeprecated-declarations]
 1009 |         rc = ssh_scp_accept_request(scp);
      |         ^~
/usr/src/mscp/libssh/src/scp.c:955:5: note: declared here
  955 | int ssh_scp_accept_request(ssh_scp scp)
      |     ^~~~~~~~~~~~~~~~~~~~~~
[ 52%] Building C object libssh/src/CMakeFiles/ssh-static.dir/socket.c.o
[ 54%] Building C object libssh/src/CMakeFiles/ssh-static.dir/string.c.o
[ 54%] Building C object libssh/src/CMakeFiles/ssh-static.dir/threads.c.o
[ 56%] Building C object libssh/src/CMakeFiles/ssh-static.dir/wrapper.c.o
/usr/src/mscp/libssh/src/wrapper.c: In function ‘crypto_free’:
/usr/src/mscp/libssh/src/wrapper.c:187:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  187 |         EC_KEY_free(crypto->ecdh_privkey);
      |         ^~~~~~~~~~~
In file included from /usr/include/openssl/ecdh.h:10,
                 from /usr/src/mscp/libssh/include/libssh/crypto.h:46,
                 from /usr/src/mscp/libssh/src/wrapper.c:47:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
[ 58%] Building C object libssh/src/CMakeFiles/ssh-static.dir/external/bcrypt_pbkdf.c.o
[ 58%] Building C object libssh/src/CMakeFiles/ssh-static.dir/external/blowfish.c.o
[ 60%] Building C object libssh/src/CMakeFiles/ssh-static.dir/config_parser.c.o
[ 60%] Building C object libssh/src/CMakeFiles/ssh-static.dir/token.c.o
[ 63%] Building C object libssh/src/CMakeFiles/ssh-static.dir/pki_ed25519_common.c.o
[ 65%] Building C object libssh/src/CMakeFiles/ssh-static.dir/threads/noop.c.o
[ 65%] Building C object libssh/src/CMakeFiles/ssh-static.dir/threads/pthread.c.o
[ 67%] Building C object libssh/src/CMakeFiles/ssh-static.dir/threads/libcrypto.c.o
[ 69%] Building C object libssh/src/CMakeFiles/ssh-static.dir/pki_crypto.c.o
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_clean’:
/usr/src/mscp/libssh/src/pki_crypto.c:106:5: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  106 |     EC_KEY_free(key->ecdsa);
      |     ^~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/pem.h:23,
                 from /usr/src/mscp/libssh/src/pki_crypto.c:34:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_ecdsa_to_nid’:
/usr/src/mscp/libssh/src/pki_crypto.c:122:5: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  122 |     const EC_GROUP *g = EC_KEY_get0_group(k);
      |     ^~~~~
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_privkey_build_ecdsa’:
/usr/src/mscp/libssh/src/pki_crypto.c:302:5: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  302 |     key->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid);
      |     ^~~
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:307:5: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  307 |     g = EC_KEY_get0_group(key->ecdsa);
      |     ^
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:325:5: warning: ‘EC_KEY_set_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  325 |     ok = EC_KEY_set_public_key(key->ecdsa, p);
      |     ^~
/usr/include/openssl/ec.h:1070:27: note: declared here
 1070 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
      |                           ^~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:333:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  333 |         EC_KEY_free(key->ecdsa);
      |         ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:337:5: warning: ‘EC_KEY_set_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  337 |     ok = EC_KEY_set_private_key(key->ecdsa, bexp);
      |     ^~
/usr/include/openssl/ec.h:1056:27: note: declared here
 1056 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
      |                           ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:340:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  340 |         EC_KEY_free(key->ecdsa);
      |         ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_pubkey_build_ecdsa’:
/usr/src/mscp/libssh/src/pki_crypto.c:396:5: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  396 |     key->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid);
      |     ^~~
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:401:5: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  401 |     g = EC_KEY_get0_group(key->ecdsa);
      |     ^
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:419:5: warning: ‘EC_KEY_set_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  419 |     ok = EC_KEY_set_public_key(key->ecdsa, p);
      |     ^~
/usr/include/openssl/ec.h:1070:27: note: declared here
 1070 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
      |                           ^~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_dup’:
/usr/src/mscp/libssh/src/pki_crypto.c:689:13: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  689 |             new->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid);
      |             ^~~
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:694:13: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  694 |             p = EC_KEY_get0_public_key(key->ecdsa);
      |             ^
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:699:13: warning: ‘EC_KEY_set_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  699 |             ok = EC_KEY_set_public_key(new->ecdsa, p);
      |             ^~
/usr/include/openssl/ec.h:1070:27: note: declared here
 1070 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
      |                           ^~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:704:13: warning: ‘EC_KEY_up_ref’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  704 |             rc = EC_KEY_up_ref(key->ecdsa);
      |             ^~
/usr/include/openssl/ec.h:1022:27: note: declared here
 1022 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_up_ref(EC_KEY *key);
      |                           ^~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_generate_ecdsa’:
/usr/src/mscp/libssh/src/pki_crypto.c:928:5: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  928 |     key->ecdsa = EC_KEY_new_by_curve_name(key->ecdsa_nid);
      |     ^~~
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:944:5: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  944 |     ok = EC_KEY_generate_key(key->ecdsa);
      |     ^~
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:946:9: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  946 |         EC_KEY_free(key->ecdsa);
      |         ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:950:5: warning: ‘EC_KEY_set_asn1_flag’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  950 |     EC_KEY_set_asn1_flag(key->ecdsa, OPENSSL_EC_NAMED_CURVE);
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1087:28: note: declared here
 1087 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
      |                            ^~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_compare’:
/usr/src/mscp/libssh/src/pki_crypto.c:1055:17: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1055 |                 const EC_POINT *p1 = EC_KEY_get0_public_key(k1->ecdsa);
      |                 ^~~~~
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1056:17: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1056 |                 const EC_POINT *p2 = EC_KEY_get0_public_key(k2->ecdsa);
      |                 ^~~~~
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1057:17: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1057 |                 const EC_GROUP *g1 = EC_KEY_get0_group(k1->ecdsa);
      |                 ^~~~~
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1058:17: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1058 |                 const EC_GROUP *g2 = EC_KEY_get0_group(k2->ecdsa);
      |                 ^~~~~
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1073:21: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1073 |                     if (bignum_cmp(EC_KEY_get0_private_key(k1->ecdsa),
      |                     ^~
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1073:21: warning: ‘EC_KEY_get0_private_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1073 |                     if (bignum_cmp(EC_KEY_get0_private_key(k1->ecdsa),
      |                     ^~
/usr/include/openssl/ec.h:1048:37: note: declared here
 1048 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_private_key_to_pem’:
/usr/src/mscp/libssh/src/pki_crypto.c:1171:13: warning: ‘EVP_PKEY_set1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1171 |             rc = EVP_PKEY_set1_EC_KEY(pkey, key->ecdsa);
      |             ^~
In file included from /usr/include/openssl/pem.h:22:
/usr/include/openssl/evp.h:1372:5: note: declared here
 1372 | int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_private_key_from_base64’:
/usr/src/mscp/libssh/src/pki_crypto.c:1357:9: warning: ‘EVP_PKEY_get1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1357 |         ecdsa = EVP_PKEY_get1_EC_KEY(pkey);
      |         ^~~~~
/usr/include/openssl/evp.h:1376:19: note: declared here
 1376 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
      |                   ^~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:1479:5: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 1479 |     EC_KEY_free(ecdsa);
      |     ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_publickey_to_blob’:
/usr/src/mscp/libssh/src/pki_crypto.c:2082:17: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2082 |                 e = make_ecpoint_string(EC_KEY_get0_group(key->ecdsa),
      |                 ^
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c:2083:41: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2083 |                                         EC_KEY_get0_public_key(key->ecdsa));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/pki_crypto.c: In function ‘pki_key_to_pkey’:
/usr/src/mscp/libssh/src/pki_crypto.c:2932:9: warning: ‘EVP_PKEY_set1_EC_KEY’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 2932 |         EVP_PKEY_set1_EC_KEY(pkey, key->ecdsa);
      |         ^~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/evp.h:1372:5: note: declared here
 1372 | int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
      |     ^~~~~~~~~~~~~~~~~~~~
[ 69%] Building C object libssh/src/CMakeFiles/ssh-static.dir/ecdh_crypto.c.o
/usr/src/mscp/libssh/src/ecdh_crypto.c: In function ‘ssh_client_ecdh_init’:
/usr/src/mscp/libssh/src/ecdh_crypto.c:130:3: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  130 |   key = EC_KEY_new_by_curve_name(curve);
      |   ^~~
In file included from /usr/include/openssl/ecdh.h:10,
                 from /usr/src/mscp/libssh/include/libssh/crypto.h:46,
                 from /usr/src/mscp/libssh/include/libssh/dh.h:26,
                 from /usr/src/mscp/libssh/src/ecdh_crypto.c:25:
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:155:3: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  155 |   group = EC_KEY_get0_group(key);
      |   ^~~~~
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:157:3: warning: ‘EC_KEY_generate_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  157 |   EC_KEY_generate_key(key);
      |   ^~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ec.h:1101:27: note: declared here
 1101 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:159:3: warning: ‘EC_KEY_get0_public_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  159 |   pubkey=EC_KEY_get0_public_key(key);
      |   ^~~~~~
/usr/include/openssl/ec.h:1062:39: note: declared here
 1062 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:166:7: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  166 |       EC_KEY_free(key);
      |       ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:214:7: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  214 |       EC_KEY_free(key);
      |       ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c: In function ‘ecdh_build_k’:
/usr/src/mscp/libssh/src/ecdh_crypto.c:241:3: warning: ‘EC_KEY_get0_group’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  241 |   const EC_GROUP *group = EC_KEY_get0_group(next_crypto->ecdh_privkey);
      |   ^~~~~
/usr/include/openssl/ec.h:1034:39: note: declared here
 1034 | OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
      |                                       ^~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:281:3: warning: ‘ECDH_compute_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  281 |   rc = ECDH_compute_key(buffer,
      |   ^~
/usr/include/openssl/ec.h:1296:27: note: declared here
 1296 | OSSL_DEPRECATEDIN_3_0 int ECDH_compute_key(void *out, size_t outlen,
      |                           ^~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:382:7: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  382 |       EC_KEY_free(next_crypto->ecdh_privkey);
      |       ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
/usr/src/mscp/libssh/src/ecdh_crypto.c:394:3: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  394 |   EC_KEY_free(next_crypto->ecdh_privkey);
      |   ^~~~~~~~~~~
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
[ 71%] Building C object libssh/src/CMakeFiles/ssh-static.dir/getrandom_crypto.c.o
[ 71%] Building C object libssh/src/CMakeFiles/ssh-static.dir/md_crypto.c.o
[ 73%] Building C object libssh/src/CMakeFiles/ssh-static.dir/libcrypto.c.o
/usr/src/mscp/libssh/src/libcrypto.c: In function ‘pki_get_engine’:
/usr/src/mscp/libssh/src/libcrypto.c:103:9: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  103 |         ENGINE_load_builtin_engines();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/mscp/libssh/src/libcrypto.c:56:
/usr/include/openssl/engine.h:358:28: note: declared here
  358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/mscp/libssh/src/libcrypto.c:105:9: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  105 |         engine = ENGINE_by_id("pkcs11");
      |         ^~~~~~
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
/usr/src/mscp/libssh/src/libcrypto.c:114:9: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  114 |         ok = ENGINE_init(engine);
      |         ^~
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
/usr/src/mscp/libssh/src/libcrypto.c:119:13: warning: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  119 |             ENGINE_free(engine);
      |             ^~~~~~~~~~~
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
[ 76%] Building C object libssh/src/CMakeFiles/ssh-static.dir/dh_crypto.c.o
[ 76%] Building C object libssh/src/CMakeFiles/ssh-static.dir/sftp.c.o
[ 78%] Building C object libssh/src/CMakeFiles/ssh-static.dir/dh-gex.c.o
[ 80%] Building C object libssh/src/CMakeFiles/ssh-static.dir/gzip.c.o
[ 80%] Building C object libssh/src/CMakeFiles/ssh-static.dir/gssapi.c.o
[ 82%] Linking C static library libssh.a
[ 82%] Built target ssh-static
[ 82%] Building C object CMakeFiles/mscp-static.dir/src/mscp.c.o
[ 84%] Building C object CMakeFiles/mscp-static.dir/src/ssh.c.o
[ 86%] Building C object CMakeFiles/mscp-static.dir/src/fileops.c.o
[ 86%] Building C object CMakeFiles/mscp-static.dir/src/path.c.o
[ 89%] Building C object CMakeFiles/mscp-static.dir/src/checkpoint.c.o
[ 91%] Building C object CMakeFiles/mscp-static.dir/src/bwlimit.c.o
[ 91%] Building C object CMakeFiles/mscp-static.dir/src/platform.c.o
[ 93%] Building C object CMakeFiles/mscp-static.dir/src/print.c.o
[ 95%] Building C object CMakeFiles/mscp-static.dir/src/pool.c.o
[ 95%] Building C object CMakeFiles/mscp-static.dir/src/strerrno.c.o
[ 97%] Building C object CMakeFiles/mscp-static.dir/src/openbsd-compat/strlcat.c.o
[ 97%] Linking C static library libmscp.a
[ 97%] Built target mscp-static
[ 97%] Building C object CMakeFiles/mscp.dir/src/main.c.o
[100%] Linking C executable mscp
[100%] Built target mscp

OpenSSL 1.1.1* is now deprecated How to have a clean build with no warning ?

Also note that mscp build by myself is 3 to 5 time more performant than the prebuild binary I previously download on GitHub.

Regards, nbanba

upa commented 2 months ago

It is a libssh issue and fixed in libssh 0.11.0: Removed the usage of deprecated OpenSSL APIs (Note: Minimum supported OpenSSL version is 1.1.1). mscp will migrate from libssh 0.10.6 to 0.11.0 in the near future.

Also note that mscp build by myself is 3 to 5 time more performant than the prebuild binary I previously download on GitHub.

Yes, as noted as not optimal performance in README. It is due to musl libc, which is used to produce the single binary mscp (without glibc that does not support static build). If such a low-performance version of mscp can lead to confusion, I will remove it from the README and the release process.

nbanb commented 2 months ago

Thanks for answer ! Ok I will wait for libssh 0.11.0

For performances, maybe just specify in the README that the prebuild mscp is builded using musl and had poor performances versus glibc.

Note that mscp is really one of the 2 tools I was looking for since years, many Thanks for the job ! (Now I'm still looking for a tool which is able to compress terabytes files using OpenCL or Cuda)

Thanks again Kind regards nbanba