We g_warn if we can't read the provided SOUP_SESSION_SSL_CA_FILE
(since we have no other way to indicate the error to the app). But
don't warn if the problem is just that the TLS backend isn't available,
since that will cause equally-obvious failures later on that don't
require g_warnings.
creds->ca_list = g_tls_certificate_list_new_from_file (ca_file, &error);
if (error) {
- g_warning ("Could not set SSL credentials from '%s': %s",
- ca_file, error->message);
+ if (!g_error_matches (error, G_TLS_ERROR, G_TLS_ERROR_UNAVAILABLE)) {
+ g_warning ("Could not set SSL credentials from '%s': %s",
+ ca_file, error->message);
+ }
g_error_free (error);
}
creds->validation_flags = G_TLS_CERTIFICATE_VALIDATE_ALL;