mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Separate and rework CCA host library loading
As preparation for future changes, rework the loading of the CCA host library so that the exported symbols are not passed individually to the functions that use it. Pass a structure that contains all entry points of all loaded CCA functions instead. This will make it easier to add further CCA functions at a later time. Also add a version query for the CCA host library since some future functions might be dependent on the library version. While at it, separate the CCA related functions and definitions, and move them into a separate source file (cca.h/cca.h). Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
21de913a5e
commit
95c7258ea7
+6
-5
@@ -64,18 +64,19 @@ zkey-cryptsetup-skip-jsonc:
|
||||
|
||||
all: $(BUILD_TARGETS)
|
||||
|
||||
zkey.o: zkey.c pkey.h misc.h
|
||||
zkey.o: zkey.c pkey.h cca.h misc.h
|
||||
pkey.o: pkey.c pkey.h
|
||||
cca.o: cca.c cca.h pkey.h
|
||||
properties.o: check-dep-zkey properties.c properties.h
|
||||
keystore.o: keystore.c keystore.h properties.h
|
||||
zkey-cryptsetup.o: check-dep-zkey-cryptsetup zkey-cryptsetup.c pkey.h misc.h
|
||||
keystore.o: keystore.c keystore.h properties.h pkey.h cca.h
|
||||
zkey-cryptsetup.o: check-dep-zkey-cryptsetup zkey-cryptsetup.c pkey.h cca.h misc.h
|
||||
|
||||
zkey: LDLIBS = -ldl -lcrypto
|
||||
zkey: zkey.o pkey.o properties.o keystore.o $(libs)
|
||||
zkey: zkey.o pkey.o cca.o properties.o keystore.o $(libs)
|
||||
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
zkey-cryptsetup: LDLIBS = -ldl -lcryptsetup -ljson-c
|
||||
zkey-cryptsetup: zkey-cryptsetup.o pkey.o $(libs)
|
||||
zkey-cryptsetup: zkey-cryptsetup.o pkey.o cca.o $(libs)
|
||||
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
install-common:
|
||||
|
||||
Reference in New Issue
Block a user