<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — [SOLVED] Errors during handshake]]></title>
		<link>https://www.wolfssl.com/forums/topic1286-solved-errors-during-handshake.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1286.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [SOLVED] Errors during handshake.]]></description>
		<lastBuildDate>Thu, 29 Nov 2018 16:46:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4318.html#p4318</link>
			<description><![CDATA[<p>Hi oleksandr.tymoshenko,</p><p>Sorry for the delayed response! Glad to hear this was resolved by using the Server Name Indication Extension (SNI)!</p><br /><p>Warm Regards,</p><p>- K</p>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Thu, 29 Nov 2018 16:46:32 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4318.html#p4318</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4296.html#p4296</link>
			<description><![CDATA[<p>It is solved.</p><p>The main reason why the device failed to connect to the server is missing the wolfSSL_CTX_UseSNI call. So when I added it, my device connected to the server.</p><p>&nbsp; &nbsp; if (sniHostName)<br />&nbsp; &nbsp; &nbsp; &nbsp; if (wolfSSL_CTX_UseSNI(ctx, 0, sniHostName,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (word16) XSTRLEN(sniHostName)) != WOLFSSL_SUCCESS) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wolfSSL_CTX_free(ctx);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;UseSNI failed\n&quot;);<br />&nbsp; &nbsp; }</p><p>Where sniHostName is <strong>static char* sniHostName</strong>. It is the name of my server</p><p>I wish you all good luck! ))))</p>]]></description>
			<author><![CDATA[null@example.com (oleksandr.tymoshenko)]]></author>
			<pubDate>Fri, 16 Nov 2018 18:47:00 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4296.html#p4296</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4295.html#p4295</link>
			<description><![CDATA[<p>We added on the server missing cipher suites but that did not help.</p><p>When I try to connect using of openssl I can connect only if I use&nbsp; <strong>-servername</strong> option. For example:</p><p><strong>openssl s_client -CAfile ca.pem -tls1_2 -host iot-stg.dealor.co.il -port 443 -servername iot-stg.dealor.co.il</strong></p><p>What does mean this? How can I use this when working with library?</p><p>Regards, Alex.</p>]]></description>
			<author><![CDATA[null@example.com (oleksandr.tymoshenko)]]></author>
			<pubDate>Fri, 16 Nov 2018 15:31:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4295.html#p4295</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4294.html#p4294</link>
			<description><![CDATA[<p>I connected to <a href="http://www.howsmyssl.com">www.howsmyssl.com</a> and this server said that this is my cipher suite:</p><p>&quot;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256&quot;<br />&quot;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256&quot;<br />&quot;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&quot;<br />&quot;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&quot;<br />&quot;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&quot;<br />&quot;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&quot;<br />&quot;TLS_RSA_WITH_AES_256_CBC_SHA256&quot;<br />&quot;TLS_RSA_WITH_AES_128_CBC_SHA256&quot;<br />&quot;TLS_RSA_WITH_AES_256_CBC_SHA&quot;<br />&quot;TLS_RSA_WITH_AES_128_CBC_SHA&quot;</p><p>Also I got cipher suite for server</p><p><a href="https://www.ssllabs.com/ssltest/analyze.html?d=iot-stg.dealor.co.il">https://www.ssllabs.com/ssltest/analyze … alor.co.il</a></p><p>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384<br />TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256<br />TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256<br />TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384<br />TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</p><p>I can see that the server and client has common cipher: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</p><p>But a connection is not establishing</p>]]></description>
			<author><![CDATA[null@example.com (oleksandr.tymoshenko)]]></author>
			<pubDate>Fri, 16 Nov 2018 10:25:54 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4294.html#p4294</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4292.html#p4292</link>
			<description><![CDATA[<p>Hi Kaleb! </p><p>Thank you for rapid an answer! ))</p><p>Those defines added but it did not help.</p><p>It is a list of defines for my wolfSSL:</p><p>#define WOLFSSL_LWIP<br />#define NO_WRITEV<br />#define NO_WOLFSSL_DIR<br />#define NO_INLINE<br />#define NO_WOLFSSL_MEMORY<br />#define HAVE_PK_CALLBACKS<br />#define WOLFSSL_KEY_GEN<br />#define WOLFSSL_RIPEMD<br />#define USE_WOLFSSL_IO<br />#define WOLFSSL_STATIC_RSA<br />#define NO_DH<br />#define NO_MD4<br />#define NO_DES3<br />#define NO_DSA<br />#define NO_RC4<br />#define NO_RABBIT<br />#define HAVE_ECC<br />#define WC_NO_HARDEN<br />#define FREERTOS<br />#define WOLFSSL_TYPES<br />#define NO_FILESYSTEM<br />#define WOLFSSL_ALT_CERT_CHAINS<br />#define WOLFSSL_ALLOW_TLSV10<br />#define WOLFSSL_SMALL_STACK<br />#define SMALL_SESSION_CACHE</p><p>// It was edded by me<br />#define HAVE_CURVE25519<br />#define DEBUG_WOLFSSL</p>]]></description>
			<author><![CDATA[null@example.com (oleksandr.tymoshenko)]]></author>
			<pubDate>Fri, 16 Nov 2018 07:37:16 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4292.html#p4292</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4291.html#p4291</link>
			<description><![CDATA[<p>Hi oleksandr.tymoshenko,</p><p>Thank you for reaching out to wolfSSL with your questions!</p><p>In the README for the esspressif example did you follow the steps:</p><div class="quotebox"><blockquote><p>STEP 3: Modify Makefile to define WOLFSSL_USER_SETTINGS<br />STEP 4: Copy user_setting.h to your project&#039;s include folder<br />since WOLFSSL_USER_SETTINGS is defined, it&#039;ll allow you to use the setting by yourself in user_setting.h.</p></blockquote></div><p>If so can you tell me what settings are in your user_settings.h header?</p><p>Have you defined these two settings?</p><div class="codebox"><pre><code>#define HAVE_ECC
#define HAVE_CURVE25519</code></pre></div><p>If not the connection will not work. I ran a scan against the target and the only supported cipher suites are below, they all use curve25519 (HAVE_CURVE25519) and ECDHE (HAVE_ECC) for key exchange:</p><div class="codebox"><pre><code>scan report for iot-stg.dealor.co.il (35.198.100.186)
Host is up (0.19s latency).
rDNS record for 35.198.100.186: 186.100.198.35.bc.googleusercontent.com

PORT    STATE SERVICE
443/tcp open  https
| ssl-enum-ciphers: 
|   TLSv1.2: 
|     ciphers: 
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (ecdh_x25519) - A
|     compressors: 
|       NULL
|     cipher preference: server
|_  least strength: A</code></pre></div><p>I can also test successfully from our default client app on a host PC so it looks like you just need to configure the library to support the same features as your target and you will be good to go!</p><div class="codebox"><pre><code>$kalebhimes/wolfssl$ ./examples/client/client -h iot-stg.dealor.co.il -p 443 -d -g

peer&#039;s cert info:
 issuer : /O=Acme Co/CN=Kubernetes Ingress Controller Fake Certificate
 subject: /O=Acme Co/CN=Kubernetes Ingress Controller Fake Certificate
 altname = ingress.local
 serial number:4d:75:69:c3:b8:24:f6:80:ae:4a:7b:b6:0c:71:6f:a8 
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
SSL curve name is SECP256R1
Client Random : 43EF32C80F0BABE85150A4F7422B6BBD2A81901380A117A6CBF5A4194F959A3F
SSL connect ok, sending GET...
HTTP/1.1 404 Not Found
Server: nginx/1.15.5
Date: Thu, 15 Nov 2018 23:17:28 G
MT
Content-Type: text/plain; charset=utf-8
Content-Length: 21
Connection: cl</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Thu, 15 Nov 2018 23:28:47 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4291.html#p4291</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Errors during handshake]]></title>
			<link>https://www.wolfssl.com/forums/post4290.html#p4290</link>
			<description><![CDATA[<p>Hi guys!</p><p>I am sorry for disturbing you but we have a problem with wolfSSL:<br /><a href="https://github.com/espressif/esp-wolfssl/tree/feature/for_esp8266_rtos_sdk_v2.x.x">https://github.com/espressif/esp-wolfss … sdk_v2.x.x</a></p><p>I am trying to connect to the customer&#039;s server through a tls connection. I received CA file from him and I can connect to his server using, for example, openssl utility. </p><p><strong>openssl s_client -CAfile ca.pem -tls1_2 -host iot-stg.dealor.co.il -port 443 -servername iot-stg.dealor.co.il</strong></p><p>It is output of this command:</p><p>SSL handshake has read 3414 bytes and written 298 bytes<br />Verification: OK<br />---<br />New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384<br />Server public key is 2048 bit<br />Secure Renegotiation IS supported<br />Compression: NONE<br />Expansion: NONE<br />No ALPN negotiated<br />SSL-Session:<br />&nbsp; &nbsp; Protocol&nbsp; : TLSv1.2<br />&nbsp; &nbsp; Cipher&nbsp; &nbsp; : ECDHE-RSA-AES256-GCM-SHA384<br />&nbsp; &nbsp; Session-ID: 8BB90C08D0FD7639681B9DDCA96EDD6C5000FA550CC27B2E6144ABB5657C0BAE<br />&nbsp; &nbsp; Session-ID-ctx:<br />&nbsp; &nbsp; Master-Key: 2429B05412CB4451FB28A572672C94F3FF69FCBECB3BC8D54A1961CA41AD8D97E418B1CE0A15AA269B5024CADDAF1CB6<br />&nbsp; &nbsp; PSK identity: None<br />&nbsp; &nbsp; PSK identity hint: None<br />&nbsp; &nbsp; SRP username: None<br />&nbsp; &nbsp; TLS session ticket lifetime hint: 600 (seconds)<br />&nbsp; &nbsp; TLS session ticket:<br />&nbsp; &nbsp; 0000 - 2f da 6a 7e 61 31 8f d1-f7 b0 a7 58 53 94 7d e5&nbsp; &nbsp;/.j~a1.....XS.}.<br />&nbsp; &nbsp; 0010 - d1 84 91 26 34 f6 fe d4-68 11 5f 26 bf a8 79 0e&nbsp; &nbsp;...&amp;4...h._&amp;..y.<br />&nbsp; &nbsp; 0020 - 1b 66 0f f3 88 9c e3 1f-e1 04 ac b5 4a 65 32 68&nbsp; &nbsp;.f..........Je2h<br />&nbsp; &nbsp; 0030 - 33 67 31 e4 71 16 85 88-d6 39 44 ae fc 99 aa 2b&nbsp; &nbsp;3g1.q....9D....+<br />&nbsp; &nbsp; 0040 - a9 40 b2 2b fa fa ed ee-65 cd cd a8 f8 bd 24 08&nbsp; &nbsp;.@.+....e.....$.<br />&nbsp; &nbsp; 0050 - 36 49 02 96 35 e9 bb 79-5f 39 76 90 bb d1 ef 87&nbsp; &nbsp;6I..5..y_9v.....<br />&nbsp; &nbsp; 0060 - bc 08 6f 6c 2b 61 b1 df-4a 24 5d 86 70 22 18 b6&nbsp; &nbsp;..ol+a..J$].p&quot;..<br />&nbsp; &nbsp; 0070 - f4 5b a1 d8 d4 2f 5d 72-93 65 84 24 77 29 49 2e&nbsp; &nbsp;.[.../]r.e.$w)I.<br />&nbsp; &nbsp; 0080 - 2f 45 0b 7b 6a b8 ef f3-b1 cc 5d 75 52 56 32 25&nbsp; &nbsp;/E.{j.....]uRV2%<br />&nbsp; &nbsp; 0090 - 1e aa 30 f9 43 89 f8 83-b2 7e 85 19 45 0c 19 44&nbsp; &nbsp;..0.C....~..E..D<br />&nbsp; &nbsp; 00a0 - d8 51 8a 28 67 03 3b fb-dc aa dc 30 01 ba 7d d3&nbsp; &nbsp;.Q.(g.;....0..}.<br />&nbsp; &nbsp; 00b0 - 6c 96 21 9f 15 61 9f 50-46 39 82 cb 97 09 99 57&nbsp; &nbsp;l.!..a.PF9.....W<br />&nbsp; &nbsp; 00c0 - 2b 48 34 fd f2 4c 48 fb-74 1f a8 95 30 b0 43 7c&nbsp; &nbsp;+H4..LH.t...0.C|</p><p>&nbsp; &nbsp; Start Time: 1542192588<br />&nbsp; &nbsp; Timeout&nbsp; &nbsp;: 7200 (sec)<br />&nbsp; &nbsp; Verify return code: 0 (ok)<br />&nbsp; &nbsp; Extended master secret: yes</p><p>But I can’t connect from your demo example.</p><p>What can be wrong?</p><p>The project, its log and CA file are attached to this message.</p><p>Thank you in advance.</p><p>Regard, Alex.</p>]]></description>
			<author><![CDATA[null@example.com (oleksandr.tymoshenko)]]></author>
			<pubDate>Thu, 15 Nov 2018 19:45:54 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post4290.html#p4290</guid>
		</item>
	</channel>
</rss>
