<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 20 Nov 2019 at 21:29, Ryan Harkin &lt;<a href="mailto:ryan.harkin@linaro.org">ryan.harkin@linaro.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 20 Nov 2019 at 19:09, Mark Hatle &lt;<a href="mailto:mark.hatle@kernel.crashing.org" target="_blank">mark.hatle@kernel.crashing.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 11/20/19 1:06 PM, Ryan Harkin wrote:<br>
&gt; <br>
&gt; <br>
&gt; On Wed, 20 Nov 2019 at 18:36, Mark Hatle &lt;<a href="mailto:mark.hatle@kernel.crashing.org" target="_blank">mark.hatle@kernel.crashing.org</a><br>
&gt; &lt;mailto:<a href="mailto:mark.hatle@kernel.crashing.org" target="_blank">mark.hatle@kernel.crashing.org</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt;     On 11/20/19 12:18 PM, Ryan Harkin wrote:<br>
&gt;     &gt; Hi all,<br>
&gt;     &gt;<br>
&gt;     &gt; I&#39;m struggling with backporting OpenSSL to my Sumo build [1], so wondered if<br>
&gt;     &gt; anyone else had done something similar with success.<br>
&gt;     &gt;<br>
&gt;     &gt; I copied &quot;meta/recipes-connectivity/openssl&quot; from Poky master branch [2]<br>
&gt;     into my<br>
&gt;     &gt; own layer [3]. It didn&#39;t pick up, so I discovered I needed to add<br>
&gt;     &gt; a PREFERRED_VERSION, eg:<br>
&gt;     &gt;<br>
&gt;     &gt; +PREFERRED_VERSION_openssl ?= &quot;1.1.%&quot;<br>
&gt;     &gt; +PREFERRED_VERSION_openssl-native ?= &quot;1.1.%&quot;<br>
&gt;     &gt; +PREFERRED_VERSION_nativesdk-openssl ?= &quot;1.1.%&quot;<br>
&gt;     &gt;<br>
&gt;     &gt; Now it builds fine. However, I no longer have /usr/bin/openssl in my disk<br>
&gt;     image.<br>
&gt;     &gt;<br>
&gt;     &gt; It doesn&#39;t appear in FILES_${PN}, and adding it to the recipes doesn&#39;t seem to<br>
&gt;     &gt; make any difference.<br>
&gt;     &gt;<br>
&gt;     &gt; What am I missing?<br>
&gt;     &gt;<br>
&gt;     &gt; Thanks,<br>
&gt;     &gt; Ryan.<br>
&gt;     &gt;<br>
&gt;     &gt; [1] I&#39;m looking for CVE fixes, 1.0.2p has a lot of CVEs.<br>
&gt; <br>
&gt;     You know that 1.0.2 and 1.1 APIs are not compatible?  So you will need to update<br>
&gt;     everything that needs OpenSSL to understand the new API.<br>
&gt; <br>
&gt; <br>
&gt; So far, we&#39;re only using it in a shell script to sign an image and later verify<br>
&gt; the image, so I&#39;ve assumed, perhaps naively, that the API changes won&#39;t matter...<br>
<br>
Correct, but there may be other components of the system that could be using the<br>
API that you are unaware of.  On a system as old as Sumo, you will need to take<br>
precautions to ensure that ONLY the 1.1x version is being used.  (There may be<br>
an openssl10 for compatibility that will need to be blacklisted.)<br></blockquote><div><br></div><div>Good point. I&#39;ll check on it once I get it to work.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; <br>
&gt;     For CVE fixes, typically you would patch 1.0.2p, or update to the latest<br>
&gt;     (1.0.2t) as you go.  (If you have an OSV, this should be part of the services<br>
&gt;     that they offer you.) <br>
&gt; <br>
&gt; <br>
&gt;     In my opinion, 1.0.2 will be around for at least another 4-5 years due to the<br>
&gt;     number of people actively using it in the world.  Until 1.1/3.0 (won&#39;t be a 2.0<br>
&gt;     from what I read) exists and has a FIPS-140-2 support available -- people will<br>
&gt;     continue to use 1.0.2 and maintain it as necessary for security.<br>
&gt; <br>
&gt;     As an FYI:  <a href="http://git.yoctoproject.org/cgit/cgit.cgi/meta-openssl102/" rel="noreferrer" target="_blank">http://git.yoctoproject.org/cgit/cgit.cgi/meta-openssl102/</a><br>
&gt; <br>
&gt;     This version is for thud, warrior, zeus and master.  It is intended to be<br>
&gt;     maintained until either 1.0.2 is no longer maintainable -- or the FIPS-140-2<br>
&gt;     needs have been met by OpenSSL.<br>
&gt; <br>
&gt; <br>
&gt; Great, that looks like a better option anyway, assuming it has the latest fixes<br>
&gt; I need, and doesn&#39;t give me the same build problem.  Thanks for pointing it out.<br>
&gt; I&#39;ll give it a go.<br>
<br>
It&#39;s better to work with the Sumo version for your needs.  I just posted that as<br>
an example of openssl 1.0.2 being needed still by others, even as oe-core/Yocto<br>
Project have changed their defaults.<br></blockquote><div><br></div>I pulled the whole openssl dir from your repo, added the layer.conf changes to my layer.conf and rebuilt openssl and my image.<br><br>Unfortunately, I still have no /usr/bin/openssl in my disk image. So I&#39;ve added the RPROVIDES from Andre&#39;s in a vain attempt to get it to work:<br><br>RPROVIDES_${PN} += &quot;openssl-bin&quot;</div><div class="gmail_quote"><br>... although I&#39;m not hopeful it&#39;ll do the trick...</div></div></blockquote><div><br></div><div>It didn&#39;t work. Once thing that&#39;s puzzling me: where is the package &quot;openssl-bin&quot;? I can only find references to it, but no package.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><br><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
--Mark<br>
<br>
&gt; Thanks,<br>
&gt; Ryan.<br>
&gt;  <br>
&gt; <br>
&gt; <br>
&gt;     --Mark<br>
&gt; <br>
&gt;     &gt; [2] <a href="http://git.yoctoproject.org/git/poky" rel="noreferrer" target="_blank">http://git.yoctoproject.org/git/poky</a><br>
&gt;     &gt; I&#39;m at SHA a616ffebdc, so I copied <a href="http://openssl_1.1.1d.bb" rel="noreferrer" target="_blank">openssl_1.1.1d.bb</a><br>
&gt;     &lt;<a href="http://openssl_1.1.1d.bb" rel="noreferrer" target="_blank">http://openssl_1.1.1d.bb</a>&gt; &lt;<a href="http://openssl_1.1.1d.bb" rel="noreferrer" target="_blank">http://openssl_1.1.1d.bb</a>&gt;<br>
&gt;     &gt; and all the other files in the directory.<br>
&gt;     &gt;<br>
&gt;     &gt; [3] I have a clone of Linaro&#39;s meta-backports. I&#39;m trying to generate a<br>
&gt;     patch to<br>
&gt;     &gt; submit for review there.<br>
&gt;     &gt; <a href="https://git.linaro.org/openembedded/meta-backports.git" rel="noreferrer" target="_blank">https://git.linaro.org/openembedded/meta-backports.git</a><br>
&gt;     &gt;<br>
&gt; <br>
</blockquote></div></div>
</blockquote></div></div>