NCAR / python-tutorial

Online content for self-paced Python tutorial
https://ncar.github.io/python-tutorial/
2 stars 7 forks source link

Step 7: invalid certificate? #26

Closed mnlevy1981 closed 4 years ago

mnlevy1981 commented 4 years ago

Trying to get to step 8 to see what #18 looked like, I ran into an issue getting the data:

$ curl -O https://sundowner.colorado.edu/weather/atoc8/wxobs20170821.txt
  % 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: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.

This is probably an issue with how the CU server is configured; following the suggestion in the error message, I ran

$ curl -kO https://sundowner.colorado.edu/weather/atoc8/wxobs20170821.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  116k  100  116k    0     0   442k      0 --:--:-- --:--:-- --:--:--  444k

instead but I'm not sure what the security implications of -k are.

kmpaul commented 4 years ago

Thanks for this, @mnlevy1981! I’ll take a look.

kmpaul commented 4 years ago

@mnlevy1981 I can confirm this behavior on my machine. It looks like something happened with the CU server, as it did not use to do this. I'll recommend the -k option in the text.

kmpaul commented 4 years ago

Closed by #27