What is the correct way to build wolfssl for Xilinx ZCU102

- Is it possible to build with "./configure"
0r do we need to use XSDK IDE.

I need to build with TLS 1.3 support. Could you please share the steps...

2

(3 replies, posted in wolfSSL)

Hi David,

Thank you for your reply.

Here is the snippet of the code calling wolfssl_read.

        //Receive data from socket.
        char buf[RECV_BUFFER_SIZE_BYTES] = {0}; //16384 bytes

        while (true)
        {
            memset(buf, 0, RECV_BUFFER_SIZE_BYTES);

            // Wait for client to send data
            ssize_t bytesReceived = wolfSSL_read(reinterpret_cast<WOLFSSL*>(pReqHandler->getContext()), buf, sizeof(buf));

            if (bytesReceived < 0)
            {
                ERROR1("\r\nwolfSSL_read", "requestHandlerThreadProc()", getWolfSSLErrString(pReqHandler->getContext()));
                break;
            }
            if (bytesReceived == SSL_ERROR_WANT_READ || bytesReceived == SSL_ERROR_WANT_WRITE)
            {
                continue;
            }
            if (bytesReceived == 0)
            {
                break;
            }
        }
        vTaskDelete(NULL);

The above function runs in thread. For each socket separate thread will be created. "sys_thread_new" function (LwIP library  function) used to create threads.

Here is the log info of wolfSSL after adding DEBUG_WOLFSSL.

wolfSSL Entering wolfSSL_read()
wolfSSL Entering wolfSSL_read_internal()
wolfSSL Entering ReceiveData()
growing input buffer

received record layer msg
got ALERT!
wolfSSL error occurred, error = -132
wolfSSL Leaving wolfSSL_read_internal(), return -132

Regards,
Iyyappan.

Hi David,

Thank you for your reply.

>> Have you called wolfSSL_Init() or wolfCrypt_Init() in your application code?
    I called wolfSSL_Init in my application code.
>> In your Xilinx BSP / Hardware Platform have you enable the xilsecure library?
      Yes. xilsecure library enabled in the BSP settings.

I will try the examples you have mentioned and i will let you know the results.

Regards,
Iyaps.

Hi,

I am using wolfSSL library to send the data with SSL security. I can get the actual data. But when the read operation occurs for the second time I am getting -132 (Output buffer too small or input too large) error value from wolfssl_read data. Could you please tell me the reason for getting this error?

Here are the other details,
1. Board : ZCU102.
2. OS : FreeRTOS.
3. TCP/IP stack : LwIP.
4. WolfSSL version : 4.7.0.

Best regards,
Iyyappan.

Hi,

I want to use the hardware crypto acceleration encryption in xilinx board.
I have prepared user_settings.h with below macros.

#define HAVE_TLS_EXTENSIONS
#define HAVE_SUPPORTED_CURVES
#define HAVE_ECC
#define HAVE_HKDF
#define WC_RSA_PSS
#define WC_RSA_BLINDING
#define NO_MULTIBYTE_PRINT
#define WOLFSSL_RIPEMD
#define NO_PSK
#define HAVE_EXTENDED_MASTER
#define WOLFSSL_SNIFFER
#define HAVE_SECURE_RENEGOTIATION
#define HAVE_AESGCM
#define WOLFSSL_SHA384
#define WOLFSSL_SHA512
#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS
#define HAVE_ECC
#define ECC_SHAMIR
#define ECC_TIMING_RESISTANT

#define WOLFSSL_XILINX
#define NO_FILESYSTEM
#define USE_FAST_MATH
#define FREERTOS
#define WOLFSSL_LWIP
#define WOLFSSL_XILINX_CRYPT
#define WOLFSSL_AES_DIRECT

While running the Application, the code execution halts in XSecure_AesEncryptData function in the xil-aesgcm.c file. This file is available in wolfssl library. This file internally calls xil_secure library functions. XSecure_AesEncryptData calls XSecure_AesEncryptInit, XSecure_AesEncryptUpdate functions.

Here are the other details,
1. Board : ZCU102.
2. OS : FreeRTOS.
3. TCP/IP stack : LwIP.
4. WolfSSL version : 4.7.0.

Could you please tell me the reason for execution halts in the XSecure_AesEncryptData function?

Best regards,
Iyaps.

Hi Team,

I am new to wolfSSL. I am going to use wolfSSL in an embedded application.

The configurations are,
Board      : Xilinx development board (ZCU102).
Processor : Cortex A53.
OS          : FreeRTOS

Please give your answers for the following questions.

1. I would like to communicate with external devices with or without SSL/TLS security. So Is it possible to communicate without using SSL/TLS security with wolfSSL API's?
2. I know that wolfSSL is the successor of CyaSSL. But I would like to know what is the base layer of wolfSSL/yaSSL is developed from. Whether wolfSSL uses openSSL or LwIP functions internally?

Best regards,
Iyaps.