try fix handling SELF_SIGNED_CERT_IN_CHAIN error