Issue with ca cert

Hi,

I am trying to use restic with a S3 endpoint which has a self-signed certificate.

I am getting this:

~ > restic init --repo=s3:https://tsmtest.cscs.ch:9000/abc --password-file=/tmp/pass  --cache-dir=/tmp/restic -o s3.list-objects-v1=true,s3.region="us-east-1" --cacert=/Users/loreg/cscs/clusters/tsm/tsmtest_agentcert.crt
Fatal: create repository at s3:https://tsmtest.cscs.ch:9000/abc failed: client.BucketExists: Head "https://tsmtest.cscs.ch:9000/abc/": x509: certificate relies on legacy Common Name field, use SANs instead

Does anyone know how to work around this error?

Thanks in advance,

Giuseppe

Look at what the error message is saying, “certificate relies on legacy Common Name field, use SANs instead”. You need to update your certificate so that it uses SANs.