From 25f4d09fd0d3a9ed8b4a5cdc85e680e5230aac78 Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Tue, 22 Oct 2024 10:05:30 +0200 Subject: [PATCH] x --- Makefile.am | 14 ++++++++------ src/tss2-tcti/tcti-libtpms.c | 1 + src/tss2-tcti/tctildr-dl.c | 1 + tss2-dlopen/tss2-dlopen-fapi.c | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8af86fd3e..68e0880be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -311,6 +311,14 @@ src_tss2_tcti_libtss2_tctildr_la_LIBADD += $(LIBADD_DL) src_tss2_tcti_libtss2_tctildr_la_SOURCES += src/tss2-tcti/tctildr-dl.c src/tss2-tcti/tctildr-dl.h endif +# tcti library for swtpm +if ENABLE_TCTI_SWTPM +libtss2_tcti_swtpm = src/tss2-tcti/libtss2-tcti-swtpm.la +tss2_HEADERS += $(srcdir)/include/tss2/tss2_tcti_swtpm.h +lib_LTLIBRARIES += $(libtss2_tcti_swtpm) +pkgconfig_DATA += lib/tss2-tcti-swtpm.pc + + # tcti device library if ENABLE_TCTI_DEVICE libtss2_tcti_device = src/tss2-tcti/libtss2-tcti-device.la @@ -328,12 +336,6 @@ src_tss2_tcti_libtss2_tcti_device_la_SOURCES = \ endif # ENABLE_TCTI_DEVICE EXTRA_DIST += lib/tss2-tcti-device.map -# tcti library for swtpm -if ENABLE_TCTI_SWTPM -libtss2_tcti_swtpm = src/tss2-tcti/libtss2-tcti-swtpm.la -tss2_HEADERS += $(srcdir)/include/tss2/tss2_tcti_swtpm.h -lib_LTLIBRARIES += $(libtss2_tcti_swtpm) -pkgconfig_DATA += lib/tss2-tcti-swtpm.pc if HAVE_LD_VERSION_SCRIPT src_tss2_tcti_libtss2_tcti_swtpm_la_LDFLAGS = -Wl,--version-script=$(srcdir)/lib/tss2-tcti-swtpm.map diff --git a/src/tss2-tcti/tcti-libtpms.c b/src/tss2-tcti/tcti-libtpms.c index 9c63b777c..19f71b195 100644 --- a/src/tss2-tcti/tcti-libtpms.c +++ b/src/tss2-tcti/tcti-libtpms.c @@ -621,6 +621,7 @@ tcti_libtpms_dl(TSS2_TCTI_LIBTPMS_CONTEXT *tcti_libtpms) const char *names[] = {"libtpms.so", "libtpms.so.0"}; for (size_t i = 0; i < ARRAY_LEN(names); i++) { + LOG_ERROR("XXX 7 %s", names[i]); tcti_libtpms->libtpms = dlopen(names[i], RTLD_LAZY | RTLD_LOCAL); if (tcti_libtpms->libtpms != NULL) { break; diff --git a/src/tss2-tcti/tctildr-dl.c b/src/tss2-tcti/tctildr-dl.c index a2836cfde..6df1275c1 100644 --- a/src/tss2-tcti/tctildr-dl.c +++ b/src/tss2-tcti/tctildr-dl.c @@ -107,6 +107,7 @@ handle_from_name(const char *file, LOG_ERROR("TCTI name truncated in transform."); return TSS2_TCTI_RC_BAD_VALUE; } + LOG_ERROR("XXX 1 %s", file_xfrm); *handle = dlopen(file_xfrm, RTLD_NOW); if (*handle != NULL) { return TSS2_RC_SUCCESS; diff --git a/tss2-dlopen/tss2-dlopen-fapi.c b/tss2-dlopen/tss2-dlopen-fapi.c index 4d96fbd56..8a256643b 100644 --- a/tss2-dlopen/tss2-dlopen-fapi.c +++ b/tss2-dlopen/tss2-dlopen-fapi.c @@ -41,7 +41,7 @@ init_dlhandle(void) { if (dlhandle) return TSS2_RC_SUCCESS; - dlhandle = dlopen(LIB, RTLD_NOW | RTLD_LOCAL); + dlhandle = dlopen(LIB, RTLD_NOW | RTLD_LOCAL); if (!dlhandle) { WARN("Library " LIB " not found: %s.", dlerror()); return TSS2_FAPI_RC_NOT_IMPLEMENTED;