Commit Graph

4 Commits

Author SHA1 Message Date
Steffen Eiden
dea5f80215 libpv: Remove unused code
Remove all the code just pvattest-C used from libpv.
z(get)dump is the only user as of now.

Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2024-05-27 16:54:14 +02:00
Steffen Eiden
d030874050 libpv: disallow glib features from after 2.56
Enforce that the first glib.h include is done via glib-helper.h for libpv
so that glib version checks are in place.

Change zdump and pvattest such that they never include glibstuff before
libpv/glib-helper.h

Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2022-12-15 11:33:46 +01:00
Marc Hartmayer
330ddb7adb libpv: add copied parameter to pv_gbytes_memcpy and adapt pvattest
It's often useful to know how much data was actually copied, therefore let's
introduce an nullable parameter `@copied` to `pv_gbytes_memcpy`.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-10-22 20:27:16 +02:00
Steffen Eiden
386392690d libpv: New library for PV tools
libpv is a collection of definitions and functions related to
Protected Virtualization (PV).
The functions cover mainly encryption (e.g. AES-GCM)
and certificates (X509). There are also helping functions for glib2.

Most of the code is extracted+refactored from `genprotimg`, which
will use this library in future.

Requires openssl v1.1.1+, glib2.56+, and libcurl.

libpv is not designed or intended to be dynamically linked or used
outside of this project. Its purpose is to avoid code duplication
as PV tools do very similar things regarding cryptography.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-06-20 13:14:05 +02:00