You need to ensure that the certificate is trusted. I'm not sure how you achieve this in curl - look at the manual for details.
There is likely to also be a way of determining the cipher strength.
I'm sure there are options in curl which will have it fail unless the certificate is trusted and the cipher strength is greater than some minimum.
Mark