SSL Certificate validation issue when using AWS SDK Ruby library to access Digital Ocean Spaces
Our Ruby on Rails 5 based production app is configured to use Active Storage with the “amazon” engine, to access files on Digital Ocean Spaces.
Since the Digital Ocean Spaces API is compatible with AWS S3 API, using Active Storage with “amazon” engine, which uses the AWS Ruby SDK (https://github.com/aws/aws-sdk-ruby) behind the scenes, didn’t seem like a problem.
However, we have observed that Digital Ocean Spaces API calls are failing with the following error returned from the AWS Ruby SDK:
Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (ok))
Searching for the issue online resulted in a few sources that pointed to one solution of using the bundled AWS certificates. This solution is based on the assumption that the host machine may not have the required certificate to connect to AWS S3.
However, this solution will not work for us because we are using Digital Ocean Spaces and not AWS S3. Does your development team have suggestions on how to tackle this issue? Maybe Ruby experts who have run into this problem can suggest a fix.
Thanks in advance.