tpm2-software / tpm2-tss

OSS implementation of the TCG TPM2 Software Stack (TSS2)
https://tpm2-software.github.io
BSD 2-Clause "Simplified" License
730 stars 359 forks source link

Undefined symbol in TCTIs: commandCodeStrings #178

Closed flihp closed 8 years ago

flihp commented 8 years ago

This array is used to map TPM command codes to human readable strings. Given where it lives (https://github.com/01org/TPM2.0-TSS/blob/master/sysapi/sysapi_util/debug.c) it's probably for debug purposes. Exposing this data from libtss2 implicitly while having the TCTIs declare it as extern makes it a hidden part of our API. Worse yet it requires that libraries using libtss2 and wanting this function have unresolved symbols. This should be avoided if at all possible.

Try wrapping this in a function, exposing it through the tss2 headers (a specific 'debug' or 'util' header?).

flihp commented 8 years ago

fixed by cbf4975ac05781244dcdf707b357cad3dc6b8cd2