<?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 — Initialization of Ticket Buffer before using wolfSSL_get_SessionTicket]]></title>
		<link>https://www.wolfssl.com/forums/topic710-initialization-of-ticket-buffer-before-using-wolfsslgetsessionticket.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic710.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Initialization of Ticket Buffer before using wolfSSL_get_SessionTicket.]]></description>
		<lastBuildDate>Wed, 09 Sep 2015 15:14:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Initialization of Ticket Buffer before using wolfSSL_get_SessionTicket]]></title>
			<link>https://www.wolfssl.com/forums/post2191.html#p2191</link>
			<description><![CDATA[<p>Hi cfarrin,</p><p>If looking to get the clients session ID the function wolfSSL_get_sessionID(WOLFSSL_SESSION* session) could be used. As a note the session ID returned is always going to be 32 bytes long. And is going to be the session id that the server created to send over to the client.<br />If looking to do resumption using a clients ID an example of this can be found in examples/server/server.c . If invoked with -r a resumption connection is created. </p><p>Regards,<br />Jacob</p>]]></description>
			<author><![CDATA[null@example.com (Jacob)]]></author>
			<pubDate>Wed, 09 Sep 2015 15:14:14 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2191.html#p2191</guid>
		</item>
		<item>
			<title><![CDATA[Initialization of Ticket Buffer before using wolfSSL_get_SessionTicket]]></title>
			<link>https://www.wolfssl.com/forums/post2187.html#p2187</link>
			<description><![CDATA[<p>Hi,</p><p>I was trying to use on the server the function wolfSSL_get_SessionTicket to get the Client&#039;s Session ID.&nbsp; After some debugging to determine why I was getting a&nbsp; Bad function argument.&nbsp; After this I looked at the ssl.c code and I noticed the problem:</p><p>WOLFSSL_API int wolfSSL_get_SessionTicket(WOLFSSL* ssl, byte* buf, word32* bufSz)<br />{<br />&nbsp; &nbsp; if (ssl == NULL || buf == NULL || bufSz == NULL || *bufSz == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; return BAD_FUNC_ARG;</p><p>&nbsp; &nbsp; if (ssl-&gt;session.ticketLen &lt;= *bufSz) {<br />&nbsp; &nbsp; &nbsp; &nbsp; XMEMCPY(buf, ssl-&gt;session.ticket, ssl-&gt;session.ticketLen);<br />&nbsp; &nbsp; &nbsp; &nbsp; *bufSz = ssl-&gt;session.ticketLen;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; *bufSz = 0;</p><p>&nbsp; &nbsp; return SSL_SUCCESS;<br />}</p><p>This requires the Buffer not to be NULL and the size variable to be equal to the size of the buffer.&nbsp; This makes little sense unless there is a initialization function for the Ticket buffer.&nbsp; Suggest that the if Statement is changed to: <br />if ( ssl==NULL || *bufSz &lt; ID_LEN)</p><p>cfarrin</p>]]></description>
			<author><![CDATA[null@example.com (cfarrin)]]></author>
			<pubDate>Fri, 04 Sep 2015 20:45:16 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2187.html#p2187</guid>
		</item>
	</channel>
</rss>
