Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge libtps.so into tpsclient #4490

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 113 additions & 2 deletions base/tools/src/main/native/tpsclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,111 @@ SET(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}/tps")
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

add_subdirectory(src)
add_subdirectory(tools)
find_library(ZLIB_LIBRARY
NAMES
z
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/opt/local/lib
/sw/lib
)

set(TPS_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/include)

set(TPS_PUBLIC_INCLUDE_DIRS
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TPS_INCLUDE_DIR}
CACHE INTERNAL "TPS public include directories"
)

set(TPS_PRIVATE_INCLUDE_DIRS
${TPS_PUBLIC_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${NSPR_INCLUDE_DIRS}
${NSS_INCLUDE_DIRS}
${APR_INCLUDE_DIRS}
${LDAP_INCLUDE_DIRS}
)

set(tpsclient_SRCS
src/main/Buffer.cpp
src/main/NameValueSet.cpp
src/main/Util.cpp
src/main/RA_Msg.cpp
src/main/Memory.cpp
src/main/AuthParams.cpp
src/apdu/APDU.cpp
src/apdu/Unblock_Pin_APDU.cpp
src/apdu/Create_Object_APDU.cpp
src/apdu/Set_Pin_APDU.cpp
src/apdu/Set_IssuerInfo_APDU.cpp
src/apdu/Get_IssuerInfo_APDU.cpp
src/apdu/Create_Pin_APDU.cpp
src/apdu/List_Pins_APDU.cpp
src/apdu/Initialize_Update_APDU.cpp
src/apdu/Get_Version_APDU.cpp
src/apdu/Get_Status_APDU.cpp
src/apdu/Get_Data_APDU.cpp
src/apdu/External_Authenticate_APDU.cpp
src/apdu/Generate_Key_APDU.cpp
src/apdu/Generate_Key_ECC_APDU.cpp
src/apdu/Read_Buffer_APDU.cpp
src/apdu/Read_Object_APDU.cpp
src/apdu/Write_Object_APDU.cpp
src/apdu/Put_Key_APDU.cpp
src/apdu/Select_APDU.cpp
src/apdu/Delete_File_APDU.cpp
src/apdu/Install_Applet_APDU.cpp
src/apdu/Format_Muscle_Applet_APDU.cpp
src/apdu/Load_File_APDU.cpp
src/apdu/Install_Load_APDU.cpp
src/apdu/Lifecycle_APDU.cpp
src/apdu/List_Objects_APDU.cpp
src/apdu/Import_Key_APDU.cpp
src/apdu/Import_Key_Enc_APDU.cpp
src/apdu/APDU_Response.cpp
src/apdu/Get_Lifecycle_APDU.cpp
src/msg/RA_Begin_Op_Msg.cpp
src/msg/RA_End_Op_Msg.cpp
src/msg/RA_Login_Request_Msg.cpp
src/msg/RA_Login_Response_Msg.cpp
src/msg/RA_SecureId_Request_Msg.cpp
src/msg/RA_SecureId_Response_Msg.cpp
src/msg/RA_ASQ_Request_Msg.cpp
src/msg/RA_ASQ_Response_Msg.cpp
src/msg/RA_New_Pin_Request_Msg.cpp
src/msg/RA_New_Pin_Response_Msg.cpp
src/msg/RA_Token_PDU_Request_Msg.cpp
src/msg/RA_Token_PDU_Response_Msg.cpp
src/msg/RA_Status_Update_Request_Msg.cpp
src/msg/RA_Status_Update_Response_Msg.cpp
src/msg/RA_Extended_Login_Request_Msg.cpp
src/msg/RA_Extended_Login_Response_Msg.cpp
tools/raclient/RA_Client.cpp
tools/raclient/RA_Conn.cpp
tools/raclient/RA_Token.cpp
)

set(TPS_EXECUTABLE
tpsclient
CACHE INTERNAL "tpsclient executable"
)

set(TPS_LINK_LIBRARIES
${NSPR_LIBRARIES}
${NSS_LIBRARIES}
${APR_LIBRARIES}
${LDAP_LIBRARIES}
${ZLIB_LIBRARY}
)

include_directories(${TPS_PRIVATE_INCLUDE_DIRS})

add_executable(${TPS_EXECUTABLE} ${tpsclient_SRCS})
target_link_libraries(${TPS_EXECUTABLE} ${TPS_LINK_LIBRARIES})

add_custom_target(tpsclient-man ALL
COMMENT "Creating PKI server manuals")
Expand All @@ -48,6 +151,14 @@ add_custom_command(
COMMAND go-md2man -in ${CMAKE_SOURCE_DIR}/docs/manuals/man1/tpsclient.1.md -out man/man1/tpsclient.1
)

install(
TARGETS
${TPS_EXECUTABLE}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}/tps
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}/tps
)

install(
DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/man/
Expand Down
119 changes: 0 additions & 119 deletions base/tools/src/main/native/tpsclient/src/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion base/tools/src/main/native/tpsclient/tools/CMakeLists.txt

This file was deleted.

38 changes: 0 additions & 38 deletions base/tools/src/main/native/tpsclient/tools/raclient/CMakeLists.txt

This file was deleted.

3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ if [ "$BUILD_TARGET" = "dist" ] ; then
echo " $WORK_DIR/base/tools/src/main/native/setpin/setpin"
echo " $WORK_DIR/base/tools/src/main/native/sslget/sslget"
echo " $WORK_DIR/base/tools/src/main/native/tkstool/tkstool"
echo " $WORK_DIR/base/tools/src/main/native/tpsclient/src/libtps.so"
echo " $WORK_DIR/base/tools/src/main/native/tpsclient/tools/raclient/tpsclient"
echo " $WORK_DIR/base/tools/src/main/native/tpsclient/tpsclient"

echo "- documentation:"
echo " $WORK_DIR/base/common/python/man"
Expand Down
1 change: 0 additions & 1 deletion pki.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,6 @@ fi
%{_javadir}/pki/pki-tools.jar
%{_datadir}/pki/tools/
%{_datadir}/pki/lib/p11-kit-trust.so
%{_libdir}/tps/libtps.so
%{_mandir}/man1/AtoB.1.gz
%{_mandir}/man1/AuditVerify.1.gz
%{_mandir}/man1/BtoA.1.gz
Expand Down