<?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_KeyPemToDer() fails for public key]]></title>
		<link>https://www.wolfssl.com/forums/topic620-cyasslkeypemtoder-fails-for-public-key.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic620.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in CyaSSL_KeyPemToDer() fails for public key.]]></description>
		<lastBuildDate>Thu, 12 Feb 2015 03:25:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: CyaSSL_KeyPemToDer() fails for public key]]></title>
			<link>https://www.wolfssl.com/forums/post1927.html#p1927</link>
			<description><![CDATA[<p>The target is a STM32F417 with gcc arm-elf cross compiler. No configure script; options are set using settings.h</p><p>I&#039;m not certain why the more portable bigint library did not work for me. I am confident that there are no stack or heap issues. I noticed that many of the other embedded targets (ie. PIC32) define USE_FAST_MATH and TFM_TIMING_RESISTANT and when including these implementations RsaSSL_Verify() is working correctly when loading the public key from a DER file.</p><p>Still CyaSSL_KeyPemToDer() fails because there is no attempt to match the PEM public key header &quot;-----BEGIN PUBLIC KEY-----&quot; etc. I didn&#039;t look into it further than this, but if I revisit this software and implement reading a public key from PEM format I will send a pull request.</p>]]></description>
			<author><![CDATA[null@example.com (mattande)]]></author>
			<pubDate>Thu, 12 Feb 2015 03:25:56 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1927.html#p1927</guid>
		</item>
		<item>
			<title><![CDATA[Re: CyaSSL_KeyPemToDer() fails for public key]]></title>
			<link>https://www.wolfssl.com/forums/post1921.html#p1921</link>
			<description><![CDATA[<p>Which platform are you running on? Are you using the configure script to set up the build, or is it through an IDE of some kind?</p>]]></description>
			<author><![CDATA[null@example.com (john)]]></author>
			<pubDate>Mon, 09 Feb 2015 17:21:27 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1921.html#p1921</guid>
		</item>
		<item>
			<title><![CDATA[Re: CyaSSL_KeyPemToDer() fails for public key]]></title>
			<link>https://www.wolfssl.com/forums/post1919.html#p1919</link>
			<description><![CDATA[<p>To update, I&#039;ve resolved the problem of RsaSSL_Verify() returning error codes by adding USE_FAST_MATH and TFM_TIMING_RESISTANT to my build preprocessor definitions.</p>]]></description>
			<author><![CDATA[null@example.com (mattande)]]></author>
			<pubDate>Sat, 07 Feb 2015 01:58:46 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1919.html#p1919</guid>
		</item>
		<item>
			<title><![CDATA[CyaSSL_KeyPemToDer() fails for public key]]></title>
			<link>https://www.wolfssl.com/forums/post1917.html#p1917</link>
			<description><![CDATA[<p>It appears that parsing of public keys in PEM format is not supported.</p><p>My goal is to have a user supply a public key in PEM format which is then used for verification of signed firmware update files.</p><p>I have also tried exporting the public key to DER format and loading with RsaPublicKeyDecode() but RsaSSL_Verify() is failing with RSA_PAD_E (-201). I&#039;ve added the preprocessor define RSA_DECODE_EXTRA to enable parsing the public key from the DER. The key and signature is 2048 bits in length. </p><p>The signature is being generated with openssl:<br />openssl dgst -sha1 -out build/firmware.bin.sign -sign private.pem firmware.bin</p>]]></description>
			<author><![CDATA[null@example.com (mattande)]]></author>
			<pubDate>Fri, 06 Feb 2015 22:35:57 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1917.html#p1917</guid>
		</item>
	</channel>
</rss>
