Sorry for the late reply - I didn't seem to get a notification when my post was approved by a moderator nor when it was replied to.
I'm not convinced that what you have mentioned is the reason that I see an error in curl. If I run curl with -v then I see that it prints:
CApath: /etc/ssl/certs
and if I add just the Valicert root certificate to /etc/ssl/certs then the error goes away. So I'm pretty confident that curl is using the store at /etc/ssl/certs
I'm also not seeing any errors in curl when I connect to other https urls without specifying any specific root store.
Also, I'm pretty confident that go also uses the root store at /etc/ssl/certs. I guess mainly from looking here:
Additionally, from having had a bit of a look at:
I am pretty confident that what go does is when it finds that (1) in the certificate chain can be validated against a cert in the root store, it exits and doesn't check (2) against the root store.
Please correct me if I'm wrong. But assuming I'm not wrong, my question is about the security implications of validating or not validating (2).
Thanks.
Mark