Closed safayetahmedatge closed 5 years ago
But @libdir@ is replaced arroding to the distro. For Ubuntu @libdir@=/usr/lib/x86_64-linux-gnu/ and for alpine it should then be @libdir@=/usr/lib/. So my question is, whether you've run into issue installing the engine on Ubuntu or alpine.
Bug #16 recommends using engine-dir from pkg-config, which we'll add. We can also add a parameter --with-enginedir to ./configure. Is that what you'd request here ?
But question is, whether there are actual problems at the momnt.
I run into the issue on Alpine. When I try to use the engine with "openssl engine -t tpm2tss", I get the error that the corresponding shared library is not found. When I explicitly load the engine, I no longer get that error.
I assumed that for Ubuntu, @libdir@=/usr/lib, not /usr/lib/x86_64-linux-gnu/. My assumption could be incorrect.
My original thinking was to add a parameter "--with-enginedir" as you suggested. However, the recommendation in https://github.com/tpm2-software/tpm2-tss-engine/issues/16 looks more appropriate. I have the same question as you about the "correct" way to do this. I need to do a little bit more research on how other projects do this.
Thank you, @AndreasFuchsSIT for your response.
Ok, I got it. Alping expects @libdir@/engines and Ubuntu expects @libdir@/openssl-1.0.0/engines Weird...
So yes, I'll to #16 but also add --with-enginedir as well.
fixed via #23
The tpm2tss engine is installed at a fixed location, "@libdir@/openssl/engines".
https://github.com/tpm2-software/tpm2-tss-engine/blob/948a4db37767d1ece62f97c1aabae845697758a3/Makefile.am#L54
The actual engine directory is dependent on the openssl installation. In an Ubuntu 16.04 platform, it's "/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/". In an alpine environment, it's "/usr/lib/engines/". This directory should be configurable.