-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refs 11914. Move CA and PK load to abstraction depending on the URI Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Add dependency with libp11 in linux Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. PKCS11 provider for PK load Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. PKIDH using PKCS11 provider depending on URI Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Create a fake UI method for PKCS11 provider Otherwise, if no PIN is given on environment nor URI, the default behavior of the wrapper library is to prompt the user on the console... And we do not want that Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. linters Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Do not make libp11 requiredwq Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Adding test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Create token and keys inside test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Refactor test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Avoid singleton and make the provider destroy with plugin Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Conditional compile with libP11 Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Changes requested on review Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. uncrustify Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Suggestions on tests Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Update dependencies on README Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. update fastrtps API pubsubreader Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Remove unused parameter Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 11914. Update CMake framework Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Make p11 windows installer friendly Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Make test grep independent on windows Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Ignore pkcs11 tests if not available. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Update system calls on windows Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Linux ci fixes. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Make CMake hint openssl config to blackbox tests on windows Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Rebase fixes. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Linter. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Address reviewers comments. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Address reviewers comments. Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> * Refs 11914. Disable pkcs11 windows testing till ci is reviewed Signed-off-by: Miguel Barro <miguelbarro@eprosima.com> Co-authored-by: Miguel Barro <miguelbarro@eprosima.com>
- Loading branch information
1 parent
7028087
commit 342c821
Showing
21 changed files
with
1,253 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# FindLibP11 | ||
# | ||
# Generates an imported target associated to an available pksc11 library: | ||
# | ||
# + On linux relies on the apt package libp11-dev | ||
# | ||
# + On Windows the library must be build from sources available at https://github.com/OpenSC/libp11.git | ||
# Given that each user must build its own binaries the following environment variables must be set to hint | ||
# where to locate headers and binaries (semicolon-separated list see https://cmake.org/cmake/help/v3.22/variable/PackageName_ROOT.html): | ||
# + LibP11_ROOT_32 -> to reference sources and 32 bit binaries location | ||
# + LibP11_ROOT_64 -> to reference sources and 64 bit binaries location | ||
|
||
if(TARGET eProsima_p11) | ||
return() | ||
endif() | ||
|
||
if(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
set(LibP11_ROOT "$ENV{LibP11_ROOT_32}") | ||
else() | ||
set(LibP11_ROOT "$ENV{LibP11_ROOT_64}") | ||
endif() | ||
|
||
find_path(LIBP11_INCLUDE_DIR NAMES libp11.h HINTS ${LibP11_ROOT}) | ||
find_library(LIBP11_LIBRARY NAMES libp11.a libp11.lib HINTS ${LibP11_ROOT}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(LibP11 DEFAULT_MSG LIBP11_LIBRARY LIBP11_INCLUDE_DIR) | ||
|
||
if(LibP11_FOUND) | ||
# add the target | ||
add_library(eProsima_p11 STATIC IMPORTED) | ||
|
||
# update the properties | ||
set_target_properties(eProsima_p11 PROPERTIES | ||
IMPORTED_LOCATION "${LIBP11_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${LIBP11_INCLUDE_DIR}" | ||
) | ||
endif() | ||
|
||
# clean local variables | ||
unset(LIBP11_INCLUDE_DIR) | ||
unset(LIBP11_LIBRARY) | ||
unset(LibP11_ROOT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.