-
Notifications
You must be signed in to change notification settings - Fork 6
PS-10068 Production code for new KMIP C++ library #23
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
Open
lukin-oleksiy
wants to merge
4
commits into
Percona-Lab:master
Choose a base branch
from
lukin-oleksiy:PS-9697-POC-of-kmip-cpp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d86b3eb
PS-9609: locate_secrets_* operations added to kmippp
lukin-oleksiy fc18901
PS-9861 Fix of register secret operation usage mask
lukin-oleksiy b9d088d
PS-9861 fix of secret get operation, key format type RAW added
lukin-oleksiy dc27384
PS-10068 Making KMIP C++ library productgion ready
lukin-oleksiy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| build | ||
| generated-docs |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,13 +1,33 @@ | ||
| cmake_minimum_required(VERSION 3.5.0) | ||
| cmake_minimum_required(VERSION 3.10.0) | ||
|
|
||
| if (POLICY CMP0048) | ||
| cmake_policy(SET CMP0048 NEW) | ||
| endif(POLICY CMP0048) | ||
|
|
||
| project(kmip C CXX) | ||
|
|
||
| enable_testing() | ||
|
|
||
| set(KMIP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
|
||
| add_subdirectory(libkmip/src) | ||
| add_subdirectory(kmippp) | ||
| add_subdirectory(kmipclient) | ||
|
|
||
| find_package(Doxygen REQUIRED) | ||
|
|
||
| if(DOXYGEN_FOUND) | ||
| configure_file(Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COPYONLY) | ||
|
|
||
| add_custom_target(doc | ||
| COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
| COMMENT "Generating API documentation with Doxygen" | ||
| VERBATIM | ||
| ) | ||
|
|
||
| # Make the 'doc' target depend on your build targets if necessary | ||
| # add_dependencies(doc your_library your_executable) | ||
| else() | ||
| message(STATUS "Doxygen not found, skipping documentation generation.") | ||
| endif() |
This file contains hidden or 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,36 @@ | ||
| # Project information | ||
| PROJECT_NAME = libkmip | ||
| PROJECT_NUMBER = 0.4.0 | ||
| OUTPUT_DIRECTORY = generated-docs | ||
|
|
||
| # Input settings | ||
| INPUT = . # Scan the current directory for source files | ||
| RECURSIVE = YES | ||
|
|
||
| # Output settings | ||
| GENERATE_LATEX = NO | ||
| GENERATE_MAN = NO | ||
| GENERATE_RTF = NO | ||
| GENERATE_XML = NO | ||
| GENERATE_HTMLHELP = YES | ||
|
|
||
| # UML related settings | ||
| UML_LOOK = YES | ||
| HAVE_DOT = YES | ||
| DOT_PATH = /usr/bin/dot # Adjust this path to where your 'dot' executable is located | ||
| PLANTUML_JAR_PATH = /usr/share/java/plantuml.jar | ||
| PLANTUML_PREPROC = NO | ||
| PLANTUML_INCLUDE_PATH = | ||
| PLANTUML_CONFIG_FILE = | ||
| # Enable class diagram generation | ||
| CLASS_DIAGRAMS = YES | ||
| COLLABORATION_GRAPH = YES | ||
| UML_LIMIT_NUM_FIELDS = 50 | ||
| TEMPLATE_RELATIONS = YES | ||
| MAX_DOT_GRAPH_DEPTH = 0 | ||
| MAX_DOT_GRAPH_NODES = 0 | ||
| HIDE_UNDOC_MEMBERS = NO | ||
| HIDE_VIRTUAL_FUNCTIONS = NO | ||
| SHOW_INCLUDE_FILES = YES | ||
| SHOW_USED_FILES = YES | ||
| SHOW_FILES = YES |
This file contains hidden or 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,10 @@ | ||
| Dec, 2025 Version 0.1.1 | ||
|
|
||
| Interface optimization | ||
| Test suite added | ||
| Bugs fixed | ||
|
|
||
| Apr, 2025 Version 0.1.0 | ||
|
|
||
| Initial implementation of all functionality available in "kmippp" | ||
|
|
This file contains hidden or 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,126 @@ | ||
| cmake_minimum_required(VERSION 3.16) | ||
| project(kmipclient) | ||
|
|
||
| #Have to put these 2 lines here to compile | ||
|
|
||
| set(CMAKE_CXX_STANDARD 20) | ||
| include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
|
||
| add_library( | ||
| kmipclient | ||
| STATIC | ||
| include/KmipClient.hpp | ||
| src/KmipClient.cpp | ||
| include/NetClient.hpp | ||
| src/NetClientOpenSSL.cpp | ||
| include/NetClientOpenSSL.hpp | ||
| include/kmip_data_types.hpp | ||
| src/RequestFactory.cpp | ||
| src/RequestFactory.hpp | ||
| src/KmipCtx.hpp | ||
| src/KmipRequest.hpp | ||
| src/IOUtils.cpp | ||
| src/IOUtils.hpp | ||
| include/Kmip.hpp | ||
| src/ResponseResult.cpp | ||
| src/ResponseResult.hpp | ||
| include/kmip_exceptions.hpp | ||
| src/AttributesFactory.cpp | ||
| src/AttributesFactory.hpp | ||
| src/KeyFactory.cpp | ||
| src/KeyFactory.hpp | ||
| src/Key.cpp | ||
| include/Key.hpp | ||
| src/StringUtils.cpp | ||
| src/StringUtils.hpp | ||
| include/Logger.hpp | ||
| ) | ||
|
|
||
| target_include_directories( | ||
| kmipclient PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include> | ||
| ) | ||
|
|
||
| target_link_libraries(kmipclient kmip) | ||
|
|
||
| set_property(TARGET kmipclient PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
|
||
|
|
||
| target_compile_features(kmipclient INTERFACE cxx_std_20) | ||
|
|
||
| set_target_properties(kmipclient PROPERTIES | ||
| CXX_STANDARD_REQUIRED YES | ||
| CXX_EXTENSIONS NO | ||
| ) | ||
|
|
||
| option(WITH_ASAN "Enable Address Sanitizer" OFF) | ||
| if(WITH_ASAN) | ||
| target_compile_options(kmipclient INTERFACE "-fsanitize=address") | ||
| target_link_options(kmipclient INTERFACE "-fsanitize=address") | ||
| endif() | ||
|
|
||
| export(TARGETS kmip kmipclient FILE "kmipclient.cmake") | ||
|
|
||
| install( | ||
| TARGETS kmipclient | ||
| EXPORT kmipclient | ||
| DESTINATION cmake | ||
| ARCHIVE DESTINATION lib | ||
| PUBLIC_HEADER DESTINATION include/ | ||
| LIBRARY DESTINATION lib) | ||
|
|
||
| macro(add_example name) | ||
| add_executable(example_${name} examples/example_${name}.cpp) | ||
| target_link_libraries(example_${name} PRIVATE kmipclient) | ||
| endmacro() | ||
|
|
||
| add_example(create_aes) | ||
| add_example(register_secret) | ||
| add_example(activate) | ||
| add_example(get) | ||
| add_example(get_name) | ||
| add_example(get_secret) | ||
| add_example(revoke) | ||
| add_example(destroy) | ||
| add_example(register_key) | ||
| add_example(locate) | ||
| add_example(locate_by_group) | ||
| add_example(get_all_ids) | ||
| add_example(get_attributes) | ||
|
|
||
|
|
||
| # Google Test integration | ||
| option(BUILD_TESTS "Build the tests" OFF) | ||
|
|
||
| if(BUILD_TESTS) | ||
| if (NOT (TARGET gtest OR TARGET gmock)) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| googletest | ||
| GIT_REPOSITORY https://github.com/google/googletest.git | ||
| GIT_TAG v1.14.0 | ||
| ) | ||
|
|
||
| # For Windows: Prevent overriding the parent project's compiler/linker settings | ||
| set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
| FetchContent_MakeAvailable(googletest) | ||
| endif () | ||
|
|
||
| enable_testing() | ||
|
|
||
| add_executable( | ||
| kmipclient_test | ||
| tests/KmipClientIntegrationTest.cpp | ||
| ) | ||
|
|
||
| target_link_libraries( | ||
| kmipclient_test | ||
| PRIVATE | ||
| GTest::gtest_main | ||
| kmipclient | ||
| ) | ||
|
|
||
| include(GoogleTest) | ||
| gtest_discover_tests(kmipclient_test) | ||
| endif() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_target_property()There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed, there's no such funtion