Page 1 of 1

Mono SSL error connecting to Windy and other web sites

Posted: Fri 14 Apr 2023 6:11 pm
by mcrossley
If you get an error uploading to Windy, or connecting to another web site that uses a Let's Encrypt certificate when running under Mono, then you need to "fix" the Mono installation as follows (Debian/RaspberryPi OS):
  1. Remove the DST_Root_CA_X3 certificate from the configuration

    Code: Select all

    sudo sed -i '/^mozilla\/DST_Root_CA_X3.crt$/ s/^/!/' /etc/ca-certificates.conf
    sudo update-ca-certificates
    
  2. To be sure, get the old certificate out of the way

    Code: Select all

    sudo mv -v /etc/ssl/certs/DST_Root_CA_X3.pem /etc/ssl/certs/DST_Root_CA_X3.pemxxx
    If the command fails the certificate has already been deleted: that is OK
    If the command goes well the certificate is now unreachable: that is OK
  3. Update the system certificate store

    Code: Select all

    sudo update-ca-certificates
  4. Synchronise the system certificates into Mono

    Code: Select all

    sudo cert-sync /etc/ssl/certs/ca-certificates.crt
Now you are done and the transfers with HTTPS should go without error (check the logfile please).

Background: This error is caused by an expired root certificate for Let's Encrypt. Linux and Windows ignore this expired certificate if the current certificate is present. Mono however fails to verify the connection if the expired certificate is present, ignoring the current certificate!

The commands above remove the expired certificate from the system certificate store, then resynchronise the system store into the Mono certificate store.

Re: Mono SSL error connecting to Windy and other web sites

Posted: Fri 14 Apr 2023 7:35 pm
by AndyKF650
Yes that worked just fine.

Re: Mono SSL error connecting to Windy and other web sites

Posted: Sun 16 Jul 2023 10:14 pm
by ea5xq
Thanks , I had a problem with WeatherCloud and following your advice it works like a charm now, thanks a lot, this forum has helped me a lot setting up CMX in MacOs and recently in RaspBerryPi