Discussion:
Building asio on OpenBSD: Builds must preclude SSLv3_method() etc. use., can you please add a way for that
(too old to reply)
Tinker
2017-03-14 04:36:29 UTC
Permalink
Hi!

I am building asio on OpenBSD.

The build command is "CC=egcc CXX=eg++ ./configure; make".

asio-1.10.6.tar.gz presumes that OpenSSL exports SSLv3 primitives (that
is SSLv3_method(), SSLv3_client_method(), SSLv3_server_method() ).

SSLv3 is unsafe, and therefore OpenBSD's security-enhanced, OS-bundled
OpenSSL variant (named LibreSSL) does not include these primitives, and
for that reason the asio build fails.


The best thing would be if asio would autodetect that those primitives
are unavailable at ./configure time, and then not use them, by
internally introducing a OPENSSL_NO_SSL3 define, or alike.

This seems to be the first effort on the mailing list to build asio on
OpenBSD ( https://sourceforge.net/p/asio/mailman/search/?q=openbsd ),
great!

Can you please suggest how to proceed?

Thanks,
Tinker

$ make
Making all in include
Making all in src
Making all in examples/cpp03
depbase=`echo ssl/client.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; eg++
-DPACKAGE_NAME=\"asio\" -DPACKAGE_TARNAME=\"asio\"
-DPACKAGE_VERSION=\"1.10.6\" -DPACKAGE_STRING=\"asio\ 1.10.6\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"asio\"
-DVERSION=\"1.10.6\" -D_REENTRANT=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -I.
-I./../../../include -lpthread -ftemplate-depth-256 -MT ssl/client.o -MD
-MP -MF $depbase.Tpo -c -o ssl/client.o ssl/client.cpp && mv -f
$depbase.Tpo $depbase.Po
In file included from ./../../../include/asio/ssl/context.hpp:784:0,
from ./../../../include/asio/ssl.hpp:19,
from ssl/client.cpp:15:
./../../../include/asio/ssl/impl/context.ipp: In constructor
'asio::ssl::context::context(asio::ssl::context_base::method)':
./../../../include/asio/ssl/impl/context.ipp:92:29: error:
'::SSLv3_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_method());
^
./../../../include/asio/ssl/impl/context.ipp:95:29: error:
'::SSLv3_client_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_client_method());
^
./../../../include/asio/ssl/impl/context.ipp:98:29: error:
'::SSLv3_server_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_server_method());


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Tinker
2017-03-14 04:47:46 UTC
Permalink
Hi,

I removed all the "v3"-specific stuff from
include/asio/ssl/impl/context.ipp and
include/asio/ssl/old/detail/openssl_context_service.hpp , and switched
build command to "CC=egcc CXX=eg++ CXXFLAGS="-pthread" ./configure;
make", and the build now completes.

I furthermore add "--prefix="$HOME/build/"" to ./configure to see what
files are actually built.

Doing "make install" only gives me header files, no library files. A
list of all the files in my $HOME/build is attached below.

Is this how it's supposed to be?

Tinker

/
/include
/include/asio
/include/asio/detail
/include/asio/detail/impl
/include/asio/detail/impl/buffer_sequence_adapter.ipp
/include/asio/detail/impl/descriptor_ops.ipp
/include/asio/detail/impl/dev_poll_reactor.hpp
/include/asio/detail/impl/dev_poll_reactor.ipp
/include/asio/detail/impl/epoll_reactor.hpp
/include/asio/detail/impl/epoll_reactor.ipp
/include/asio/detail/impl/eventfd_select_interrupter.ipp
/include/asio/detail/impl/handler_tracking.ipp
/include/asio/detail/impl/kqueue_reactor.hpp
/include/asio/detail/impl/kqueue_reactor.ipp
/include/asio/detail/impl/pipe_select_interrupter.ipp
/include/asio/detail/impl/posix_event.ipp
/include/asio/detail/impl/posix_mutex.ipp
/include/asio/detail/impl/posix_thread.ipp
/include/asio/detail/impl/posix_tss_ptr.ipp
/include/asio/detail/impl/resolver_service_base.ipp
/include/asio/detail/impl/reactive_descriptor_service.ipp
/include/asio/detail/impl/reactive_serial_port_service.ipp
/include/asio/detail/impl/reactive_socket_service_base.ipp
/include/asio/detail/impl/select_reactor.hpp
/include/asio/detail/impl/select_reactor.ipp
/include/asio/detail/impl/service_registry.hpp
/include/asio/detail/impl/service_registry.ipp
/include/asio/detail/impl/signal_set_service.ipp
/include/asio/detail/impl/socket_ops.ipp
/include/asio/detail/impl/socket_select_interrupter.ipp
/include/asio/detail/impl/strand_service.hpp
/include/asio/detail/impl/strand_service.ipp
/include/asio/detail/impl/task_io_service.hpp
/include/asio/detail/impl/task_io_service.ipp
/include/asio/detail/impl/throw_error.ipp
/include/asio/detail/impl/timer_queue_ptime.ipp
/include/asio/detail/impl/timer_queue_set.ipp
/include/asio/detail/impl/win_event.ipp
/include/asio/detail/impl/win_iocp_handle_service.ipp
/include/asio/detail/impl/win_iocp_io_service.hpp
/include/asio/detail/impl/win_iocp_io_service.ipp
/include/asio/detail/impl/win_iocp_serial_port_service.ipp
/include/asio/detail/impl/win_iocp_socket_service_base.ipp
/include/asio/detail/impl/win_mutex.ipp
/include/asio/detail/impl/win_object_handle_service.ipp
/include/asio/detail/impl/winrt_ssocket_service_base.ipp
/include/asio/detail/impl/winrt_timer_scheduler.hpp
/include/asio/detail/impl/winrt_timer_scheduler.ipp
/include/asio/detail/impl/winsock_init.ipp
/include/asio/detail/impl/win_static_mutex.ipp
/include/asio/detail/impl/win_thread.ipp
/include/asio/detail/impl/win_tss_ptr.ipp
/include/asio/detail/addressof.hpp
/include/asio/detail/array_fwd.hpp
/include/asio/detail/array.hpp
/include/asio/detail/assert.hpp
/include/asio/detail/atomic_count.hpp
/include/asio/detail/base_from_completion_cond.hpp
/include/asio/detail/bind_handler.hpp
/include/asio/detail/buffered_stream_storage.hpp
/include/asio/detail/buffer_resize_guard.hpp
/include/asio/detail/buffer_sequence_adapter.hpp
/include/asio/detail/call_stack.hpp
/include/asio/detail/chrono_time_traits.hpp
/include/asio/detail/completion_handler.hpp
/include/asio/detail/config.hpp
/include/asio/detail/consuming_buffers.hpp
/include/asio/detail/cstdint.hpp
/include/asio/detail/event.hpp
/include/asio/detail/date_time_fwd.hpp
/include/asio/detail/deadline_timer_service.hpp
/include/asio/detail/dependent_type.hpp
/include/asio/detail/descriptor_ops.hpp
/include/asio/detail/descriptor_read_op.hpp
/include/asio/detail/descriptor_write_op.hpp
/include/asio/detail/dev_poll_reactor.hpp
/include/asio/detail/epoll_reactor.hpp
/include/asio/detail/eventfd_select_interrupter.hpp
/include/asio/detail/fd_set_adapter.hpp
/include/asio/detail/fenced_block.hpp
/include/asio/detail/function.hpp
/include/asio/detail/gcc_arm_fenced_block.hpp
/include/asio/detail/gcc_hppa_fenced_block.hpp
/include/asio/detail/gcc_sync_fenced_block.hpp
/include/asio/detail/gcc_x86_fenced_block.hpp
/include/asio/detail/handler_alloc_helpers.hpp
/include/asio/detail/handler_cont_helpers.hpp
/include/asio/detail/handler_invoke_helpers.hpp
/include/asio/detail/handler_tracking.hpp
/include/asio/detail/handler_type_requirements.hpp
/include/asio/detail/hash_map.hpp
/include/asio/detail/io_control.hpp
/include/asio/detail/keyword_tss_ptr.hpp
/include/asio/detail/kqueue_reactor.hpp
/include/asio/detail/limits.hpp
/include/asio/detail/local_free_on_block_exit.hpp
/include/asio/detail/macos_fenced_block.hpp
/include/asio/detail/mutex.hpp
/include/asio/detail/noncopyable.hpp
/include/asio/detail/null_event.hpp
/include/asio/detail/null_fenced_block.hpp
/include/asio/detail/null_mutex.hpp
/include/asio/detail/null_reactor.hpp
/include/asio/detail/null_signal_blocker.hpp
/include/asio/detail/null_socket_service.hpp
/include/asio/detail/null_static_mutex.hpp
/include/asio/detail/null_thread.hpp
/include/asio/detail/null_tss_ptr.hpp
/include/asio/detail/object_pool.hpp
/include/asio/detail/old_win_sdk_compat.hpp
/include/asio/detail/operation.hpp
/include/asio/detail/op_queue.hpp
/include/asio/detail/pipe_select_interrupter.hpp
/include/asio/detail/pop_options.hpp
/include/asio/detail/posix_event.hpp
/include/asio/detail/posix_fd_set_adapter.hpp
/include/asio/detail/posix_mutex.hpp
/include/asio/detail/posix_signal_blocker.hpp
/include/asio/detail/posix_static_mutex.hpp
/include/asio/detail/reactor.hpp
/include/asio/detail/posix_thread.hpp
/include/asio/detail/posix_tss_ptr.hpp
/include/asio/detail/push_options.hpp
/include/asio/detail/reactive_descriptor_service.hpp
/include/asio/detail/reactive_null_buffers_op.hpp
/include/asio/detail/reactive_serial_port_service.hpp
/include/asio/detail/reactive_socket_accept_op.hpp
/include/asio/detail/reactive_socket_connect_op.hpp
/include/asio/detail/reactive_socket_recvfrom_op.hpp
/include/asio/detail/reactive_socket_recvmsg_op.hpp
/include/asio/detail/reactive_socket_recv_op.hpp
/include/asio/detail/reactive_socket_send_op.hpp
/include/asio/detail/reactive_socket_sendto_op.hpp
/include/asio/detail/reactor_fwd.hpp
/include/asio/detail/reactive_socket_service_base.hpp
/include/asio/detail/reactive_socket_service.hpp
/include/asio/detail/reactor_op.hpp
/include/asio/detail/reactor_op_queue.hpp
/include/asio/detail/regex_fwd.hpp
/include/asio/detail/resolve_endpoint_op.hpp
/include/asio/detail/resolve_op.hpp
/include/asio/detail/resolver_service_base.hpp
/include/asio/detail/resolver_service.hpp
/include/asio/detail/scoped_lock.hpp
/include/asio/detail/scoped_ptr.hpp
/include/asio/detail/select_interrupter.hpp
/include/asio/detail/select_reactor.hpp
/include/asio/detail/service_registry.hpp
/include/asio/detail/shared_ptr.hpp
/include/asio/detail/signal_blocker.hpp
/include/asio/detail/signal_handler.hpp
/include/asio/detail/signal_init.hpp
/include/asio/detail/signal_op.hpp
/include/asio/detail/signal_set_service.hpp
/include/asio/detail/socket_holder.hpp
/include/asio/detail/socket_ops.hpp
/include/asio/detail/socket_option.hpp
/include/asio/detail/socket_select_interrupter.hpp
/include/asio/detail/socket_types.hpp
/include/asio/detail/solaris_fenced_block.hpp
/include/asio/detail/static_mutex.hpp
/include/asio/detail/std_event.hpp
/include/asio/detail/std_mutex.hpp
/include/asio/detail/std_static_mutex.hpp
/include/asio/detail/std_thread.hpp
/include/asio/detail/strand_service.hpp
/include/asio/detail/task_io_service.hpp
/include/asio/detail/task_io_service_operation.hpp
/include/asio/detail/thread.hpp
/include/asio/detail/task_io_service_thread_info.hpp
/include/asio/detail/thread_info_base.hpp
/include/asio/detail/throw_error.hpp
/include/asio/detail/throw_exception.hpp
/include/asio/detail/timer_queue_base.hpp
/include/asio/detail/timer_queue.hpp
/include/asio/detail/timer_queue_ptime.hpp
/include/asio/detail/timer_queue_set.hpp
/include/asio/detail/timer_scheduler_fwd.hpp
/include/asio/detail/timer_scheduler.hpp
/include/asio/detail/tss_ptr.hpp
/include/asio/detail/type_traits.hpp
/include/asio/detail/variadic_templates.hpp
/include/asio/detail/wait_handler.hpp
/include/asio/detail/wait_op.hpp
/include/asio/detail/weak_ptr.hpp
/include/asio/detail/wince_thread.hpp
/include/asio/detail/win_event.hpp
/include/asio/detail/win_fd_set_adapter.hpp
/include/asio/detail/win_fenced_block.hpp
/include/asio/detail/win_iocp_handle_read_op.hpp
/include/asio/detail/win_iocp_handle_service.hpp
/include/asio/detail/win_iocp_handle_write_op.hpp
/include/asio/detail/win_iocp_io_service.hpp
/include/asio/detail/win_iocp_null_buffers_op.hpp
/include/asio/detail/win_iocp_operation.hpp
/include/asio/detail/win_iocp_overlapped_op.hpp
/include/asio/detail/win_iocp_overlapped_ptr.hpp
/include/asio/detail/win_iocp_serial_port_service.hpp
/include/asio/detail/win_iocp_socket_accept_op.hpp
/include/asio/detail/win_iocp_socket_connect_op.hpp
/include/asio/detail/win_iocp_socket_recv_op.hpp
/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
/include/asio/detail/win_iocp_socket_send_op.hpp
/include/asio/detail/win_iocp_socket_service_base.hpp
/include/asio/detail/win_iocp_socket_service.hpp
/include/asio/detail/win_iocp_thread_info.hpp
/include/asio/detail/win_mutex.hpp
/include/asio/detail/win_object_handle_service.hpp
/include/asio/detail/winrt_async_manager.hpp
/include/asio/detail/winrt_async_op.hpp
/include/asio/detail/winrt_resolve_op.hpp
/include/asio/detail/winrt_resolver_service.hpp
/include/asio/detail/winrt_socket_connect_op.hpp
/include/asio/detail/winrt_socket_recv_op.hpp
/include/asio/detail/winrt_socket_send_op.hpp
/include/asio/detail/winrt_ssocket_service_base.hpp
/include/asio/detail/winrt_ssocket_service.hpp
/include/asio/detail/winrt_timer_scheduler.hpp
/include/asio/detail/winrt_utils.hpp
/include/asio/detail/winsock_init.hpp
/include/asio/detail/win_static_mutex.hpp
/include/asio/detail/win_thread.hpp
/include/asio/detail/win_tss_ptr.hpp
/include/asio/detail/wrapped_handler.hpp
/include/asio/async_result.hpp
/include/asio/basic_datagram_socket.hpp
/include/asio/basic_deadline_timer.hpp
/include/asio/basic_io_object.hpp
/include/asio/basic_raw_socket.hpp
/include/asio/basic_seq_packet_socket.hpp
/include/asio/basic_serial_port.hpp
/include/asio/basic_signal_set.hpp
/include/asio/basic_socket_acceptor.hpp
/include/asio/basic_socket.hpp
/include/asio/basic_socket_iostream.hpp
/include/asio/basic_socket_streambuf.hpp
/include/asio/basic_streambuf_fwd.hpp
/include/asio/basic_streambuf.hpp
/include/asio/windows
/include/asio/windows/basic_handle.hpp
/include/asio/windows/basic_object_handle.hpp
/include/asio/windows/basic_random_access_handle.hpp
/include/asio/windows/basic_stream_handle.hpp
/include/asio/windows/object_handle.hpp
/include/asio/windows/object_handle_service.hpp
/include/asio/windows/overlapped_ptr.hpp
/include/asio/windows/random_access_handle.hpp
/include/asio/windows/random_access_handle_service.hpp
/include/asio/windows/stream_handle.hpp
/include/asio/windows/stream_handle_service.hpp
/include/asio/basic_stream_socket.hpp
/include/asio/basic_waitable_timer.hpp
/include/asio/buffered_read_stream_fwd.hpp
/include/asio/buffered_read_stream.hpp
/include/asio/buffered_stream_fwd.hpp
/include/asio/buffered_stream.hpp
/include/asio/buffered_write_stream_fwd.hpp
/include/asio/buffered_write_stream.hpp
/include/asio/buffer.hpp
/include/asio/buffers_iterator.hpp
/include/asio/completion_condition.hpp
/include/asio/connect.hpp
/include/asio/coroutine.hpp
/include/asio/datagram_socket_service.hpp
/include/asio/deadline_timer.hpp
/include/asio/deadline_timer_service.hpp
/include/asio/error_code.hpp
/include/asio/error.hpp
/include/asio/handler_alloc_hook.hpp
/include/asio/handler_continuation_hook.hpp
/include/asio/handler_invoke_hook.hpp
/include/asio/handler_type.hpp
/include/asio/high_resolution_timer.hpp
/include/asio/io_service.hpp
/include/asio/is_read_buffered.hpp
/include/asio/is_write_buffered.hpp
/include/asio/generic
/include/asio/generic/detail
/include/asio/generic/detail/endpoint.hpp
/include/asio/generic/detail/impl
/include/asio/generic/detail/impl/endpoint.ipp
/include/asio/generic/basic_endpoint.hpp
/include/asio/generic/datagram_protocol.hpp
/include/asio/generic/raw_protocol.hpp
/include/asio/generic/seq_packet_protocol.hpp
/include/asio/generic/stream_protocol.hpp
/include/asio/local
/include/asio/local/basic_endpoint.hpp
/include/asio/local/connect_pair.hpp
/include/asio/local/datagram_protocol.hpp
/include/asio/local/stream_protocol.hpp
/include/asio/local/detail
/include/asio/local/detail/impl
/include/asio/local/detail/impl/endpoint.ipp
/include/asio/local/detail/endpoint.hpp
/include/asio/placeholders.hpp
/include/asio/raw_socket_service.hpp
/include/asio/read_at.hpp
/include/asio/read.hpp
/include/asio/read_until.hpp
/include/asio/seq_packet_socket_service.hpp
/include/asio/ssl.hpp
/include/asio/serial_port_base.hpp
/include/asio/serial_port.hpp
/include/asio/serial_port_service.hpp
/include/asio/signal_set.hpp
/include/asio/signal_set_service.hpp
/include/asio/socket_acceptor_service.hpp
/include/asio/socket_base.hpp
/include/asio/spawn.hpp
/include/asio/steady_timer.hpp
/include/asio/strand.hpp
/include/asio/streambuf.hpp
/include/asio/stream_socket_service.hpp
/include/asio/system_error.hpp
/include/asio/system_timer.hpp
/include/asio/thread.hpp
/include/asio/time_traits.hpp
/include/asio/unyield.hpp
/include/asio/use_future.hpp
/include/asio/version.hpp
/include/asio/ssl
/include/asio/ssl/impl
/include/asio/ssl/impl/context.hpp
/include/asio/ssl/impl/context.ipp
/include/asio/ssl/impl/error.ipp
/include/asio/ssl/impl/rfc2818_verification.ipp
/include/asio/ssl/impl/src.hpp
/include/asio/ssl/detail
/include/asio/ssl/detail/buffered_handshake_op.hpp
/include/asio/ssl/detail/engine.hpp
/include/asio/ssl/detail/handshake_op.hpp
/include/asio/ssl/detail/io.hpp
/include/asio/ssl/detail/openssl_init.hpp
/include/asio/ssl/detail/openssl_types.hpp
/include/asio/ssl/detail/password_callback.hpp
/include/asio/ssl/detail/read_op.hpp
/include/asio/ssl/detail/shutdown_op.hpp
/include/asio/ssl/detail/stream_core.hpp
/include/asio/ssl/detail/verify_callback.hpp
/include/asio/ssl/detail/write_op.hpp
/include/asio/ssl/detail/impl
/include/asio/ssl/detail/impl/engine.ipp
/include/asio/ssl/detail/impl/openssl_init.ipp
/include/asio/ssl/old
/include/asio/ssl/old/basic_context.hpp
/include/asio/ssl/old/context_service.hpp
/include/asio/ssl/old/stream.hpp
/include/asio/ssl/old/stream_service.hpp
/include/asio/ssl/old/detail
/include/asio/ssl/old/detail/openssl_context_service.hpp
/include/asio/ssl/old/detail/openssl_operation.hpp
/include/asio/ssl/old/detail/openssl_stream_service.hpp
/include/asio/ssl/basic_context.hpp
/include/asio/ssl/context_base.hpp
/include/asio/ssl/context.hpp
/include/asio/ssl/context_service.hpp
/include/asio/ssl/error.hpp
/include/asio/ssl/rfc2818_verification.hpp
/include/asio/ssl/stream_base.hpp
/include/asio/ssl/stream.hpp
/include/asio/ssl/stream_service.hpp
/include/asio/ssl/verify_context.hpp
/include/asio/ssl/verify_mode.hpp
/include/asio/waitable_timer_service.hpp
/include/asio/wait_traits.hpp
/include/asio/write_at.hpp
/include/asio/write.hpp
/include/asio/yield.hpp
/include/asio/impl
/include/asio/impl/buffered_read_stream.hpp
/include/asio/impl/buffered_write_stream.hpp
/include/asio/impl/connect.hpp
/include/asio/impl/error_code.ipp
/include/asio/impl/error.ipp
/include/asio/impl/handler_alloc_hook.ipp
/include/asio/impl/io_service.hpp
/include/asio/impl/io_service.ipp
/include/asio/impl/read_at.hpp
/include/asio/impl/read.hpp
/include/asio/impl/read_until.hpp
/include/asio/impl/serial_port_base.hpp
/include/asio/impl/serial_port_base.ipp
/include/asio/impl/spawn.hpp
/include/asio/impl/src.cpp
/include/asio/impl/src.hpp
/include/asio/impl/use_future.hpp
/include/asio/impl/write_at.hpp
/include/asio/impl/write.hpp
/include/asio/posix
/include/asio/posix/basic_descriptor.hpp
/include/asio/posix/basic_stream_descriptor.hpp
/include/asio/posix/descriptor_base.hpp
/include/asio/posix/stream_descriptor.hpp
/include/asio/posix/stream_descriptor_service.hpp
/include/asio/ip
/include/asio/ip/detail
/include/asio/ip/detail/impl
/include/asio/ip/detail/impl/endpoint.ipp
/include/asio/ip/detail/endpoint.hpp
/include/asio/ip/detail/socket_option.hpp
/include/asio/ip/address.hpp
/include/asio/ip/address_v4.hpp
/include/asio/ip/address_v6.hpp
/include/asio/ip/basic_endpoint.hpp
/include/asio/ip/basic_resolver_entry.hpp
/include/asio/ip/basic_resolver.hpp
/include/asio/ip/basic_resolver_iterator.hpp
/include/asio/ip/basic_resolver_query.hpp
/include/asio/ip/host_name.hpp
/include/asio/ip/icmp.hpp
/include/asio/ip/multicast.hpp
/include/asio/ip/resolver_query_base.hpp
/include/asio/ip/resolver_service.hpp
/include/asio/ip/tcp.hpp
/include/asio/ip/udp.hpp
/include/asio/ip/unicast.hpp
/include/asio/ip/v6_only.hpp
/include/asio/ip/impl
/include/asio/ip/impl/address.hpp
/include/asio/ip/impl/address.ipp
/include/asio/ip/impl/address_v4.hpp
/include/asio/ip/impl/address_v4.ipp
/include/asio/ip/impl/address_v6.hpp
/include/asio/ip/impl/address_v6.ipp
/include/asio/ip/impl/basic_endpoint.hpp
/include/asio/ip/impl/host_name.ipp
/include/asio.hpp
Post by Tinker
Hi!
I am building asio on OpenBSD.
The build command is "CC=egcc CXX=eg++ ./configure; make".
asio-1.10.6.tar.gz presumes that OpenSSL exports SSLv3 primitives
(that is SSLv3_method(), SSLv3_client_method(), SSLv3_server_method()
).
SSLv3 is unsafe, and therefore OpenBSD's security-enhanced, OS-bundled
OpenSSL variant (named LibreSSL) does not include these primitives,
and for that reason the asio build fails.
The best thing would be if asio would autodetect that those primitives
are unavailable at ./configure time, and then not use them, by
internally introducing a OPENSSL_NO_SSL3 define, or alike.
This seems to be the first effort on the mailing list to build asio on
OpenBSD ( https://sourceforge.net/p/asio/mailman/search/?q=openbsd ),
great!
Can you please suggest how to proceed?
Thanks,
Tinker
$ make
Making all in include
Making all in src
Making all in examples/cpp03
depbase=`echo ssl/client.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; eg++
-DPACKAGE_NAME=\"asio\" -DPACKAGE_TARNAME=\"asio\"
-DPACKAGE_VERSION=\"1.10.6\" -DPACKAGE_STRING=\"asio\ 1.10.6\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"asio\"
-DVERSION=\"1.10.6\" -D_REENTRANT=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -I.
-I./../../../include -lpthread -ftemplate-depth-256 -MT ssl/client.o
-MD -MP -MF $depbase.Tpo -c -o ssl/client.o ssl/client.cpp && mv -f
$depbase.Tpo $depbase.Po
In file included from ./../../../include/asio/ssl/context.hpp:784:0,
from ./../../../include/asio/ssl.hpp:19,
./../../../include/asio/ssl/impl/context.ipp: In constructor
'::SSLv3_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_method());
^
'::SSLv3_client_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_client_method());
^
'::SSLv3_server_method' has not been declared
handle_ = ::SSL_CTX_new(::SSLv3_server_method());
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
Tinker
2017-03-14 05:32:10 UTC
Permalink
One realization is that Boost bundles your asio library with it.

OpenBSD has fixes for your library bundled with it, that distro of asio
may be sufficient for many uses.

OpenBSD's patches to make Boost asio build and work are:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/boost/patches/patch-boost_asio_ssl_impl_context_ipp?rev=1.1&content-type=text/x-cvsweb-markup

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/boost/patches/patch-boost_asio_ssl_old_detail_openssl_context_service_hpp?rev=1.1&content-type=text/x-cvsweb-markup


You may want to fix asio to work on systems where OpenSSL does not
bundle SSLv3 primitives, so that third party distributions of your
library not need special patches like this.

Thanks!
Tinker
Post by Tinker
Hi,
I removed all the "v3"-specific stuff from
include/asio/ssl/impl/context.ipp and
include/asio/ssl/old/detail/openssl_context_service.hpp , and switched
build command to "CC=egcc CXX=eg++ CXXFLAGS="-pthread" ./configure;
make", and the build now completes.
I furthermore add "--prefix="$HOME/build/"" to ./configure to see what
files are actually built.
Doing "make install" only gives me header files, no library files. A
list of all the files in my $HOME/build is attached below.
Is this how it's supposed to be?
Tinker
..

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio

Loading...