On 20/02/26 05:04, Florin Coras via lists.fd.io wrote:
Thanks, Renato.

Seems that just removing the header is enough [1]. This is a legacy plugin with 
no tests so that should do for now.

Regards,
Florin

[1] https://gerrit.fd.io/r/c/vpp/+/44983

On debian 13 with mbedtls 3.x installed it doesn't build just by removing the bad include, see attached log.

--
Renato Botelho do Couto
Software Engineer
@@@@ Building vpp in /home/garga/work/vpp/build-root/build-vpp_debug-native/vpp 
@@@@
[2356/2867] Building C object 
CMakeFiles/plugins/tlsmbedtls/CMakeFiles/tlsmbedtls_plugin.dir/tls_mbedtls.c.o
FAILED: 
CMakeFiles/plugins/tlsmbedtls/CMakeFiles/tlsmbedtls_plugin.dir/tls_mbedtls.c.o
/usr/bin/ccache /usr/lib/ccache/clang -DCLIB_DEBUG -DHAVE_FCNTL64 
-Dtlsmbedtls_plugin_EXPORTS -I/home/garga/work/vpp/src -I/home/garga/wor
k/vpp/build-root/build-vpp_debug-native/vpp/CMakeFiles 
-I/home/garga/work/vpp/src/plugins 
-I/home/garga/work/vpp/build-root/build-vpp_debu
g-native/vpp/CMakeFiles/plugins -fPIC -g -Werror -Wall 
-Wno-address-of-packed-member -O0 -fstack-protector -fno-common 
-march=x86-64-v2 -m
tune=generic -fvisibility=hidden -ffunction-sections -fdata-sections -MD -MT 
CMakeFiles/plugins/tlsmbedtls/CMakeFiles/tlsmbedtls_plugin.di
r/tls_mbedtls.c.o -MF 
CMakeFiles/plugins/tlsmbedtls/CMakeFiles/tlsmbedtls_plugin.dir/tls_mbedtls.c.o.d
 -o CMakeFiles/plugins/tlsmbedtls/CM
akeFiles/tlsmbedtls_plugin.dir/tls_mbedtls.c.o -c 
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:83:15: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
   83 |   if (mc->ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER &&
      |       ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:86:15: error: no 
member named 'conf' in 'struct mbedtls_ssl_context'
   86 |   if (mc->ssl.conf->endpoint == MBEDTLS_SSL_IS_SERVER)
      |       ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:145:60: error: no 
member named 'f_entropy' in 'struct mbedtls_ctr_drbg_context'
  145 |   if (PREDICT_FALSE (!mbedtls_main.ctr_drbgs[thread_index].f_entropy))
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/home/garga/work/vpp/src/vppinfra/clib.h:138:44: note: expanded from macro 
'PREDICT_FALSE'
  138 | #define PREDICT_FALSE(x) __builtin_expect((x),0)
      |                                            ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:242:18: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  242 |   while (mc->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER)
      |          ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:304:39: error: too 
few arguments to function call, expected 7, have 5
  302 |   rv = mbedtls_pk_parse_key (&mc->pkey,
      |        ~~~~~~~~~~~~~~~~~~~~
  303 |                              (const unsigned char *) ckpair->key,
  304 |                              vec_len (ckpair->key), NULL, 0);
      |                                                            ^
/usr/include/mbedtls/pk.h:1109:5: note: 'mbedtls_pk_parse_key' declared here
 1109 | int mbedtls_pk_parse_key(mbedtls_pk_context *ctx,
      |     ^                    ~~~~~~~~~~~~~~~~~~~~~~~~
 1110 |                          const unsigned char *key, size_t keylen,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1111 |                          const unsigned char *pwd, size_t pwdlen,
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1112 |                          mbedtls_f_rng_t *f_rng, void *p_rng);
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:356:18: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  356 |   while (mc->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER)
      |          ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:377:18: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  377 |   while (mc->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER)
      |          ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:385:15: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  385 |   if (mc->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER)
      |       ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:393:15: error: no 
member named 'conf' in 'struct mbedtls_ssl_context'
  393 |   if (mc->ssl.conf->endpoint == MBEDTLS_SSL_IS_CLIENT)
      |       ~~~~~~~ ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:437:19: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  437 |   ASSERT (mc->ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER);
      |           ~~~~~~~ ^
/home/garga/work/vpp/src/vppinfra/error_bootstrap.h:38:32: note: expanded from 
macro 'ASSERT'
   38 |   if (CLIB_ASSERT_ENABLE && ! (truth))                  \
      |                                ^~~~~
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:484:30: error: no 
member named 'state' in 'struct mbedtls_ssl_context'
  484 |   if (PREDICT_FALSE (mc->ssl.state != MBEDTLS_SSL_HANDSHAKE_OVER))
      |                      ~~~~~~~ ^
/home/garga/work/vpp/src/vppinfra/clib.h:138:44: note: expanded from macro 
'PREDICT_FALSE'
  138 | #define PREDICT_FALSE(x) __builtin_expect((x),0)
      |                                            ^
/home/garga/work/vpp/src/plugins/tlsmbedtls/tls_mbedtls.c:603:22: error: no 
member named 'f_entropy' in 'struct mbedtls_ctr_drbg_context'
  603 |     mm->ctr_drbgs[i].f_entropy = 0;
      |     ~~~~~~~~~~~~~~~~ ^
12 errors generated.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26833): https://lists.fd.io/g/vpp-dev/message/26833
Mute This Topic: https://lists.fd.io/mt/117899261/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to