Skip to content

Commit

Permalink
Add p12tool
Browse files Browse the repository at this point in the history
The p12tool command has been moved from pki-tools to jss-tools.
  • Loading branch information
edewata committed Mar 18, 2024
1 parent 890916c commit aa59124
Show file tree
Hide file tree
Showing 21 changed files with 10,722 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ if(WITH_TESTS)
endif(WITH_TESTS)

add_subdirectory(symkey)
add_subdirectory(tools)

if(WITH_TESTS)
add_subdirectory(tests)
Expand All @@ -106,9 +105,11 @@ endif(WITH_TESTS)

add_custom_target(
native ALL
DEPENDS generate_c generate_so symkey_library sslget
DEPENDS generate_c generate_so symkey_library
)

add_subdirectory(tools)

if(WITH_TESTS)
add_dependencies(native generate_test_so)
endif(WITH_TESTS)
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ if [ "$BUILD_TARGET" = "dist" ] ; then
echo "- native binaries:"
echo " $WORK_DIR/libjss.so"
echo " $WORK_DIR/symkey/libjss-symkey.so"
echo " $WORK_DIR/tools/src/main/native/p12tool/p12tool"
echo " $WORK_DIR/tools/src/main/native/sslget/sslget"
fi

Expand Down
1 change: 1 addition & 0 deletions docs/changes/v5.6.0/Packaging-Changes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

A new `jss-tools` RPM package has been added to provide tools such as:

* `p12tool`
* `sslget`
3 changes: 2 additions & 1 deletion jss.spec
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Provides: jss-tools = %{version}-%{release}
Provides: jss-tools = %{major_version}.%{minor_version}
Provides: %{product_id}-tools = %{major_version}.%{minor_version}

# The sslget command has been moved from pki-tools into jss-tools.
# Some PKI tools have been moved into jss-tools.
Conflicts: pki-tools < 11.6
Conflicts: dogtag-pki-tools < 11.6

Expand Down Expand Up @@ -369,6 +369,7 @@ cp base/target/jss-tests.jar %{buildroot}%{_datadir}/jss/tests/lib
%files -n %{product_id}-tools
################################################################################

%{_bindir}/p12tool
%{_bindir}/sslget

%if %{with javadoc}
Expand Down
1 change: 1 addition & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
project(tools)

if(WITH_NATIVE)
add_subdirectory(src/main/native/p12tool)
add_subdirectory(src/main/native/sslget)
endif(WITH_NATIVE)
29 changes: 29 additions & 0 deletions tools/src/main/native/p12tool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project(p12tool)

set(P12TOOL_PRIVATE_INCLUDE_DIRS
${CMAKE_BINARY_DIR}
${NSPR_INCLUDE_DIRS}
${NSS_INCLUDE_DIRS}
)

set(p12tool_SRCS
basicutil.c
pppolicy.c
secutil.c
secpwd.c
moreoids.c
p12tool.c
)

include_directories(${P12TOOL_PRIVATE_INCLUDE_DIRS})

add_executable(p12tool ${p12tool_SRCS})
add_dependencies(native p12tool)
target_link_libraries(p12tool smime3 nss3 plc4 plds4 nspr4)

install(
TARGETS p12tool
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
)
Loading

0 comments on commit aa59124

Please sign in to comment.