Enabling ALG_SM3_256 causes a build error on OpenSSL 3.x:
TpmToOsslHash.h:77:14: fatal error: openssl/sm3.h: No such file or directory
77 | # include <openssl/sm3.h>
| ^~~~~~~~~~~~~~~
This is because the sm3.h is an internal file, which is not available on standard installations.
In fact, all xxx_Init, xxx_Update and xxx_Final functions listed in src/TpmToOsslHash.h are deprecated since OpenSSL 3.0.0, see https://docs.openssl.org/3.2/man3/SHA256_Init.
I suggest to rewrite the hashes using EVP_DigestInit, EVP_DigestUpdate and EVP_DigestFinal. These are available for a quite long time and compatible with both OpenSSL 1.1.1x and OpenSSL 3.x.
Enabling
ALG_SM3_256causes a build error on OpenSSL 3.x:This is because the
sm3.his an internal file, which is not available on standard installations.In fact, all
xxx_Init,xxx_Updateandxxx_Finalfunctions listed insrc/TpmToOsslHash.hare deprecated since OpenSSL 3.0.0, see https://docs.openssl.org/3.2/man3/SHA256_Init.I suggest to rewrite the hashes using
EVP_DigestInit,EVP_DigestUpdateandEVP_DigestFinal. These are available for a quite long time and compatible with both OpenSSL 1.1.1x and OpenSSL 3.x.