Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
generated-docs
12 changes: 11 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
=========
Changelog
=========
0.3.3 - July 2025
~~~~~~~~~~~~~~~~~~~~~~
* The register secret operation usage mask fixed, works Fortanix server
* The get secret operation key format type fixed, works Fortanix server

0.3.2: -- May 2025
~~~~~~~~~~~~~~~~~~~~~
0.3.1:
0.3.0:

.. _v0.3.0:
* locate_secrets_* operations added to kmippp
* Fix of key registration with HashiCorp Vault

0.3.0 - March 19, 2025
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
22 changes: 21 additions & 1 deletion CMakeLists.txt
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()
36 changes: 36 additions & 0 deletions Doxyfile
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
10 changes: 10 additions & 0 deletions kmipclient/CHANGELOG.md
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"

126 changes: 126 additions & 0 deletions kmipclient/CMakeLists.txt
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_target_property()

Copy link
Copy Markdown
Contributor Author

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



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()
Loading