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

OSX port and OpenSSL v1.1 compatibility #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

scobiej
Copy link

@scobiej scobiej commented Apr 26, 2018

Port to allow clean build on OSX
Cleanup compiler warnings on later level gcc
Clean build on CentOS7
Fix OpenSSL >= 1.1 compatibility

@oej
Copy link

oej commented Oct 6, 2020

Time to merge? :-)

@leifj leifj requested a review from fredrikt October 6, 2020 15:09
@exoosh
Copy link

exoosh commented Sep 29, 2023

I tried this out and it also works without warnings with OpenSSL 3.0.9 (Debian bookworm).

$ (rm -rf build; mkdir build && cd build && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -S .. && make)
-- The C compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info                                                                                                                                                              -- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for one of the modules 'openssl'                                                                                                                                                  -- Using OpenSSL 3.0.9
-- Configuring done
-- Generating done                                                                                                                                                                            -- Build files have been written to: /home/oschneider/pkcs11-proxy/build
/usr/bin/cmake -S/home/oschneider/pkcs11-proxy -B/home/oschneider/pkcs11-proxy/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/oschneider/pkcs11-proxy/build/CMakeFiles /home/oschneider/pkcs11-proxy/build//CMakeFiles/progress.marks                                          make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/oschneider/pkcs11-proxy/build'
make  -f CMakeFiles/pkcs11-proxy.dir/build.make CMakeFiles/pkcs11-proxy.dir/depend                                                                                                            make[2]: Entering directory '/home/oschneider/pkcs11-proxy/build'
cd /home/oschneider/pkcs11-proxy/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/oschneider/pkcs11-proxy /home/oschneider/pkcs11-proxy /home/oschneider/pkcs11-proxy/build /ho
me/oschneider/pkcs11-proxy/build /home/oschneider/pkcs11-proxy/build/CMakeFiles/pkcs11-proxy.dir/DependInfo.cmake --color=                                                                    make[2]: Leaving directory '/home/oschneider/pkcs11-proxy/build'
make  -f CMakeFiles/pkcs11-proxy.dir/build.make CMakeFiles/pkcs11-proxy.dir/build
make[2]: Entering directory '/home/oschneider/pkcs11-proxy/build'                                                                                                                             [  6%] Building C object CMakeFiles/pkcs11-proxy.dir/gck-rpc-module.c.o
/usr/bin/cc -Dpkcs11_proxy_EXPORTS  -fPIC   -Wall -MD -MT CMakeFiles/pkcs11-proxy.dir/gck-rpc-module.c.o -MF CMakeFiles/pkcs11-proxy.dir/gck-rpc-module.c.o.d -o CMakeFiles/pkcs11-proxy.dir/g
ck-rpc-module.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-module.c                                                                                                                           [ 13%] Building C object CMakeFiles/pkcs11-proxy.dir/gck-rpc-message.c.o
/usr/bin/cc -Dpkcs11_proxy_EXPORTS  -fPIC   -Wall -MD -MT CMakeFiles/pkcs11-proxy.dir/gck-rpc-message.c.o -MF CMakeFiles/pkcs11-proxy.dir/gck-rpc-message.c.o.d -o CMakeFiles/pkcs11-proxy.dir
/gck-rpc-message.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-message.c
[ 20%] Building C object CMakeFiles/pkcs11-proxy.dir/gck-rpc-util.c.o                                                                                                                         /usr/bin/cc -Dpkcs11_proxy_EXPORTS  -fPIC   -Wall -MD -MT CMakeFiles/pkcs11-proxy.dir/gck-rpc-util.c.o -MF CMakeFiles/pkcs11-proxy.dir/gck-rpc-util.c.o.d -o CMakeFiles/pkcs11-proxy.dir/gck-rpc-util.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-util.c
[ 26%] Building C object CMakeFiles/pkcs11-proxy.dir/egg-buffer.c.o
/usr/bin/cc -Dpkcs11_proxy_EXPORTS  -fPIC   -Wall -MD -MT CMakeFiles/pkcs11-proxy.dir/egg-buffer.c.o -MF CMakeFiles/pkcs11-proxy.dir/egg-buffer.c.o.d -o CMakeFiles/pkcs11-proxy.dir/egg-buffe
r.c.o -c /home/oschneider/pkcs11-proxy/egg-buffer.c
[ 33%] Building C object CMakeFiles/pkcs11-proxy.dir/gck-rpc-tls-psk.c.o
/usr/bin/cc -Dpkcs11_proxy_EXPORTS  -fPIC   -Wall -MD -MT CMakeFiles/pkcs11-proxy.dir/gck-rpc-tls-psk.c.o -MF CMakeFiles/pkcs11-proxy.dir/gck-rpc-tls-psk.c.o.d -o CMakeFiles/pkcs11-proxy.dir
/gck-rpc-tls-psk.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-tls-psk.c
[ 40%] Built target pkcs11-proxy
make  -f CMakeFiles/pkcs11-daemon.dir/build.make CMakeFiles/pkcs11-daemon.dir/depend
make[2]: Entering directory '/home/oschneider/pkcs11-proxy/build'
[ 46%] Generating syscall-names.h
cd /home/oschneider/pkcs11-proxy && /home/oschneider/pkcs11-proxy/mksyscalls.sh
cd /home/oschneider/pkcs11-proxy/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/oschneider/pkcs11-proxy /home/oschneider/pkcs11-proxy /home/oschneider/pkcs11-proxy/build /home/oschneider/pkcs11-proxy/build /home/oschneider/pkcs11-proxy/build/CMakeFiles/pkcs11-daemon.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/oschneider/pkcs11-proxy/build'
make  -f CMakeFiles/pkcs11-daemon.dir/build.make CMakeFiles/pkcs11-daemon.dir/build
make[2]: Entering directory '/home/oschneider/pkcs11-proxy/build'
[ 53%] Building C object CMakeFiles/pkcs11-daemon.dir/egg-buffer.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/egg-buffer.c.o -MF CMakeFiles/pkcs11-daemon.dir/egg-buffer.c.o.d -o CMakeFiles/pkcs11-daemon.dir/egg-buffer.c.o -c /home/oschneider/pkcs11-proxy/egg-buffer.c
[ 60%] Building C object CMakeFiles/pkcs11-daemon.dir/gck-rpc-daemon-standalone.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/gck-rpc-daemon-standalone.c.o -MF CMakeFiles/pkcs11-daemon.dir/gck-rpc-daemon-standalone.c.o.d -o CMakeFiles/pkcs11-daemon.dir/gck-rpc-daemon-standalone.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-daemon-standalone.c
[ 66%] Building C object CMakeFiles/pkcs11-daemon.dir/gck-rpc-dispatch.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/gck-rpc-dispatch.c.o -MF CMakeFiles/pkcs11-daemon.dir/gck-rpc-dispatch.c.o.d -o CMakeFiles/pkcs11-daemon.dir/gck-rpc-dispatch.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-dispatch.c
[ 73%] Building C object CMakeFiles/pkcs11-daemon.dir/gck-rpc-message.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/gck-rpc-message.c.o -MF CMakeFiles/pkcs11-daemon.dir/gck-rpc-message.c.o.d -o CMakeFiles/pkcs11-daemon.dir/gck-rpc-message.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-message.c
[ 80%] Building C object CMakeFiles/pkcs11-daemon.dir/gck-rpc-util.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/gck-rpc-util.c.o -MF CMakeFiles/pkcs11-daemon.dir/gck-rpc-util.c.o.d -o CMakeFiles/pkcs11-daemon.dir/gck-rpc-util.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-util.c
[ 86%] Building C object CMakeFiles/pkcs11-daemon.dir/syscall-reporter.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/syscall-reporter.c.o -MF CMakeFiles/pkcs11-daemon.dir/syscall-reporter.c.o.d -o CMakeFiles/pkcs11-daemon.dir/syscall-reporter.c.o -c /home/oschneider/pkcs11-proxy/syscall-reporter.c
[ 93%] Building C object CMakeFiles/pkcs11-daemon.dir/gck-rpc-tls-psk.c.o
/usr/bin/cc   -Wall -MD -MT CMakeFiles/pkcs11-daemon.dir/gck-rpc-tls-psk.c.o -MF CMakeFiles/pkcs11-daemon.dir/gck-rpc-tls-psk.c.o.d -o CMakeFiles/pkcs11-daemon.dir/gck-rpc-tls-psk.c.o -c /home/oschneider/pkcs11-proxy/gck-rpc-tls-psk.c
[100%] Linking C executable pkcs11-daemon
/usr/bin/cmake -E cmake_link_script CMakeFiles/pkcs11-daemon.dir/link.txt --verbose=1
/usr/bin/cc -rdynamic "CMakeFiles/pkcs11-daemon.dir/egg-buffer.c.o" "CMakeFiles/pkcs11-daemon.dir/gck-rpc-daemon-standalone.c.o" "CMakeFiles/pkcs11-daemon.dir/gck-rpc-dispatch.c.o" "CMakeFiles/pkcs11-daemon.dir/gck-rpc-message.c.o" "CMakeFiles/pkcs11-daemon.dir/gck-rpc-util.c.o" "CMakeFiles/pkcs11-daemon.dir/syscall-reporter.c.o" "CMakeFiles/pkcs11-daemon.dir/gck-rpc-tls-psk.c.o" -o pkcs11-daemon  -ldl -lpthread -lssl -lcrypto -lseccomp
make[2]: Leaving directory '/home/oschneider/pkcs11-proxy/build'
[100%] Built target pkcs11-daemon
make[1]: Leaving directory '/home/oschneider/pkcs11-proxy/build'
/usr/bin/cmake -E cmake_progress_start /home/oschneider/pkcs11-proxy/build/CMakeFiles 0

Somehow the Using OpenSSL 3.0.9 from the message (which I see when editing it) disappears once I update the comment. So that's the exact version in my case.

@ale-rinaldi
Copy link

This still works, even with OpenSSL 3.3.0! I'd love to have it merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants