<?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 — integrate with esp8266 sdk ?]]></title>
		<link>https://www.wolfssl.com/forums/topic1934-integrate-with-esp8266-sdk.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1934.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in integrate with esp8266 sdk ?.]]></description>
		<lastBuildDate>Tue, 29 Nov 2022 19:51:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6834.html#p6834</link>
			<description><![CDATA[<p>The same source code works with mbedtls.<br />I was moving away from that because it&#039;s more memory hungry but it looks like I&#039;ll have to come back on that decision.</p>]]></description>
			<author><![CDATA[null@example.com (backxdanny)]]></author>
			<pubDate>Tue, 29 Nov 2022 19:51:19 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6834.html#p6834</guid>
		</item>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6829.html#p6829</link>
			<description><![CDATA[<p>Hi Danny,</p><p>-188 is ASN_NO_SIGNER_E, this means we were not able to find a CA signer for your peer&#039;s certificate.<br />Are you registering CA certificates before connecting?&nbsp; You can register CA certs using a _verify API such as wolfSSL_CTX_load_verify_buffer.&nbsp; Are you confident your CA certificates include your peer&#039;s certificate?</p><p>Thanks,<br />Kareem</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Mon, 28 Nov 2022 18:42:12 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6829.html#p6829</guid>
		</item>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6828.html#p6828</link>
			<description><![CDATA[<p>OK, found the memory problem (was in my code, as you&#039;d expect).</p><div class="codebox"><pre><code>I (4864) tester: WolfSSL tester (c) Danny Backx, build : 2022/11/25 21:07:23
I (4876) tester: Free heap 64960 (line 81)
I (8878) tester: Time has been set : 2022-11-25 21:07:45
I (8879) tester: Free heap 68328 (line 109)
I (8881) tester: Set WolfSSL logging
E (8885) tester: Google/Firebase CloudMessaging ...
I (8894) tester: Free heap 68328 (line 115)
I (8991) esp-tls-wolfssl: set_client_config 177 set_verify
E (9383) esp-tls-wolfssl: Failed to verify peer certificate , returned 24!
E (9385) esp-tls: Failed to open new connection
E (9388) TRANS_SSL: Failed to open a new connection
E (9400) HTTP_CLIENT: Connection failed, sock &lt; 0
E (9405) tester: switch_task: firebase cloud message delivery failed
I (9416) tester: Free heap 67852 (line 131)
E (9423) tester: Sunrise ...
I (9428) tester: Free heap 67832 (line 138)
I (9633) esp-tls-wolfssl: set_client_config 177 set_verify
I (16386) tester: Sunrise : query ok
I (16387) tester: Sunrise is at 0812, sunset at 1643
I (16389) tester: Free heap 65892 (line 150)
E (16393) tester: Terminating ...</code></pre></div><p>With debug enabled, this generates 1000 lines which I&#039;m not pasting here (until you ask).<br />I grepped a bit though :<br /></p><div class="codebox"><pre><code>hp: {1659} fgrep -i -e &quot;wolfSSL error occur&quot; -e esp-tls-wolfssl typescript
I (9396) esp-tls-wolfssl: set_client_config 177 set_verify
I (11575) tester: 0 wolfSSL error occurred, error = 155 line:12179 file:/home/danny/src/esp8266/wol
I (12209) tester: 0 wolfSSL error occurred, error = 188 line:12179 file:/home/danny/src/esp8266/wol
I (12316) tester: 0 wolfSSL error occurred, error = 188 line:19666 file:/home/danny/src/esp8266/wol
I (12331) tester: 0 wolfSSL error occurred, error = 188 line:12723 file:/home/danny/src/esp8266/wol
E (12364) esp-tls-wolfssl: Failed to verify peer certificate , returned 24!
I (13333) esp-tls-wolfssl: set_client_config 177 set_verify
hp: {1660}</code></pre></div><p>Looks like the relevant error code is 188, right ?<br />What could cause this, given how I include both certificates (root certs for both services) ?</p><p>Thanks,<br />&nbsp; Danny</p>]]></description>
			<author><![CDATA[null@example.com (backxdanny)]]></author>
			<pubDate>Fri, 25 Nov 2022 20:19:26 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6828.html#p6828</guid>
		</item>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6827.html#p6827</link>
			<description><![CDATA[<p>and I&#039;m using WolfSSL downloaded from github a couple of days ago, and am using certificates from the latter part of the output of commands like<br /></p><div class="codebox"><pre><code>openssl s_client -connect fcm.googleapis.com:443 &lt; /dev/null -showcerts</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (backxdanny)]]></author>
			<pubDate>Thu, 24 Nov 2022 18:55:10 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6827.html#p6827</guid>
		</item>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6826.html#p6826</link>
			<description><![CDATA[<p>Apologies, I appear to be a mess.<br />Copied the wrong debug log :-(</p><p>I appear to run into a memory issue (I see -125 on the second call), which I guess is<br /></p><div class="codebox"><pre><code>    MEMORY_E           = -125,  /* out of memory error */</code></pre></div><p>Not entirely sure how to proceed now except studying my code line by line, assuming it&#039;s my problem.</p><p>The two calls in my code never work both. If one works because I disable cert checking<br /></p><div class="codebox"><pre><code>        wolfSSL_CTX_set_verify( (WOLFSSL_CTX *)tls-&gt;priv_ctx, WOLFSSL_VERIFY_NONE, NULL);
        // wolfSSL_CTX_set_verify( (WOLFSSL_CTX *)tls-&gt;priv_ctx, WOLFSSL_VERIFY_PEER, NULL);</code></pre></div><p>then the other runs into memory errors, or if I do ask the check, then the first call fails but the second works.</p><p>So I assume I have at least two problems.</p>]]></description>
			<author><![CDATA[null@example.com (backxdanny)]]></author>
			<pubDate>Thu, 24 Nov 2022 18:53:58 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6826.html#p6826</guid>
		</item>
		<item>
			<title><![CDATA[Re: integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6823.html#p6823</link>
			<description><![CDATA[<p>Hi Danny,</p><p>-155 is ASN_SIG_CONFIRM_E, it means we were unable to confirm your certificate&#039;s signature.&nbsp; Are you confident your peer&#039;s certificate is valid?&nbsp; Are you registering CA certificates before trying to connect?&nbsp; Can you provide your build settings? (user_settings.h or ./configure line)<br />Please also confirm you are using our latest wolfSSL release, 5.5.3.</p><p>Thanks,<br />Kareem</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Wed, 23 Nov 2022 23:00:15 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6823.html#p6823</guid>
		</item>
		<item>
			<title><![CDATA[integrate with esp8266 sdk ?]]></title>
			<link>https://www.wolfssl.com/forums/post6822.html#p6822</link>
			<description><![CDATA[<p>Hi,<br />I built an app with the esp8266 sdk but then ran into problems with its supplied ssl, so I&#039;m trying to replace it with the &quot;official&quot; wolfssl.</p><p>while I can get the examples in esp-wolfssl to work in my environment, anything I do with the normal SDK&#039;s esp-http-client appears to fail.</p><p>Are there known problems with this integration, or does the debug output below reveal something I can&#039;t interpret as a novel wolfSSL user ?</p><br /><p>&nbsp; Danny</p><div class="codebox"><pre><code>I (7595) esp switch: 2 wolfSSL Entering GetObjectId()
I (7604) esp switch: 2 wolfSSL Entering GetObjectId()
I (7613) esp switch: 1 CA found
I (7619) esp switch: 1 Failed to verify Peer&#039;s cert
I (7627) esp switch: 1    No callback override available, fatal
I (7637) esp switch: 0 wolfSSL error occurred, error = 155 line:12179
I (7655) esp switch: 2 wolfSSL Entering SendAlert
I (7661) esp switch: 1 growing output buffer
I (7671) esp switch: 1 Shrinking output buffer
I (7676) esp switch: 3 wolfSSL Leaving SendAlert, return 0
I (7686) esp switch: 3 wolfSSL Leaving ProcessPeerCerts, return -155
I (7697) esp switch: 2 wolfSSL Entering wolfSSL_X509_NAME_free
I (7707) esp switch: 2 wolfSSL Entering wolfSSL_X509_NAME_free
I (7717) esp switch: 3 wolfSSL Leaving DoCertificate, return -155
I (7727) esp switch: 3 wolfSSL Leaving DoHandShakeMsgType(), return -155
I (7738) esp switch: 3 wolfSSL Leaving DoHandShakeMsg(), return -155
I (7749) esp switch: 0 wolfSSL error occurred, error = 155 line:19666 
I (7765) esp switch: 0 wolfSSL error occurred, error = 155 line:12723 
I (7780) esp switch: 2 wolfSSL Entering SSL_get_error
I (7789) esp switch: 3 wolfSSL Leaving SSL_get_error, return -155
E (7799) esp-tls-wolfssl: Failed to verify peer certificate , returned 21!
E (7810) esp-tls: Failed to open new connection
E (7818) TRANS_SSL: Failed to open a new connection
I (7827) esp switch: 2 wolfSSL Entering SSL_shutdown()
I (7836) esp switch: 3 wolfSSL Leaving SSL_shutdown(), return -1
I (7846) esp switch: 2 wolfSSL Entering SSL_free
I (7854) esp switch: 1 Free&#039;ing client ssl
I (7862) esp switch: 1 Shrinking input buffer
I (7870) esp switch: 2 wolfSSL Entering wolfSSL_sk_CIPHER_free
I (7880) esp switch: 2 wolfSSL Entering wolfSSL_sk_free
I (7889) esp switch: 2 wolfSSL Entering wolfSSL_sk_X509_pop_free
I (7899) esp switch: 2 wolfSSL Entering wolfSSL_sk_pop_free
I (7909) esp switch: 2 wolfSSL Entering wolfSSL_sk_X509_NAME_pop_free</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (backxdanny)]]></author>
			<pubDate>Wed, 23 Nov 2022 21:51:09 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6822.html#p6822</guid>
		</item>
	</channel>
</rss>
