Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
JuergenReppSIT committed Oct 22, 2024
1 parent 25c7c0f commit 25f4d09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/tss2-tcti/tcti-libtpms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/tss2-tcti/tctildr-dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tss2-dlopen/tss2-dlopen-fapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 25f4d09

Please sign in to comment.