MicrochipTech/cryptoauthlib

How to Build Library for OpenSSL Engine Support

Closed this issue · 1 comments

Is there a newer guide on how to add support to the library for using the ATECC as an engine?
I am trying to use ATECC with OpenSSL, and also noticed there is a repository called cryptoauth-openssl-engine. What is the purpose of that repo?

I have defined ATCA_OPENSSL=ON when I build the libcryptoauth library. I then tried to load that using the openssl engine commands, and I get some errors. Does this repo contain the entire source code for use in the openssl engine?

Here are the errors that I get when I try to load the library:

OpenSSL> engine dynamic -pre /usr/lib/libcryptoauth.so -pre LIST_ADD:1 -pre ID:ateccx08
(dynamic) Dynamic engine loading support
[Failure]: /usr/lib/libcryptoauth.so
3070038032:error:2506406A:DSO support routines:dlfcn_bind_func:could not bind to the requested symbol name:../openssl-1.1.1q/crypto/dso/dso_dlfcn.c:188:symname(bind_engine): /usr/lib/libcryptoauth.so: undefined symbol: bind_engine
3070038032:error:2506C06A:DSO support routines:DSO_bind_func:could not bind to the requested symbol name:../openssl-1.1.1q/crypto/dso/dso_lib.c:186:
3070038032:error:260B6068:engine routines:dynamic_load:DSO failure:../openssl-1.1.1q/crypto/engine/eng_dyn.c:447:
3070038032:error:260BC066:engine routines:int_engine_configure:engine configuration error:../openssl-1.1.1q/crypto/engine/eng_cnf.c:140:section=ateccx08_config, name=dynamic_path, value=/usr/lib/libcryptoauth.so
3070038032:error:0E07606D:configuration file routines:module_run:module initialization error:../openssl-1.1.1q/crypto/conf/conf_mod.c:177:module=engines, value=engine_section, retcode=-1      
3070038032:error:260AC089:engine routines:int_ctrl_helper:invalid cmd name:../openssl-1.1.1q/crypto/engine/eng_ctrl.c:87:
3070038032:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:../openssl-1.1.1q/crypto/engine/eng_ctrl.c:255:
[Success]: LIST_ADD:1
[Success]: ID:ateccx08

What are the steps I need to get it working?

The project you reference has the following as it's description:

DEPRECATED: Use https://github.com/MicrochipTech/cryptoauthlib/wiki/PKCS11-Linux-Setup

Which explains how to set up this library for use with OpenSSL.