wget, https and certificates
Dave Higton (1515) 3526 posts |
In case this helps anyone… On realising that wget would work very well with https, except that it doesn’t know where to find the CertData file, I did a bit of digging. I found that setting the environment variable SSL_CERT_FILE to point to your CertData file allows wget to access the file. It doesn’t require adding anything to the wget command line, it doesn’t require certificate chain checking to be turned off, and it should work regardless of what wget is being asked to access. The best setting, for a standard setup of RISC OS, appears to be:
I’ve added the line to my Internet.!Boot file. |
Steve Pampling (1551) 8170 posts |
In view of the shift to things secure that probably needs rewording to “In case this helps everyone…” or even “This should help everyone” So, excellent work(again) Mr Higton.
All things considered perhaps that should be in the RO source? |
Dave Higton (1515) 3526 posts |
Thank you, Sir.
The thought had occurred to me too. |
Steve Pampling (1551) 8170 posts |
It does encourage the use of certificated links and make that easier. |
Martin Avison (27) 1494 posts |
Depends whether SSL_CERT_FILE is only used by Wget or by other things as well. |
Frank de Bruijn (160) 228 posts |
As far as I’m aware it belongs to the openssl library. |
David Pitt (3386) 1248 posts |
wget --ca-certificate=InetDbase:CertData https.... wget --ca-certificate=<CaCertificates$Dir>.ca-certificates/crt https... Rigorously tested here once. |
Ronald (387) 195 posts |
Yes atm the autobuilder wget is forced to compile with openssl. |
Chris Gransden (337) 1207 posts |
There’s an explanation of SSL_CERT_FILE and SSL_CERT_DIR here. If wget is built with gnutls then SSL_CERT_FILE has no effect. |