HTTP-4 PluginsManager.cpp:153] AWS S3 Storage: error while creating object, response code = -1 curlCode: 60, SSL peer certificate or SSH remote key was not OK

I encountered this error while using jodogne/orthanc-plugins:1.12.7 and a non-AWS, S3-compatible object storage with HTTPS enabled (specifically, OpenStack Swift).

If the S3-compatible provider has a valid certificate, all you need to do is add "HttpsCACertificates": "/etc/ssl/certs/ca-certificates.crt" to /etc/orthanc/orthanc.json.

Note that without setting HttpsCACertificates manually, HTTP works but HTTPS will not work at all. For example, for troubleshooting I tried setting AwsS3Storage.Endpoint=https://google.com:443 and it gave me the same curlCode 60, SSL error.