<?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 — Custom Extension]]></title>
		<link>https://www.wolfssl.com/forums/topic2007-custom-extension.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2007.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Custom Extension.]]></description>
		<lastBuildDate>Thu, 18 May 2023 23:03:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7127.html#p7127</link>
			<description><![CDATA[<p>Hi, Can you be more specific?&nbsp; Which semaphore? </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Thu, 18 May 2023 23:03:59 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7127.html#p7127</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7125.html#p7125</link>
			<description><![CDATA[<p>After introducing more debug statements I found out that<br /></p><div class="codebox"><pre><code>TLSX_Write()</code></pre></div><p>skips my extension because some semaphore is being held.<br />I have no idea why this semaphore is switched on, however. I didn&#039;t switch it on myself.<br />It comes from<br /></p><div class="codebox"><pre><code>TLSX_WriteRequest()</code></pre></div><p>I really put hours into trying to fix this one single behaviour, because it&#039;s difficult to navigate the source code of wolfSSL without much documentation.</p>]]></description>
			<author><![CDATA[null@example.com (hasnoidea)]]></author>
			<pubDate>Fri, 12 May 2023 10:45:25 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7125.html#p7125</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7120.html#p7120</link>
			<description><![CDATA[<p>I see the 5 0 bytes at the end.&nbsp; When you use the debugger, does your code that writes in the header, length and content get executed? If not, you need to figure out why. </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Thu, 11 May 2023 15:41:05 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7120.html#p7120</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7117.html#p7117</link>
			<description><![CDATA[<p>Hello Anthony</p><p>I tried using the debugger and I don&#039;t see it being written to the extension data.<br />That&#039;s what I am confused about as I thought I&#039;d have written enough code for that to happen.<br />Unless wolfSSL does smth. unexpected somewhere.</p><p>I readded the file, apparently I had to&nbsp; press two buttons for the upload :-)</p>]]></description>
			<author><![CDATA[null@example.com (hasnoidea)]]></author>
			<pubDate>Thu, 11 May 2023 02:18:17 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7117.html#p7117</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7116.html#p7116</link>
			<description><![CDATA[<p>Hi, </p><p>I don&#039;t see your attachment.</p><p>You&#039;re probably going to need to run a debugger such as gdb to see if you are actually writing the extension as you expected. </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Wed, 10 May 2023 20:31:14 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7116.html#p7116</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7113.html#p7113</link>
			<description><![CDATA[<p>Hello Anthony</p><p>The decode error inside wolfSSL is a BUFFER_ERROR inside DoTls13SupportedVersions during the ClientHello check for extensions.<br /></p><div class="codebox"><pre><code>/* TLS 1.3 must have extensions */
if (i &lt; helloSz) {
    if (i + OPAQUE16_LEN &gt; helloSz)
        return BUFFER_ERROR;
    ato16(&amp;input[i], &amp;totalExtSz);
    i += OPAQUE16_LEN;
    if (totalExtSz != helloSz - i)    // failure here
        return BUFFER_ERROR;
...</code></pre></div><p>I have appended a wireshark capture of a tried connection.<br />The extension length field is correct<br />The overall handshake length field is off by 5 zeroed bytes at the very end of the handshake which correspond exactly to my custom extension:<br />- 2 bytes extension type<br />- 2 bytes extension length<br />- 1 byte extension data</p><p>Thank you for trying to help me!</p>]]></description>
			<author><![CDATA[null@example.com (hasnoidea)]]></author>
			<pubDate>Wed, 10 May 2023 08:45:02 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7113.html#p7113</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7109.html#p7109</link>
			<description><![CDATA[<p>Hi,</p><p>I&#039;ve had a quick scan of your changes. nothing really jumps out as being wrong. Perhaps it would be a good idea to get wireshark to see and make sure you know the root cause. </p><p>Can you please let me know what wireshark shows you? </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Tue, 09 May 2023 17:57:42 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7109.html#p7109</guid>
		</item>
		<item>
			<title><![CDATA[Custom Extension]]></title>
			<link>https://www.wolfssl.com/forums/post7106.html#p7106</link>
			<description><![CDATA[<p>Hello everyone</p><p>For my Master thesis I am playing around with an implementation of Remote Attestation into TLS using wolfSSL.<br />I&#039;ve created necessary functions and implemented reading and writing the extension data from/to in-/outcoming messages.</p><p>I am using a small playground to test this communication between a client and a server.<br />However, whatever I do, the extension data is somehow not being written into the ClientHello message correctly, whereas the total extension size counter gets increased.<br />This of course results in a decode error on the server side.</p><p>I added log statements and it seems that writing the extension data inside the switch branch of the new extension never gets executed, as if the extension wasn&#039;t there.<br />Maybe I miss something obvious? I&#039;d be very glad if someone can look over my changes.<br />I already put weeks of try-and-error into it, following and debugging the code flow and it just doesn&#039;t make sense to me.</p><p>My (dummy implementation) changes can be found here: <a href="https://github.com/joeftiger/wolfssl/tree/RA">https://github.com/joeftiger/wolfssl/tree/RA</a><br />And my playground implementation is here: <a href="https://github.com/joeftiger/wolfssl-playground/tree/RA">https://github.com/joeftiger/wolfssl-playground/tree/RA</a></p><p>I tried to keep this implementation example minimal by using only 1 byte as extension data.</p><p>Thank you very much for your help!</p>]]></description>
			<author><![CDATA[null@example.com (hasnoidea)]]></author>
			<pubDate>Tue, 09 May 2023 06:40:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7106.html#p7106</guid>
		</item>
	</channel>
</rss>
