SSL_connect failed with error -308 when execute curl (wolfssl)

Hi,
I'm trying to get a script from githubusercontent using curl, but in SSL_connect fail with the following error.

root@OpenWrt:~# curl https://raw.githubusercontent.com/cokebar/gfwlist2dnsmasq/master/gfwlist2dnsmasq.sh -o /tmp/gfwlist2dnsmasq.sh && chmod u+x /tmp/gfwl
ist2dnsmasq.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) SSL_connect failed with error -308: error state on socket

Please help me to solve this issue
Thanks in advance

Post the output:

ubus call system board; \
opkg list-installed | grep -e ^ca- -e curl -e mbedtls -e wolfssl
3 Likes

Thanks for your reply
Output is like the following

root@OpenWrt:~# ubus call system board;
{
	"kernel": "5.4.87",
	"hostname": "OpenWrt",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "Xiaomi Redmi Router AC2100",
	"board_name": "xiaomi,redmi-router-ac2100",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"revision": "r15481-7e4f055990",
		"target": "ramips/mt7621",
		"description": "OpenWrt SNAPSHOT r15481-7e4f055990"
	}
}

root@OpenWrt:~# opkg list-installed | grep -e ^ca- -e curl -e mbedtls -e wolfssl
ca-bundle - 20200601-1
ca-certificates - 20200601-1
curl - 7.74.0-1
libcurl4 - 7.74.0-1
libustream-wolfssl20201210 - 2020-12-10-68d09243-1
libwolfssl24 - 4.6.0-stable-1
wpad-basic-wolfssl - 2020-06-08-5a8b3662-23
1 Like

The error is coming from the wolfssl SSL library. But hard to figure out why there would be something strange with socket communications. I would assume that any generic error would materialize for others, too.

Are you using any special firewall, proxy, cache or similar, which might affect the https connections?

2 Likes

Thanks for your reply

I just found that this issue was generated because the ip in /etc/hosts which I copied /etc/hosts from another site, to solve the previous issue, was wrong.
I revised the ip in /etc/hosts, then this issue doesn't appear anymore.

1 Like

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.