Wget error:Connection error: Invalid SSL certificate

I changed openwrt opkg sources to a local mirror, but update fails.
when test with wget in terminal, it shows ssl certificate error.why?

wget https://mirrors.bfsu.edu.cn/openwrt/releases/21.02.0/targets/ath79/generic/packages/Pack
ages.gz
Downloading 'https://mirrors.bfsu.edu.cn/openwrt/releases/21.02.0/targets/ath79/generic/packages/Packages.gz'
Connecting to 2001:da8:20f:4435:4adf:37ff:fe55:2840:443
Connection error: Invalid SSL certificate
1 Like

hope this will help ,
I had the same problem , wget and opkg update failed too.

then I found my system time in openwrt is not right
so i sync it like this

ntpd -p asia.pool.ntp.org

wait one minute ,then the system time is right
and wget or opkg update again
success.
the problem is solved

3 Likes

I just had the same issue on two different routers running OpenWRT 23.05.2
Both had a 50+ days uptime.
Both were connected to the Internet
Both had ntpd running
Both had their clock set as January 2024 instead of March 12th, 2024.
In both cases, issuing the command /etc/init.d/sysntpd restart fixed the problem.

Which leads me to the question, why wasn't time being synced properly?

relevant info from /etc/config/system:

config system
        option zonename 'America/Toronto'
        option timezone 'EST5EDT,M3.2.0,M11.1.0'

config timeserver 'ntp'
        list server '0.openwrt.pool.ntp.org'
        list server '1.openwrt.pool.ntp.org'
        list server '2.openwrt.pool.ntp.org'
        list server '3.openwrt.pool.ntp.org'