Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

HTTPS Error: SSL_connect - SSL_ERROR_SYSCALL

Hello,
we tried to update to Mongoose 6.9 and can't get further than the TLS handshake.

I have compiled your example "simplest_web_server_ssl" to except an error in our wrapper library, but with the running example we get the same error.

I tested it with cURL in the following versions / combinations:

curl 7.55.0 (x86_64-w64-mingw32) libcurl/7.55.0 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1
curl 7.56.0 (i386-pc-win32) libcurl/7.56.0 OpenSSL/1.0.2e zlib/1.2.8

And tried compiling mongoose and the example with the following OpenSSL versions:

OpenSSL 1.0.2f  28 Jan 2016
OpenSSL 1.0.2l  25 May 2017

The error cURL gives is always:

$ curl -v -k https://127.0.0.1:8443
* Rebuilt URL to: https://127.0.0.1:8443/
* timeout on name lookup is not supported
*   Trying 127.0.0.1...
* TCP_NODELAY set
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 127.0.0.1:8443
* stopped the pause stream!
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 127.0.0.1:8443

Nevermind if we use our self-sigend certificate or that one that is deployed with your example.

We tried to debug the error and came to mongoose.c:4341

res = server_side ? SSL_accept(ctx->ssl) : SSL_connect(ctx->ssl);

Which has server_side = 1 so uses the SSL_accept function. After that it triggers the SSL error.

Can you help out, what the problem is and how we can get this working again? Are there any other informations i could provide which could help out?

It worked before with mongoose version 6.6.

Kind regards,
Marcel Wirtz
MIDAN SOFTWARE GmbH

Comments

Sign In or Register to comment.