diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d9d8a437..a07bd358 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -80,7 +80,7 @@ jobs: cmake --build build -- --jobs=2 test -e ./build/src/yubihsm-shell test -e ./build/lib/libyubihsm.$LIBEXT - test -e ./build/pkcs11/yubihsm_pkcs11.$LIBEXT + test -e ./build/lib/yubihsm_pkcs11.$LIBEXT test -e ./build/yhwrap/yubihsm-wrap - name: Test if: ${{ matrix.test }} @@ -109,7 +109,7 @@ jobs: LIBEXT: ${{ matrix.libext }} OS: ${{ matrix.os }} run: | - export YUBIHSM_PKCS11_MODULE="`pwd`/build/pkcs11/yubihsm_pkcs11.$LIBEXT" + export YUBIHSM_PKCS11_MODULE="`pwd`/build/lib/yubihsm_pkcs11.$LIBEXT" pushd /tmp/python-pkcs11tester echo "connector=$DEFAULT_CONNECTOR_URL" >yubihsm_pkcs11.conf if [ "$OS" = "macos-latest" ]; then @@ -126,7 +126,7 @@ jobs: OS: ${{ matrix.os }} run: | if [ "$OS" != "ubuntu-18.04" ]; then - export YUBIHSM_PKCS11_MODULE="`pwd`/build/pkcs11/yubihsm_pkcs11.$LIBEXT" + export YUBIHSM_PKCS11_MODULE="`pwd`/build/lib/yubihsm_pkcs11.$LIBEXT" echo "connector=$DEFAULT_CONNECTOR_URL" >yubihsm_pkcs11.conf export YUBIHSM_PKCS11_CONF=`pwd`/yubihsm_pkcs11.conf pushd /tmp/yubihsm_sunpkcs11_tests diff --git a/debian/rules b/debian/rules index 50e3b7dd..86fe57c9 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,6 @@ DEB_BUILD_OPTIONS=noddebs override_dh_install: chrpath -d $(CURDIR)/debian/tmp/usr/bin/* chrpath -d $(CURDIR)/debian/tmp/usr/lib/*.so* - chrpath -d $(CURDIR)/debian/tmp/usr/lib/pkcs11/*.so* dh_install --fail-missing override_dh_auto_configure: diff --git a/debian/yubihsm-pkcs11.install b/debian/yubihsm-pkcs11.install index 4e51e927..c828dd30 100755 --- a/debian/yubihsm-pkcs11.install +++ b/debian/yubihsm-pkcs11.install @@ -1,3 +1,3 @@ #! /usr/bin/dh-exec -usr/lib/pkcs11/*.so /usr/lib/${DEB_HOST_MULTIARCH}/pkcs11 +usr/lib/yubihsm_pkcs11.so /usr/lib/${DEB_HOST_MULTIARCH}/pkcs11 diff --git a/pkcs11/CMakeLists.txt b/pkcs11/CMakeLists.txt index b67b38b7..2371d948 100644 --- a/pkcs11/CMakeLists.txt +++ b/pkcs11/CMakeLists.txt @@ -91,9 +91,9 @@ endif(WIN32) install( TARGETS yubihsm_pkcs11 - ARCHIVE DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}/pkcs11" - LIBRARY DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}/pkcs11" - RUNTIME DESTINATION "${YUBIHSM_INSTALL_BIN_DIR}/pkcs11") + ARCHIVE DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${YUBIHSM_INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${YUBIHSM_INSTALL_BIN_DIR}") install(FILES pkcs11.h DESTINATION "${YUBIHSM_INSTALL_INC_DIR}/pkcs11") install(FILES pkcs11y.h DESTINATION "${YUBIHSM_INSTALL_INC_DIR}/pkcs11") diff --git a/resources/release/linux/yubihsm-shell.spec b/resources/release/linux/yubihsm-shell.spec index 1ef97c29..574ce840 100644 --- a/resources/release/linux/yubihsm-shell.spec +++ b/resources/release/linux/yubihsm-shell.spec @@ -40,7 +40,7 @@ make install chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-shell chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-wrap chrpath -r %{_libdir} %{buildroot}/%{_bindir}/yubihsm-auth -chrpath -r %{_libdir} %{buildroot}/%{_libdir}/pkcs11/yubihsm_pkcs11.so +chrpath -r %{_libdir} %{buildroot}/%{_libdir}/yubihsm_pkcs11.so mkdir -p %{buildroot}/%{_prefix}/share/licenses/%{name} install -m 0644 ../LICENSE %{buildroot}/%{_prefix}/share/licenses/%{name} @@ -58,8 +58,7 @@ install -m 0644 ../LICENSE %{buildroot}/%{_prefix}/share/licenses/%{name} %{_libdir}/libyubihsm_usb.so.2.* %{_libdir}/libykhsmauth.so.2 %{_libdir}/libykhsmauth.so.2.* -%dir %{_libdir}/pkcs11 -%{_libdir}/pkcs11/yubihsm_pkcs11.so +%{_libdir}/yubihsm_pkcs11.so %files -n %{_yubihsm}-devel %{_libdir}/libyubihsm.so %{_libdir}/libyubihsm_http.so diff --git a/resources/release/macos/make_release_binaries.sh b/resources/release/macos/make_release_binaries.sh index 7ec2352d..bb069260 100755 --- a/resources/release/macos/make_release_binaries.sh +++ b/resources/release/macos/make_release_binaries.sh @@ -46,7 +46,7 @@ install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_pa install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$VERSION.dylib" install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$SO_VERSION.dylib" -install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/pkcs11/yubihsm_pkcs11.dylib" +install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/yubihsm_pkcs11.dylib" install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-shell" install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-wrap" diff --git a/resources/release/win/sign_release.bat b/resources/release/win/sign_release.bat index 0b6df2f0..bb712893 100644 --- a/resources/release/win/sign_release.bat +++ b/resources/release/win/sign_release.bat @@ -8,7 +8,7 @@ rem Sign x64 components %SIGNCMD% yubihsm-shell-x64\bin\libyubihsm.dll %SIGNCMD% yubihsm-shell-x64\bin\libyubihsm_http.dll %SIGNCMD% yubihsm-shell-x64\bin\libyubihsm_usb.dll -%SIGNCMD% yubihsm-shell-x64\bin\pkcs11\yubihsm_pkcs11.dll +%SIGNCMD% yubihsm-shell-x64\bin\yubihsm_pkcs11.dll %SIGNCMD% yubihsm-shell-x64\bin\ykhsmauth.dll %SIGNCMD% /d "YubiHSM Authenication" yubihsm-shell-x64\bin\yubihsm-auth.exe %SIGNCMD% /d "YubiHSM Shell" yubihsm-shell-x64\bin\yubihsm-shell.exe @@ -18,7 +18,7 @@ rem Sign x86 components %SIGNCMD% yubihsm-shell-x86\bin\libyubihsm.dll %SIGNCMD% yubihsm-shell-x86\bin\libyubihsm_http.dll %SIGNCMD% yubihsm-shell-x86\bin\libyubihsm_usb.dll -%SIGNCMD% yubihsm-shell-x86\bin\pkcs11\yubihsm_pkcs11.dll +%SIGNCMD% yubihsm-shell-x86\bin\yubihsm_pkcs11.dll %SIGNCMD% yubihsm-shell-x86\bin\ykhsmauth.dll %SIGNCMD% /d "YubiHSM Authenication" yubihsm-shell-x86\bin\yubihsm-auth.exe %SIGNCMD% /d "YubiHSM Shell" yubihsm-shell-x86\bin\yubihsm-shell.exe