<div dir="ltr">Hi there.<div><br></div><div>I'm getting this error on a TLS server&client that I'm implementing and I can't really understand what I'm doing wrong.<br></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">139853560931992:error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1487:SSL alert number 48<br>139853560931992:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:</blockquote></div><div><br></div><div>This is the code of my server: <a href="https://pastebin.com/Fyuki8v0">https://pastebin.com/Fyuki8v0</a> and I generate the certificates this way: <a href="https://pastebin.com/CDRKU2Gc">https://pastebin.com/CDRKU2Gc</a><br></div><div>And I'm testing the server this way: openssl s_client -host 127.0.0.1 -port 4444 -cert client.crt -key client.key -CAfile ca.crt<br></div><div><br></div><div>If I run a server this way openssl s_server -key server.key -cert server.crt -CAfile ca.crt -accept 4444<br></div><div>I'm able to communicate with the same certificates and on my server code I always get:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Handshake Error 1<br>SSL_ERROR_SSL...</blockquote><div> </div><div>This is the result of openssl s_client command: <a href="https://pastebin.com/AWid1mxi">https://pastebin.com/AWid1mxi</a><br></div><div><br></div><div>Any idea what's happening to get this error?</div><div><br></div><div>Kind regards.</div></div>