ithewei / libhv

🔥 比libevent/libuv/asio更易用的网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT client/server.

Home Page:https://github.com/ithewei/libhv/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web server handshake error

KARTES25 opened this issue · comments

net::ERR_SSL_BAD_RECORD_MAC_ALERT

OPENSSL_VERSION = 1.0.2l

web server has launched with option (worker_threads = 8)

at the page loading stage, after several page refresh calls, the server generates the error SSL_ERROR_BAD_MAC_ALERT

image

I got the same issue.
Reproducing:

  1. Put to static folder my SPA (about 20 items - fonts, js bundles, icons)
  2. Compile server WITH_OPENSSL
  3. Launch server (httpd example) with1 process and 8 threads
  4. Hold ctrl+R in browser (chrome/mozilla) for simulate much requests to static and dynamic routes
  5. Get bad mac alert error in browser

I suppose, there is mistake in nio.c which corrupts openssl ctx buffer. But i'm not shure

I got the same issue. Reproducing:

  1. Put to static folder my SPA (about 20 items - fonts, js bundles, icons)
  2. Compile server WITH_OPENSSL
  3. Launch server (httpd example) with1 process and 8 threads
  4. Hold ctrl+R in browser (chrome/mozilla) for simulate much requests to static and dynamic routes
  5. Get bad mac alert error in browser

I suppose, there is mistake in nio.c which corrupts openssl ctx buffer. But i'm not shure

Also openssl version < 1.1.0?
I tested like this, used openssl 1.1.1, but no question.
Launch server (httpd example) with1 process and 8 threads

wrk -c 100 https://127.0.0.1:8443/
ab -n 1000 https://127.0.0.1:8443/

Hi! I've tryied both 1.1.1 and 3 versions. Results on the screenshot
image

With this versions server works more robust and processing all my requests from browser without issues.