<?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 — CYASSL_CALLBACKS, more info needed]]></title>
		<link>https://www.wolfssl.com/forums/topic92-cyasslcallbacks-more-info-needed.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic92.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in CYASSL_CALLBACKS, more info needed.]]></description>
		<lastBuildDate>Fri, 01 Apr 2011 00:13:37 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post200.html#p200</link>
			<description><![CDATA[<p>aaaww, found it in examples. I screwed up on my grep skillz and thought it wasn&#039;t found.</p>]]></description>
			<author><![CDATA[null@example.com (j3g)]]></author>
			<pubDate>Fri, 01 Apr 2011 00:13:37 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post200.html#p200</guid>
		</item>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post199.html#p199</link>
			<description><![CDATA[<p>SSL_connect() will return success (done) or failure (fatal_error), that&#039;s just the way the API was designed.&nbsp; To see the actual error, call SSL_get_error().&nbsp; In this case WANT_READ will be converted to SSL_ERROR_WANT_READ for OpenSSL compatibility.&nbsp; See man SSL_connect for more details (or look online if the SSL man pages aren&#039;t installed on your system).</p><p>NON_BLOCKING is a define used by the examples.&nbsp; wolfSSL proper doesn&#039;t &quot;know&quot; blocking or non-blocking, it&#039;s neutral by design.</p>]]></description>
			<author><![CDATA[null@example.com (todd)]]></author>
			<pubDate>Thu, 31 Mar 2011 21:25:09 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post199.html#p199</guid>
		</item>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post198.html#p198</link>
			<description><![CDATA[<p>ok, I see that too. But then SSL_connect() is returning a &quot;SSL_FATAL_ERROR&quot;. I don&#039;t know if I consider a WANT_READ as a SSL_FATAL_ERROR. How do you recommend I distinguish from an error and a WANT_READ? Look at ssl-&gt;error upon return?</p><div class="quotebox"><blockquote><p>You can test this by defining NON_BLOCKING for the examples.</p></blockquote></div><p>&quot;NON_BLOCKING&quot; is what I should define as a compiler flag? I don&#039;t see any of those in the code.</p>]]></description>
			<author><![CDATA[null@example.com (j3g)]]></author>
			<pubDate>Thu, 31 Mar 2011 20:35:21 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post198.html#p198</guid>
		</item>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post197.html#p197</link>
			<description><![CDATA[<p>SSL_connect() works in blocking and non-blocking mode.&nbsp; The while loop is there because some steps require reading multiple blocks.&nbsp; If the underlying I/O is non-blocking and no I/O is ready then ProcessReply() will return the error WANT_READ which causes an immediate return from the function. You can test this by defining NON_BLOCKING for the examples.</p>]]></description>
			<author><![CDATA[null@example.com (todd)]]></author>
			<pubDate>Thu, 31 Mar 2011 20:12:21 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post197.html#p197</guid>
		</item>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post196.html#p196</link>
			<description><![CDATA[<p>I understand your recommendation. SSL_connect() appears to only work with a blocking network model.</p><p>Loking in the source code at the SSL_connect(), I see all the case statements and a while loop to block for a response...but there are no &quot;breaks;&quot; to jump out of the switch statement and then out of the function.</p><p>Please enlighten me.</p>]]></description>
			<author><![CDATA[null@example.com (j3g)]]></author>
			<pubDate>Thu, 31 Mar 2011 19:47:29 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post196.html#p196</guid>
		</item>
		<item>
			<title><![CDATA[Re: CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post195.html#p195</link>
			<description><![CDATA[<p>The handshake callback is intended for embedded SSL systems for debugging support.&nbsp; That is, when a good debugger isn&#039;t available and sniffing is impractical.&nbsp; It basically allows a trace of the handshake and won&#039;t be helpful for network i/o.</p><p>You&#039;ll want to use wolfSSL&#039;s user I/O callbacks found in cyassl_io.c.&nbsp; By default, wolfSSL uses EmbedReceive() to get data and EmbedSend() to send data.&nbsp; But you can write any I/O functions you want and then register them with CyaSSL_SetIORecv() and CyaSSL_SetIOSend().&nbsp; You can also set a context for each SSL session with CyaSSL_SetIOReadCtx() and CyaSSL_SetIOWriteCtx().&nbsp; The void* ctx could point to a structure that has information about where the next read or write buffer is, the size, and anything else you may need to track.</p><p>Try to follow the the error handling strategy of the default send/recv functions for maximum compatibility.&nbsp; That is, if wolfSSL calls your Recv function and no data is ready and you don&#039;t want to block, just return IO_ERR_WANT_READ.&nbsp; Then when you&#039;re notified by your network callback that I/O is ready just call the wolfSSL function again that didn&#039;t have data ready, like SSL_read() or SSL_connect() and it will pick up where it left off.</p>]]></description>
			<author><![CDATA[null@example.com (todd)]]></author>
			<pubDate>Thu, 31 Mar 2011 16:02:19 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post195.html#p195</guid>
		</item>
		<item>
			<title><![CDATA[CYASSL_CALLBACKS, more info needed]]></title>
			<link>https://www.wolfssl.com/forums/post194.html#p194</link>
			<description><![CDATA[<p>There are few paragraphs about the handshake callback. I have been digging in the code and docs but not sure how to use this feature. I have a network stack that runs on a callback. I also can&#039;t do any blocking while waiting for network data. How should I integrate with wolfSSL? Please advise Todd!&nbsp; <img src="https://www.wolfssl.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (j3g)]]></author>
			<pubDate>Wed, 30 Mar 2011 22:29:54 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post194.html#p194</guid>
		</item>
	</channel>
</rss>
