vitakot
vitakot

Reputation: 3844

Local HTTPS server on Android - using a dh file

I use OpenSSL to establish a secured connection with my local HTTPS server. The server is really simple as I basically used the Boost Asio example but only improved a bit.

The solution works on Win7 64b using OpenSSL-Win32 and the certificates which comes with installer downloaded here.

I have ported the solution on Android. The Android OpenSSL port is from here.

Everything works fine until the use_tmp_dh_file method is called:

_context.use_tmp_dh_file("/sdcard/Download/PEM/dh512.pem");

It always ends up with the Fatal signal 11 (SIGSEGV) at 0x00000014 (code=1) error.

I use certificates server.pem and dh512.pem from the /apps folder of Android OpenSSL port.

Does anybody have an idea what is wrong?

EDIT:

Using a dh file is not mandatory, it works without it, but I am only a one step further because now it fails when starting handshake:

boost::system::error_code error;
socket.handshake(boost::asio::ssl::stream_base::server, error);

Where socket is instance of:

typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sslSocket;

It ends up with the same error as above. It seems to be an Android OpenSSL-Boost ASIO issue.

Upvotes: 1

Views: 201

Answers (1)

vitakot
vitakot

Reputation: 3844

The answer on this particular question is short and simple, but it was quite hard to find it. The native library implementing my HTTPS server was interfering with the other native library using OpenSSL as well.

Upvotes: 1

Related Questions