<?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 — error -308 with libcurl application after a few minutes delay]]></title>
		<link>https://www.wolfssl.com/forums/topic720-error-308-with-libcurl-application-after-a-few-minutes-delay.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic720.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in error -308 with libcurl application after a few minutes delay.]]></description>
		<lastBuildDate>Wed, 30 Sep 2015 23:02:04 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: error -308 with libcurl application after a few minutes delay]]></title>
			<link>https://www.wolfssl.com/forums/post2245.html#p2245</link>
			<description><![CDATA[<p>I resolved this for now by patching libcurl to ignore a 0 result from SSL_set_session. Seems to work fine so far.</p>]]></description>
			<author><![CDATA[null@example.com (csg)]]></author>
			<pubDate>Wed, 30 Sep 2015 23:02:04 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2245.html#p2245</guid>
		</item>
		<item>
			<title><![CDATA[Re: error -308 with libcurl application after a few minutes delay]]></title>
			<link>https://www.wolfssl.com/forums/post2239.html#p2239</link>
			<description><![CDATA[<p>It looks to me as if there&#039;s a problem with the way libcurl is interacting with wolfSSL.</p><p>If libcurl has a cached session, it will try to call its SSL_set_session function. For the cyassl backend, this can fail if wolfSSL&#039;s SetSession determines that the session has timed out (wolfssl/src/ssl.c, line 6333).</p><p>When the backend (wolfSSL in this case) returns an error, curl gives up on that connection.</p><p>Still not sure why a connection is not reestablished after the error. It&#039;s up to the TLS library to decide when the session expires.</p>]]></description>
			<author><![CDATA[null@example.com (csg)]]></author>
			<pubDate>Mon, 28 Sep 2015 19:11:26 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2239.html#p2239</guid>
		</item>
		<item>
			<title><![CDATA[Re: error -308 with libcurl application after a few minutes delay]]></title>
			<link>https://www.wolfssl.com/forums/post2238.html#p2238</link>
			<description><![CDATA[<p>Hi csg,</p><p>In your debug log, it seems odd that SSL_shutdown() is being called right after SSL_new().&nbsp; SSL_new() creates a new SSL session, which is then usually followed by SSL_connect() or SSL_read/SSL_write().</p><p>My guess is that since the application just created a new SSL session, but hasn&#039;t yet established that connection with a peer, SSL_shutdown() is failing to send it&#039;s CloseNotify Alert, giving you a Embed Send error.</p><p>Best Regards,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Mon, 28 Sep 2015 16:46:26 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2238.html#p2238</guid>
		</item>
		<item>
			<title><![CDATA[error -308 with libcurl application after a few minutes delay]]></title>
			<link>https://www.wolfssl.com/forums/post2235.html#p2235</link>
			<description><![CDATA[<p>Hello,</p><p>The problem today is that wolfSSL stops communicating with the server after 10-20 minutes of success.</p><p>My application is using libcurl and I am using the 7.44.0 version of that library.<br />I am using a version of wolfSSL checked out yesterday morning (edc9a24).</p><p>With debug tracing on, I have tracked the error down to somewhere near the following sequence, which repeats for every failed request until the program is restarted.</p><div class="quotebox"><blockquote><p>wolfSSL Entering SSL_new<br />wolfSSL Leaving SSL_new, return 0<br />wolfSSL Entering SSL_set_session<br />wolfSSL Entering SSL_get_error<br />wolfSSL Leaving SSL_get_error, return 0<br />wolfSSL Entering ERR_error_string<br />wolfSSL Entering SSL_shutdown()<br />growing output buffer</p><p>Embed Send error<br />&nbsp; &nbsp; General error<br />wolfSSL error occured, error = -308<br />wolfSSL Entering SSL_free<br />CTX ref count not 0 yet, no free<br />Shrinking output buffer</p><p>wolfSSL Entering BIO_free<br />wolfSSL Leaving SSL_free, return 0<br />wolfSSL Entering SSL_CTX_free<br />CTX ref count down to 0, doing full free<br />wolfSSL Entering wolfSSL_CertManagerFree<br />wolfSSL Leaving SSL_CTX_free, return 0</p></blockquote></div><p>-308 is SOCKET_ERROR_E &quot;error state on socket&quot;. Not sure what is causing this. The server side is stable, has hundreds of clients online for months at a time with a different TLS library. wolfSSL is new to me as is the libcurl glue, but libcurl only gives me &quot;SSL connect error&quot; (35) so I&#039;m not sure if it would be productive to troubleshoot from that end.</p><p>Clues or suggestions would be much appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (csg)]]></author>
			<pubDate>Fri, 25 Sep 2015 22:01:27 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2235.html#p2235</guid>
		</item>
	</channel>
</rss>
