Topic: wolfSSL error - help

Hi im trying to get the wolfSSL embedded SSL running on STM32F4xx using Chibios and LwIP. Firstly all teh socket interface is working well and have tested this, in both Client and Server fashion.

So i proceed to port wolfSSL over, all is building ok and on testing connecting to a local SSL server i get this back ?


wolfSSL Entering wolfSSL_Init
wolfSSL Entering WOLFSSL_CTX_new
wolfSSL Entering CwolfSSL_CertManagerNew
wolfSSL Leaving WOLFSSL_CTX_new, return 0
wolfSSL Entering wolfSSL_CTX_load_verify_buffer
Adding a CA
wolfSSL Entering GetExplicitVersion
wolfSSL Entering GetMyVersion
Got Cert Header
wolfSSL Entering GetAlgoId
Got Algo ID
Getting Cert Name
Getting Cert Name
Got Subject Name
wolfSSL Entering GetAlgoId
Got Key
Parsed Past Key
wolfSSL Entering DecodeCertExtensions
wolfSSL Entering DecodeSubjKeyId
wolfSSL Entering DecodeAuthKeyId
wolfSSL Entering DecodeBasicCaConstraint
wolfSSL Entering GetAlgoId
    Parsed new CA
    Freeing Parsed CA
    Freeing der CA
        OK Freeing der CA
wolfSSL Leaving AddCA, return 0
wolfSSL Entering wolfSSL_CTX_set_verify
wolfSSL Entering SSL_new
wolfSSL Leaving SSL_new, return 0
wolfSSL Entering SSL_set_fd
wolfSSL Leaving SSL_set_fd, return 1
wolfSSL Entering SSL_write()
handshake not complete, trying to finish
wolfSSL Entering wolfSSL_negotiate
wolfSSL Entering SSL_connect()
growing output buffer

Embed Send error
    General error
wolfSSL error occured, error = -308
wolfSSL Leaving wolfSSL_negotiate, return -1
wolfSSL Leaving SSL_write(), return -1
wolfSSL Entering SSL_free
CTX ref count not 0 yet, no free
Shrinking output buffer

wolfSSL Leaving SSL_free, return 0

Share

Re: wolfSSL error - help

Hi,

Usually we see a socket error (-308) when the peer encountered an error of some sort. Have you tried connecting to a different server to see if the problem is consistent?  When porting to a new platform, we usually test against the wolfSSL example server (<wolfssl_root>/examples/server/server) running on a desktop machine somewhere.  This will allow you to turn on debugging on the server side (./configure --enable-debug) and see more information about why the connection is failing on the server side.

Thanks,
Chris

3 (edited by tabulous 2014-12-26 10:21:34)

Re: wolfSSL error - help

Hi Chris,
downloaded the latest version 3.3.0, open the <wolfssl_root>/examples/server/server.sln using Visual Studio 2008 Pro.

Firstly it does not build, lots of unresolved externals, also the solution explorer in VS, only shows one file, server.c, there are no header file etc.......Attached is a screen dump showing VS errors etc

????

Post's attachments

Untitled.jpg
Untitled.jpg 665.66 kb, 2 downloads since 2014-12-26 

You don't have the permssions to download the attachments of this post.

Share

Re: wolfSSL error - help

Hi,

Can you try opening and building the <wolfssl_root>/wolfssl.sln solution file?  This should build the wolfSSL library and all example applications as well.

Thanks,
Chris

Re: wolfSSL error - help

Again the solution is opened, but under the 'server' there are no header files and only server.c.

In server.c there is alot of grayed out areas, because of conditional compiler options (ifdefs etc), thus there is no config.h or c main.

its like all the paths are wrong, but as this is the tesing suite i would assume it should work out of the tin ?

Share

Re: wolfSSL error - help

Must say the support on here is well, poor............ Still waiting for a response !

Share

7 (edited by Vanger 2015-01-26 09:33:31)

Re: wolfSSL error - help

Hey tabulous,
     I'm using mbed to compile and build the application we are using for the wolfSSL embedded SSL library, and I found that updating from say version 3.0 to version 3.3 you just overwrite the files from the wolfSSL library currently loaded to mbed by wolfSSL with the same files from the newer 3.3 version of wolfSSL. This seemed to work fine when we updated the files, and quite a few bugs were fixed between the versions.

Share

Re: wolfSSL error - help

As far as getting the solution to compile locally on your machine, the <wolfssl_root>/wolfssl.sln solution file should contain a bunch of other projects for the compiler to build (testsuite project, echoserver project, echoclient project, etc.)

Share

Re: wolfSSL error - help

The wolfssl.sln VS solution wraps the wolfSSL (now wolfSSL) library, and the projects for our example server, client, echoserver, and echoclient, and some of our test tools. The solution builds the wolfSSL library and includes it into the other sub-projects automatically.

Attached is a screen capture of the solution browser on VS Express 2012. I opened the wolfssl.sln solution and it upgraded it from 2008 to 2012, but the layout is still the same. When I'm doing some testing, I'll build the server or client, and VS builds the library dependency first, and then the server, and handles the linking for me. If I were to open the disclosure on the Source Files under the "wolfssl" solution, the library sources would show up.

Post's attachments

Capture.PNG
Capture.PNG 14.71 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.