Source: opendht
Version: 3.0.1-1.1
Severity: normal
Tags: fixed-upstream
opendht FTBFS against nettle 4.0 with:
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp: In function 'dht::Blob
dht::crypto::aesEncrypt(const uint8_t*, size_t, const dht::Blob&)':
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:98:24: error: aggregate
'dht::crypto::aesEncrypt(const uint8_t*, size_t, const dht::Blob&)::gcm_aes_ctx
aes' has incomplete type and cannot be defined
98 | struct gcm_aes_ctx aes;
| ^~~
In file included from /tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:27:
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:99:5: error: 'nettle_gcm_aes_set_key'
was not declared in this scope; did you mean 'nettle_gcm_sm4_set_key'?
99 | gcm_aes_set_key(&aes, key.size(), key.data());
| ^~~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:100:5: error: 'nettle_gcm_aes_set_iv'
was not declared in this scope; did you mean 'nettle_gcm_sm4_set_iv'?
100 | gcm_aes_set_iv(&aes, GCM_IV_SIZE, ret.data());
| ^~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:101:5: error: 'nettle_gcm_aes_encrypt'
was not declared in this scope; did you mean 'nettle_gcm_sm4_encrypt'?
101 | gcm_aes_encrypt(&aes, data_length, ret.data() + GCM_IV_SIZE, data);
| ^~~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:102:5: error: 'nettle_gcm_aes_digest'
was not declared in this scope; did you mean 'nettle_gcm_sm4_digest'?
102 | gcm_aes_digest(&aes, GCM_DIGEST_SIZE, ret.data() + GCM_IV_SIZE +
data_length);
| ^~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp: In function 'dht::Blob
dht::crypto::aesDecrypt(const uint8_t*, size_t, const dht::Blob&)':
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:125:24: error: aggregate
'dht::crypto::aesDecrypt(const uint8_t*, size_t, const dht::Blob&)::gcm_aes_ctx
aes' has incomplete type and cannot be defined
125 | struct gcm_aes_ctx aes;
| ^~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:126:5: error: 'nettle_gcm_aes_set_key'
was not declared in this scope; did you mean 'nettle_gcm_sm4_set_key'?
126 | gcm_aes_set_key(&aes, key.size(), key.data());
| ^~~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:127:5: error: 'nettle_gcm_aes_set_iv'
was not declared in this scope; did you mean 'nettle_gcm_sm4_set_iv'?
127 | gcm_aes_set_iv(&aes, GCM_IV_SIZE, data);
| ^~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:131:5: error: 'nettle_gcm_aes_decrypt'
was not declared in this scope; did you mean 'nettle_gcm_sm4_decrypt'?
131 | gcm_aes_decrypt(&aes, data_sz, ret.data(), data + GCM_IV_SIZE);
| ^~~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:132:5: error: 'nettle_gcm_aes_digest'
was not declared in this scope; did you mean 'nettle_gcm_sm4_digest'?
132 | gcm_aes_digest(&aes, GCM_DIGEST_SIZE, digest.data());
| ^~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:138:28: error: aggregate
'dht::crypto::aesDecrypt(const uint8_t*, size_t, const dht::Blob&)::gcm_aes_ctx
aes_d' has incomplete type and cannot be defined
138 | struct gcm_aes_ctx aes_d;
| ^~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:141:9: error: 'nettle_gcm_aes_update'
was not declared in this scope; did you mean 'nettle_gcm_sm4_update'?
141 | gcm_aes_update(&aes_d, ret.size(), ret.data());
| ^~~~~~~~~~~~~~
/tmp/NETTLE/opendht-3.0.1/src/crypto.cpp:142:9: error: 'nettle_gcm_aes_encrypt'
was not declared in this scope; did you mean 'nettle_gcm_sm4_encrypt'?
142 | gcm_aes_encrypt(&aes_d, ret.size(), ret_tmp.data(), ret.data());
| ^~~~~~~~~~~~~~~
This should be fixed upstream in
d1235660d5bb7e0f7c66f4605adca84a4d2e1db1, release 4.0.2.
nettle 4.0 is available in experimental (nettle4-dev).
cu Andreas