<div dir="ltr">The problem is that symlinking doesn't work in this case. Sure, I can install openSSL, and then it works. For me. But I'm trying to distribute an application, and to do that on modern macs, I need a hardened run time. And the rule for that is that all code your application uses must be signed either by you or by apple. I can include both openSSL dylibs in my .app package, and sign all that, but the way libssl loads libcrypto seems to not meet those rules - which specifically exclude symlinking and which specifically prohibit loading libcrypto without specifying a specific version. As far as I can tell anyway, since I can't run the hardened app under the debugger. <div><br></div><div>But surely I'm not the first person to want to distribute an application with openSSL in a hardened run time? And there's lots of information and discussion of this issue out there on the web, but it's either misleading, or wrong, or advises you to downgrade to insecure past versions of openSSL, or just doesn't work, so far as I can tell</div><div><br></div><div>Grahame</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 20, 2021 at 5:28 AM Blumenthal, Uri - 0553 - MITLL <<a href="mailto:uri@ll.mit.edu">uri@ll.mit.edu</a>> 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">Here's how Macports did it:<br>
<br>
1. Installed OpenSSL-1.1.1 into /opt/local/libexec/openssl11;<br>
2. Installed OpenSSL-3.0.0 into /opt/local/libexec/openssl3;<br>
3. Symlinked OpenSSL-3.0.0 libraries into /opt/local/lib (primary directory where stuff lives);<br>
<br>
I added symlinking /opt/local/libexec/openssl11/lib/libcrypto.1.1.dylib into /opt/local/lib too.<br>
<br>
This allows compiling new apps against OpenSSL-1.1.1 in /opt/local/libexec/openssl11. Old binaries do not need to be recompiled, as they can find libcrypto.1.1.dylib and libssl.1.1.dylib in the "standard" location (/opt/local/lib).<br>
<br>
Hope this helps.<br>
--<br>
Regards,<br>
Uri<br>
<br>
There are two ways to design a system. One is to make is so simple there are obviously no deficiencies.<br>
The other is to make it so complex there are no obvious deficiencies.<br>
                                                                                                                                     -  C. A. R. Hoare<br>
<br>
<br>
On 11/19/21, 13:16, "openssl-users on behalf of Viktor Dukhovni" <<a href="mailto:openssl-users-bounces@openssl.org" target="_blank">openssl-users-bounces@openssl.org</a> on behalf of <a href="mailto:openssl-users@dukhovni.org" target="_blank">openssl-users@dukhovni.org</a>> wrote:<br>
<br>
    On Fri, Nov 19, 2021 at 05:36:24PM +1100, Grahame Grieve wrote:<br>
<br>
    > It's very definitely something active that OSX is doing. Here's an OSX<br>
    > error generated:<br>
    > <br>
    > System Integrity Protection: enabled<br>
    > <br>
    > Crashed Thread:        0  Dispatch queue: com.apple.main-thread<br>
    > <br>
    > Exception Type:        EXC_CRASH (SIGABRT)<br>
    > Exception Codes:       0x0000000000000000, 0x0000000000000000<br>
    > Exception Note:        EXC_CORPSE_NOTIFY<br>
    > <br>
    > Application Specific Information:<br>
    > abort() called<br>
    > Invalid dylib load. Clients should not load the unversioned libcrypto<br>
    > dylib as it does not have a stable ABI.<br>
<br>
    Well, I think that's evidence of confusion about which "libcrypto" to<br>
    load.  It sure seems that you're trying to load the default system<br>
    libcrypto, not the one in the application bundle.<br>
<br>
    You should probably arrange to "salt" the names of the libssl and<br>
    libcrypto libraries used by your application, so that there can't<br>
    be any confusion with the platform's libssl and libcrypto.<br>
<br>
    May also need to do something to avoid symbol name collisions, but I<br>
    haven't looked into how that works on Darwin, so can't offer specific<br>
    advice.<br>
<br>
    -- <br>
        Viktor.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">-----<br><a href="http://www.healthintersections.com.au" target="_blank">http://www.healthintersections.com.au</a> / <a href="mailto:grahame@healthintersections.com.au" target="_blank">grahame@healthintersections.com.au</a> / +61 411 867 065<div><font face="arial, sans-serif"><span style="color:rgb(34,34,34)">Benson & Grieve:  </span><font color="#222222"> Principles of Health Interoperability (Health Information Technology Standards), 4th ed</font></font><span style="color:rgb(34,34,34);font-family:Calibri,sans-serif;font-size:14.6667px"> </span><font face="arial, sans-serif"><span style="color:rgb(34,34,34)">-  </span><a href="http://www.springer.com/978-3-030-56882-5" style="color:rgb(17,85,204)" target="_blank">http://www.springer.com/978-3-030-56882-5</a></font></div></div></div>