tpm2-software / tpm2-tss-engine

OpenSSL Engine for TPM2 devices
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
151 stars 100 forks source link

How to build tpm2-tss and tpm2-tss-engine for a different version openssl? #159

Closed danielwangksu closed 4 years ago

danielwangksu commented 4 years ago

I'm using ubuntu 16 which has openssl 1.0.2g installed. I was able to build tpm2-tss and tpm2-tss-engine that works with that version of openssl engine. However, I'm testing openssl1.1.1 which is not compatible with the current tpm2tss libraries. Is there a way to specify the path of openssl in the process of configuration and compilation? Thank you very much!

AndreasFuchsTPM commented 4 years ago

We are testing openssl 1.1.1 in our ci. See https://github.com/tpm2-software/tpm2-tss-engine/blob/master/.travis.yml#L12

AndreasFuchsTPM commented 4 years ago

As for the paths, we are using what openssl tells us to use: https://github.com/tpm2-software/tpm2-tss-engine/blob/master/configure.ac#L115-L116

You can override this with ./configure --with-enginesdir though.

danielwangksu commented 4 years ago

As for the paths, we are using what openssl tells us to use: https://github.com/tpm2-software/tpm2-tss-engine/blob/master/configure.ac#L115-L116

You can override this with ./configure --with-enginesdir though.

Thank you @AndreasFuchsSIT ! Let say I have two version of openssl, one is openssl 1.0.2g installed in the default system location. One is openssl 1.1.1 in my home folder. How can I built tpm2tss and tpm2tss-engine for openssl 1.1.1? Is there a way to override the configure process to use openssl 1.1.1 instead? Thank you!

AndreasFuchsTPM commented 4 years ago

We Query pkg-config. You can override pkg-config's search path using export PKG_CONFIG_PATH=....

danielwangksu commented 4 years ago

We Query pkg-config. You can override pkg-config's search path using export PKG_CONFIG_PATH=....

Thank you very much I will try it