1

(1 replies, posted in wolfSSL)

I am compiling wolfssl with x64 gcc included in Mingw-w64.

Everything works fine in the examples except from ECC.
The same code, compiled with 32bits gcc works fine.

Here's the warnings when compiling:

/ctaocrypt/src/misc.c:161:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if (((cyassl_word)buf | (cyassl_word)mask | count) % CYASSL_WORD_SIZE == 0)
          ^
/ctaocrypt/src/misc.c:161:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     if (((cyassl_word)buf | (cyassl_word)mask | count) % CYASSL_WORD_SIZE == 0)
                             ^
\ctaocrypt\src\ecc.c:1080:12: warning: right shift count >= width of type
            i = (int)(buf >> (DIGIT_BIT - 1)) & 1;
            ^

I can fix the shift warning both by casting buf to an UINT64:

i = (int)((UINT64)buf >> (DIGIT_BIT - 1)) & 1;

or by modifying its type to a unsigned long long.

About the other warning, it is in function 'xorbuf'. As far as I know, cyassl_word is 64bits and the pointers should also be 64 bits. So I don't really know what is causing the problem.

I am defining:

WIN32
_WIN32
WIN64
_WIN64
HAVE_AESCCM
CYASSL_DTLS
HAVE_ECC

I am trying to test some things using the provided examples. In order to do so I need to perform a lot of connections. Here I have two problems:

I'm using DTLS-PSK, -s -u -v3.

Problem 1:
If I try to use the benchmark flag in the client: i.e. -b 100
It give me: yassl error: SSL_connect failed.
This same example without the -b flag runs fine.

Problem 2:
If I try to do it by myself I face the problem that the server quits after each connection from a client. Is it possible to keep the server running after a connection from a client in order to perform multiple consecutive connection without being necessary to rerun the server each time?

I'm using wolfSSL embedded SSL 3.0.0.

Thank you. That solved the problem.

When trying to run the examples from embedded SSL version 3.0.0 with DTLS (option -u) I keep having:
wolfSSL error: Bad SSL version.
When adding CyaSSL_DTLS to the preprocessor options, VS cannot build as it encounters some errors:

error LNK2019: unresolved external symbol _CyaDTLSv1_server_method referenced in function _server_test@4
error LNK2019: unresolved external symbol _CyaDTLSv1_2_server_method referenced in function _server_test@4
error LNK2019: unresolved external symbol _CyaSSL_dtls_get_current_timeout referenced in function _NonBlockingSSL_Accept
error LNK2019: unresolved external symbol _CyaSSL_dtls_got_timeout referenced in function _NonBlockingSSL_Accept

Another problem I have encountered is that when doing the same exchange but without -u option, using TLS I can made the handshake and the output is good but Wireshark does not show the traffic as TLS but as TCP messages. Anyone had also have this problem?