<div dir="ltr">Hello,<div><br></div><div>I usually use strace for this purpose.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 27, 2017 at 12:53 AM, Blumenthal, Uri - 0553 - MITLL <span dir="ltr"><<a href="mailto:uri@ll.mit.edu" target="_blank">uri@ll.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_4502297408022396168WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt">I’m debugging programmatic access to a (modified) pkcs11 engine. My system has several OpenSSL installations: Apple-provided OpenSSL-0.9.8 (kept as that came with the OS :), Macports-installed OpenSSL-1.0.2l (the main one installed to /opt/local, used by everything Macports builds, and what I use mostly for my software), and a couple of OpenSSL-1.1.x installations mostly used for debugging.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Libp11 is installed in /opt/local/lib/engines, and that version is built for/compatible with OpenSSL-1.0.2.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">There’s an installation of OpenSSL-1.1.0-stable in ~/openssl-1.1. libp11 built for 1.1 is installed in ~/openssl-1.1/lib/engines-1.1 directory. So far so good.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">The problem I’m having now is – my application appears to be getting the wrong pkcs11 engine (the one for 1.0.2), based on the error message I get on decrypting, which is indicative of the unmodified libp11 version (not the one I’m working with for 1.1).<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Question: how do I ensure/verify that the right pkcs11 library is loaded?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Tail of openssl.cnf:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">[pkcs11_section]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">   engine_id = pkcs11<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">   dynamic_path = /Users/ur20980/openssl-1.1/<wbr>lib/engines-1.1/pkcs11.dylib<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">   MODULE_PATH = /usr/local/lib/yubihsm_pkcs11.<wbr>dylib<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">   init = 0<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Thanks!<u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">--<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">Regards,<u></u><u></u></span></p></div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">Uri Blumenthal</span><u></u><u></u></p></div></div>
<br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">SY, Dmitry Belyavsky</div>
</div>