insanum / ktls_test

TLS v1.2/1.3 echo client/server application using wolfSSL that supports KTLS offload.
MIT License
24 stars 4 forks source link

Compilation failed on ubuntu 18.04 LTS #2

Open satyakommula96 opened 3 years ago

satyakommula96 commented 3 years ago

while compiling ktls_test tool failed.

make[2]: Leaving directory '/home/localadmin/Integration/tools/contributed/tls_ext/test_ktls/ktls_test/wolfssl'
make[1]: Leaving directory '/home/localadmin/Integration/tools/contributed/tls_ext/test_ktls/ktls_test/wolfssl'
+ cd -
/home/localadmin/Integration/tools/contributed/tls_ext/test_ktls/ktls_test
+ gcc -I./wolfssl tls_server.c -L./wolfssl/src/.libs -lwolfssl -lm -o tls_server
tls_server.c: In function ‘config_ktls’:
tls_server.c:71:39: error: storage size of ‘crypto_256’ isn’t known
  struct tls12_crypto_info_aes_gcm_256 crypto_256;
                                       ^~~~~~~~~~
tls_server.c:91:19: error: ‘TLS_CIPHER_AES_GCM_256_KEY_SIZE’ undeclared (first use in this function); did you mean ‘TLS_CIPHER_AES_GCM_128_KEY_SIZE’?
      (key_size != TLS_CIPHER_AES_GCM_256_KEY_SIZE)) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   TLS_CIPHER_AES_GCM_128_KEY_SIZE
tls_server.c:91:19: note: each undeclared identifier is reported only once for each function it appears in
tls_server.c:115:6: error: ‘TLS_1_3_VERSION’ undeclared (first use in this function); did you mean ‘TLS_1_2_VERSION’?
    : TLS_1_3_VERSION;
      ^~~~~~~~~~~~~~~
      TLS_1_2_VERSION
tls_server.c:119:6: error: ‘TLS_CIPHER_AES_GCM_256’ undeclared (first use in this function); did you mean ‘TLS_CIPHER_AES_GCM_128’?
    : TLS_CIPHER_AES_GCM_256;
      ^~~~~~~~~~~~~~~~~~~~~~
      TLS_CIPHER_AES_GCM_128
tls_server.c:203:35: error: ‘TLS_RX’ undeclared (first use in this function); did you mean ‘TLS_TX’?
   if (setsockopt(sockfd, SOL_TLS, TLS_RX, crypto_info,
                                   ^~~~~~
                                   TLS_TX
tls_server.c: In function ‘servelet’:
tls_server.c:273:29: error: ‘TLS_GET_RECORD_TYPE’ undeclared (first use in this function); did you mean ‘TLS_SET_RECORD_TYPE’?
        (cmsgh->cmsg_type == TLS_GET_RECORD_TYPE)) {
                             ^~~~~~~~~~~~~~~~~~~
                             TLS_SET_RECORD_TYPE
sh: 1: ./tls_client_12: not found

OS:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:        18.04
Codename:       bionic

kernel:

Linux 5.10.30-051030-generic x86_64
insanum commented 3 years ago

Looks like you're either missing kernel headers or the TLS feature wasn't enabled in your kernel. All of those defines should be found under /usr/include/linux.