<?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 — wolfSSL Leaving SSL_get_error, return -343]]></title>
		<link>https://www.wolfssl.com/forums/topic1846-wolfssl-leaving-sslgeterror-return-343.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1846.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in wolfSSL Leaving SSL_get_error, return -343.]]></description>
		<lastBuildDate>Mon, 28 Feb 2022 21:28:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: wolfSSL Leaving SSL_get_error, return -343]]></title>
			<link>https://www.wolfssl.com/forums/post6499.html#p6499</link>
			<description><![CDATA[<p>This is an informative error and it indicates that the peer has closed the connection and no more data will be expected.</p><p>I would suggest opening a support ticket by emailing support@wolfssl.com</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Mon, 28 Feb 2022 21:28:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6499.html#p6499</guid>
		</item>
		<item>
			<title><![CDATA[Re: wolfSSL Leaving SSL_get_error, return -343]]></title>
			<link>https://www.wolfssl.com/forums/post6496.html#p6496</link>
			<description><![CDATA[<p>As suggested , we have tested on WolfSSL&nbsp; 5.2.0 and observed same issue of TLS abnormal terminations saying close notify. The following are the logs . Could you please verify and update.</p><p>:: [LOG LEVEL : 2] &lt;LOG MESSAGE : wolfSSL Entering ReceiveData()&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : growing input buffer&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : received record layer msg&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : got ALERT!&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : Alert type: close_notify&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 0] &lt;LOG MESSAGE : wolfSSL error occurred, error = 0 line:16598 file:src/internal.c&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 0] &lt;LOG MESSAGE : wolfSSL error occurred, error = 343 line:19966 file:src/internal.c&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : Zero return, no more data coming&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : Notifying write side of fatal read error&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 2] &lt;LOG MESSAGE : wolfSSL Entering NotifyWriteSide&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 3] &lt;LOG MESSAGE : wolfSSL Leaving wolfSSL_read_internal(), return 0&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 2] &lt;LOG MESSAGE : wolfSSL Entering SSL_get_error&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 3] &lt;LOG MESSAGE : wolfSSL Leaving SSL_get_error, return -343&gt;<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:tls_wolfssl:_wolfssl_read: TLS connection to 12.215.193.11:5075 closed cleanly<br />Feb 26 03:12:24 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[21880]: INFO:core:tcp_trigger_report: Connection is getting release because of [EOF received]</p>]]></description>
			<author><![CDATA[null@example.com (rkumar)]]></author>
			<pubDate>Sat, 26 Feb 2022 18:49:49 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6496.html#p6496</guid>
		</item>
		<item>
			<title><![CDATA[Re: wolfSSL Leaving SSL_get_error, return -343]]></title>
			<link>https://www.wolfssl.com/forums/post6495.html#p6495</link>
			<description><![CDATA[<p>Hi rkumar,</p><p>Please upgrade to the latest wolfSSL, 5.2.0 and let me know if you still have any issues.</p><p>Thanks,<br />Kareem</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Tue, 22 Feb 2022 18:47:34 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6495.html#p6495</guid>
		</item>
		<item>
			<title><![CDATA[wolfSSL Leaving SSL_get_error, return -343]]></title>
			<link>https://www.wolfssl.com/forums/post6490.html#p6490</link>
			<description><![CDATA[<p>We are Using Opensips Core 3.2.2 with WolfSSL&nbsp; 4.7.1 version.&nbsp; we are seeing lot of abnormal TLS connection terminations with following error.&nbsp; &nbsp;wolfSSL Leaving SSL_get_error, return -343 from WolSSL . We are not observing this when Using OpenSSL.</p><p>As per the WolfSSL code </p><p>ZERO_RETURN&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = -343,&nbsp; &nbsp;/* peer sent close notify */</p><p>What exactly is this error and how to fix this from occurring ? Please suggest .</p><br /><p>The following are the logs I am seeing</p><p>:: [LOG LEVEL : 0] &lt;LOG MESSAGE : wolfSSL error occurred, error = 0 line:15386 file:src/internal.c&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 0] &lt;LOG MESSAGE : wolfSSL error occurred, error = 343 line:18657 file:src/internal.c&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : Zero return, no more data coming&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 1] &lt;LOG MESSAGE : Notifying write side of fatal read error&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 2] &lt;LOG MESSAGE : wolfSSL Entering NotifyWriteSide&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 3] &lt;LOG MESSAGE : wolfSSL Leaving wolfSSL_read_internal(), return 0&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 2] &lt;LOG MESSAGE : wolfSSL Entering SSL_get_error&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:WolfLoggingCallback: WOLFSSL LIB :: [LOG LEVEL : 3] &lt;LOG MESSAGE : wolfSSL Leaving SSL_get_error, return -343&gt;<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:tls_wolfssl:_wolfssl_read: TLS connection to 12.246.74.190:19189 closed cleanly<br />Feb 19 02:42:04 prod-vm-150 /home/wsadmin/tlswsproxy-wolfssl/sbin/tlswsproxy[2389848]: INFO:core:tcp_trigger_report: Connection is getting release because of [EOF received]</p><br /><p>WolfSSL code snippet where we are getting error</p><p>&nbsp; &nbsp; while (ssl-&gt;buffers.clearOutputBuffer.length == 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ( (ssl-&gt;error = ProcessReply(ssl)) &lt; 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WOLFSSL_ERROR(ssl-&gt;error);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ssl-&gt;error == ZERO_RETURN) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WOLFSSL_MSG(&quot;Zero return, no more data coming&quot;);&nbsp; ----&gt; returning from here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0; /* no more data coming */<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ssl-&gt;error == SOCKET_ERROR_E) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ssl-&gt;options.connReset || ssl-&gt;options.isClosed) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WOLFSSL_MSG(&quot;Peer reset or closed, connection done&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ssl-&gt;error = SOCKET_PEER_CLOSED_E;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WOLFSSL_ERROR(ssl-&gt;error);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0; /* peer reset or closed */<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ssl-&gt;error;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (rkumar)]]></author>
			<pubDate>Sat, 19 Feb 2022 14:56:45 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6490.html#p6490</guid>
		</item>
	</channel>
</rss>
