1

(2 replies, posted in wolfSSL)

Hi,

I have a problem that seems weird.  I wrote a client and server application using UDP and DTLS patterned from the example echo server and client.  If I run the client and server on the same machine there is not problem with the connection and the data transfer.  However, if I place the server and client on different machines, I keep getting an SSL_Connection error: Resource not available.  I was wondering if anyone had any ideas of what I should be looking for?  Any and all suggestions would be greatly appreciated.

Doug

2

(2 replies, posted in wolfSSL)

I realize that the tutorial does not cover DTLS.  That is why I am asking if anyone knows of a straight forward way to change the echoclient/echoserver in the tutorial to use UPD with DTLS.  I did look at the example echoserver and echoclient that comes with the CyaSSL library.  There are so many #ifdef, etc that the code is extremely difficult to follow.  I was hoping someone had already built a simple UPD server and client with DTLS and that they were willing to share what they did.

3

(1 replies, posted in wolfSSL)

Hi,

I am trying to figure out how to make the echoserver/echoclient work with UPD and DTLS. I took the echoerver (tcpserv04.c) and replaced two lines of code with what I hoped would make it work with UDP and DTLS.  The lines I changed are as follows:

original line:
if( (ctx = wolfSSL_CTX_new(wolfTLSv1_server_method()) ) == NULL)

changed to:
if( (ctx = wolfSSL_CTX_new(wolfDTLSv1_server_method()) ) == NULL)

and

original line:
listenfd = Socket(AF_INET, SOCK_STREAM, 0);

changed to:
listenfd = Socket(AF_INET, SOCK_DGRAM, 0);

When I try to run the server, I get
Listen error: operation not supported

Is there a particular method I should be calling or not calling? Anyone who can give any help on this I would greatly appreciate it.

Doug

P.S. By the way, I did use --enable-dtls when I configured the wolfSSL embedded SSL library.

4

(2 replies, posted in wolfSSL)

Hi,

Does anyone no of any references that explains how to setup an echoserver/echoclient like the ones that are used in the SSL Tutorial but instead of TCP with SSL use UDP with DTLS?

Thanks,

Doug

Hi Chris,

I think the tutorial was quite good.  It gave me a good springboard to start from.  The only problem I had is being fairly new to Linux; which of course has nothing to do with the tutorial.  Certain things in Windows happens automatically (like registering a library).  Not so much in Linux and I am learning some of this the hard way.

My next task is to change the code in the tutorial from using TCP with TSL to using UPD with DTSL.  Should be fun.

Thanks,

Doug

Thank you for the response.  Copying the new certs and key made everything work.

Doug

Hi,

I have worked through the tutorial from chapter 11 in the manual and provided in a seperate document ssl-tutorial-2.0.

Both the echoclient and echoserver build and start without any problems.

I run into a problem when I try to send a message from the client to the server.
The following are the steps I use to run the programs and the output I get:
1. Start the server first.
2. Start the client with sudo ./echoclient 127.0.0.1 after which I get an output from the server Connection from 127.0.0.1, port 50890
3. Type hello at the client and press enter.
4. I wrote some code in the server to output the error message.  In the server, I get "wolfSSL_read error = -208, Error string: error state on socket"
In the client I get wolfSSL_write failed: Success.

So the problem seems to start in the str_cli() function of the tcpcli01.c file. So examing this and adding some code, to get the error code and error string from the wolfSSL_write I run the steps from above again, this time I get the error code and string in from the wolfSSL_write in the client:

"error = -151, ASN date error, current date after."

So I suspect there is a problem with the certificates.  I am not really sure if it is with the server or client certificates so I check both and they have an ending date of March 26, 2013.

So I try to build my own keys and certificates from the instructions found in wolfSSL-2.8.0/certs/taoCert.txt.  I replace the newly built certs with the old certs and ran the steps again.  This time I get the error

"error = -188, ASN no signer error to confrim failure"

So I think that I must not have built the certificates correctly, but I believer I have followed the instructions as closely as possible.

I any one can give me suggestions or guidance on what I need to do to successfully exchange messages between the client and server I would greatly appreciate it.

Thanks,

Doug