<?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 — Cross Compiling wolfSSL Embedded SSL for uCLinux]]></title>
		<link>https://www.wolfssl.com/forums/topic14-cross-compiling-wolfssl-embedded-ssl-for-uclinux.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic14.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Cross Compiling wolfSSL Embedded SSL for uCLinux.]]></description>
		<lastBuildDate>Tue, 09 Nov 2010 05:35:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Cross Compiling wolfSSL Embedded SSL for uCLinux]]></title>
			<link>https://www.wolfssl.com/forums/post15.html#p15</link>
			<description><![CDATA[<p>1.<br />&nbsp; &nbsp; &nbsp; ngustavson</p><p>&nbsp; &nbsp; &nbsp; [Avatar]<br />&nbsp; &nbsp; &nbsp; 2006-09-26 14:42:41 MDT<br />&nbsp; &nbsp; &nbsp; I&#039;m cross-compiling yassl for a uClinux system.<br />&nbsp; &nbsp; &nbsp; I built wput against it&#039;s static library and brought it in.</p><p>&nbsp; &nbsp; &nbsp; I can&#039;t get it to establish a connection yet.<br />&nbsp; &nbsp; &nbsp; By adding some debug statements I found out that the key exchange was failing in<br />&nbsp; &nbsp; &nbsp; cyassl_inc.c at:</p><p>&nbsp; &nbsp; &nbsp; SendClientKeyExchange(SSL* ssl)</p><p>&nbsp; &nbsp; &nbsp; in:</p><p>&nbsp; &nbsp; &nbsp; ret = RsaPublicEncrypt(ssl-&gt;preMasterSecret, SECRET_LEN, encSecret,<br />&nbsp; &nbsp; &nbsp; sizeof(encSecret), &amp;key, &amp;ssl-&gt;rng);</p><p>&nbsp; &nbsp; &nbsp; This happened because<br />&nbsp; &nbsp; &nbsp; key-&gt;n was larger than sizeof(encSecret)</p><p>&nbsp; &nbsp; &nbsp; specifically<br />&nbsp; &nbsp; &nbsp; key-&gt;n - 128<br />&nbsp; &nbsp; &nbsp; sizof(encSecret) - 96</p><p>&nbsp; &nbsp; &nbsp; As these numbers just so happen to be the byte length of the common 1024 and 768 bit keys respectively, I figured that wolfssl was probably just not providing enough memory for keys &gt; 768 bits.</p><p>&nbsp; &nbsp; &nbsp; Hacking things around, I changed SECRET_LEN to 64 to bump it up to 1024 bits.<br />&nbsp; &nbsp; &nbsp; This allowed the key exchange to pass but causes a mac error, so I&#039;m figuring there&#039;s another number or table in there that needs to change alongside of SECRET_LEN.</p><p>&nbsp; &nbsp; &nbsp; Am I on the right track?<br />&nbsp; &nbsp; &nbsp; Is there an established way to add support for larger keys?<br />&nbsp; &nbsp; &nbsp; Am I completely off?</p><p>&nbsp; &nbsp; &nbsp; thx,<br />&nbsp; &nbsp; &nbsp; NZG</p><br /><br /><br /><br /><br /><br /><br /><br /><br /><p>&nbsp; &nbsp;2.<br />&nbsp; &nbsp; &nbsp; touskaProject Admin</p><p>&nbsp; &nbsp; &nbsp; [Avatar]<br />&nbsp; &nbsp; &nbsp; 2006-09-26 15:26:09 MDT<br />&nbsp; &nbsp; &nbsp; SECRET_LEN needs to stay at 48, per the standard. The bug is the length of encSecret, it shouldn&#039;t depend on SECRET_LEN. I just increased it to 256 to handle up to 2048 bit RSA. Thanks for the report.<br />&nbsp; &nbsp;3.<br />&nbsp; &nbsp; &nbsp; ngustavson</p><p>&nbsp; &nbsp; &nbsp; [Avatar]<br />&nbsp; &nbsp; &nbsp; 2006-09-26 17:00:21 MDT<br />&nbsp; &nbsp; &nbsp; Thank you sir.<br />&nbsp; &nbsp; &nbsp; That little tip got my app working.<br />&nbsp; &nbsp; &nbsp; More testing is required but it certainly makes for a better nights sleep.<br />&nbsp; &nbsp; &nbsp; :-)</p><p>&nbsp; &nbsp; &nbsp; thx,<br />&nbsp; &nbsp; &nbsp; NZG</p>]]></description>
			<author><![CDATA[null@example.com (larry)]]></author>
			<pubDate>Tue, 09 Nov 2010 05:35:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post15.html#p15</guid>
		</item>
	</channel>
</rss>
