Topic: error -311: unkown type in record hdr

This is my first attempt in SSL world. My software is server side using wolfSSLv23_server_method and client is FireFox 99.0 (locahost/version).

SSL initialization seems OK but at first 'SSL_read', I got -311 error (unkown type in record hdr)

What could be origin of this error: compatibility problem between client and server,  ???

2022-04-07 15:27:14.975 0367:main SDStransfer_v4a © 2019-2022 Altech
2022-04-07 15:27:15.015 1367:_SSLinit CA cert: >./certs/ca-cert.pem<
2022-04-07 15:27:15.022 1368:_SSLinit SVR cert: >./certs/server-cert.pem<
2022-04-07 15:27:15.029 1369:_SSLinit KEY cert: >./certs/server-key.pem<
2022-04-07 15:27:15.036 1302:SSLcontext wolfSSL_CTX_new OK >wolfSSLv23_server_method<
2022-04-07 15:27:15.044 1307:SSLcontext wolfSSL_CTX_load_verify_locations OK >./certs/ca-cert.pem<
2022-04-07 15:27:15.054 1321:SSLcontext wolfSSL_CTX_use_certificate_file OK >./certs/server-cert.pem<
2022-04-07 15:27:15.062 1327:SSLcontext wolfSSL_CTX_use_PrivateKey_file OK >./certs/server-key.pem<
2022-04-07 15:27:15.071 0177:MBD_associate Read all tables from >WebService.ini<
2022-04-07 15:27:15.079 0190:MBD_associate Config file >WebService.ini< to be opened
2022-04-07 15:27:15.089 0193:MBD_associate Config file >WebService.ini< opened
2022-04-07 15:27:15.095 0305:MBD_associate End of association
2022-04-07 15:27:15.103 2173:verifySigQuit CreateEvent (000002cc)
2022-04-07 15:27:15.109 0202:TZ_init Local hour: GMT+1
2022-04-07 15:27:15.116 0877:sendSDSbegin Create COM Mutex [02D0]
2022-04-07 15:27:15.128 0196:SER_open Serial Open: COM3 (9600) --> >FFFFFFFF<
2022-04-07 15:27:15.129 0033:ws_bind Waiting for incoming connections...
2022-04-07 15:27:19.973 1040:fs_open New endpoint [127.0.0.1:64882] socket >736<
2022-04-07 15:27:20.190 1224:webServ_Thread wolfSSL_read failed (-311) >unknown type in record hdr<

Share

Re: error -311: unkown type in record hdr

Hi altech,

First, if you are not on the latest wolfSSL version (5.2.0), please try upgrading and let me know if it helps.
If not, can you share your user_settings.h?

UNKNOWN_RECORD_TYPE means we did not recognize the type in the record header, most likely you are not enabling support for the TLS version Firefox is trying to use, which is most likely TLS 1.3.
To enable TLS 1.3 support, make sure you have the following defined:

#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define HAVE_SUPPORTED_CURVES
#define HAVE_HKDF

Thanks,
Kareem
wolfSSL Support

Share