twilio newbie here. Although I was able to successfully send a test sms message, this was done only by turning the certificate check to false. I'm on a hosted server. This is what my hosted provider said:
Twilio is doing a couple of things wrong. They're sending a root certificate in their certificate chain, which they shouldn't do, and the root they're sending is an old Thawte root from 1996 which is no longer trusted because it was signed by a 1024 bit key, which is now considered insecure. Because they're sending this untrusted root, you get the self-signed certificate exception, which is exactly what should happen in this case. https://www.sslshopper.com/ssl-checker.html#hostname=api.twilio.com
Again, this is way over my head. Any resolution to this?