<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=35&amp;t=2731" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2017-09-29T19:28:47+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=35&amp;t=2731</id>
<entry>
<author><name><![CDATA[capodaster]]></name></author>
<updated>2017-09-29T19:28:47+01:00</updated>
<published>2017-09-29T19:28:47+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2731&amp;p=9792#p9792</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2731&amp;p=9792#p9792"/>
<title type="html"><![CDATA[YubiKey 4C on macOs with openssl]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2731&amp;p=9792#p9792"><![CDATA[
Hello,<br /><br />I recently got my YubiKey 4C and want to use it on macOS Sierra 10.12.6. What I am trying to achieve is setting up openssl to use pkcs11 as an engine. I used brew to install openssl and not to mess up my system openssl installation. Running <div class="codetitle"><b>Code:</b></div><div class="codecontent">&gt;./openssl version <br />OpenSSL 1.0.2l  25 May 2017</div> from the installation /bin directory returns a newer version. <br />I followed <a href="https://dennis.silvrback.com/openssl-ca-with-yubikey-neo" class="postlink">https://dennis.silvrback.com/openssl-ca-with-yubikey-neo</a> instructions to configure the pkcs11 engine for openssl.<br /><br />To my /etc/ssl/openssl.cnf file I added:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">openssl_conf = openssl_def<br />...<br />&#91;openssl_def&#93;<br />engines = engine_section<br /><br />&#91;engine_section&#93;<br />pkcs11 = pkcs11_section<br /><br />&#91;pkcs11_section&#93;<br />engine_id = pkcs11<br />dynamic_path = /usr/local/Cellar/engine_pkcs11/0.1.8/lib/engines/engine_pkcs11.so<br />MODULE_PATH = /usr/local/Cellar/opensc/0.17.0/lib/opensc-pkcs11.so<br />init = 0<br /></div><br /><br />Now when I start openssl shell I get:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">OpenSSL&gt;engine pkcs11 -t<br />140736418550792:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/local/Cellar/openssl/1.0.2l/lib/engines/libpkcs11.dylib): dlopen(/usr/local/Cellar/openssl/1.0.2l/lib/engines/libpkcs11.dylib, 2): image not found<br />140736418550792:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:233:<br />140736418550792:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:467:<br />140736418550792:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:390:id=pkcs11<br /></div><br /><br />Entering the dynamic engine command yields:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">OpenSSL&gt; engine dynamic -pre SO_PATH:/usr/local/Cellar/engine_pkcs11/0.1.8/lib/engines/engine_pkcs11.so -pre ID:pkcs11 -pre LIST_ADD:1 -pre LOAD -pre MODULE_PATH:/usr/local/Cellar/opensc/0.17.0/lib/opensc-pkcs11.so<br />(dynamic) Dynamic engine loading support<br />&#91;Success&#93;: SO_PATH:/usr/local/Cellar/engine_pkcs11/0.1.8/lib/engines/engine_pkcs11.so<br />&#91;Success&#93;: ID:pkcs11<br />&#91;Success&#93;: LIST_ADD:1<br />&#91;Success&#93;: LOAD<br />&#91;Success&#93;: MODULE_PATH:/usr/local/Cellar/opensc/0.17.0/lib/opensc-pkcs11.so<br />Loaded: (pkcs11) pkcs11 engine<br /></div><br /><br />The paths should also be valid:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">$ ls /usr/local/Cellar/engine_pkcs11/0.1.8/lib/engines/engine_pkcs11.so<br />/usr/local/Cellar/engine_pkcs11/0.1.8/lib/engines/engine_pkcs11.so<br />$ ls /usr/local/Cellar/opensc/0.17.0/lib/opensc-pkcs11.so<br />/usr/local/Cellar/opensc/0.17.0/lib/opensc-pkcs11.so<br /></div><br /><br />Can you please point out what I did wrong?<br /><br />My overall goal is setting up my own root CA like <a href="https://jamielinux.com/docs/openssl-certificate-authority/create-the-root-pair.html" class="postlink">https://jamielinux.com/docs/openssl-certificate-authority/create-the-root-pair.html</a> describes. The only difference should be that the private key should be stored and generated on the YubiKey4C. <br /><br />Thank you very much for you help and effort.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4914">capodaster</a> — Fri Sep 29, 2017 7:28 pm</p><hr />
]]></content>
</entry>
</feed>