Topic: Client fails during handshake.

Hello,

I'm trying to write a tls client application in zig using wolfSSL, and I kept on getting -188 or -313 during the handshake step. The errors seem to alternate. The CA cert I was using I extracted from my Mozilla installation and even verified that it is the correct cert by finding it on the internet and comparing the text in the PEM file to what I found online, and it was a match.

Since nothing I tried was working I just decided to run a basic test using your scripts. I did the following:

git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl
./autogen.sh && ./configure && make && ./examples/client/client -h www.example.com -p 443 -g

And I keep getting the exact same errors: -188 or -313...

connecting to www.example.com:443
wolfSSL_connect error -313, received alert fatal error
wolfSSL error, examples/client/client.c L 4433: wolfSSL_connect failed

Could you please point me in the right direction on what I might be doing wrong?
Thank you for your time,
Nik

Share

Re: Client fails during handshake.

Hello Nik,

When using the example client, you can either have it use your system CA certs with the flag --sys-ca-certs, or you can pass in a specific CA cert with -A <path to cert>.  You must do one of these, as it defaults to our example CA cert which won't be valid for actual websites.
If you continue to see issues, please confirm which cert(s) you are registering and whether you are connecting to www.example.com or if that is just a placeholder.

Thanks,
Kareem

Share