File libsoup-gnutls-no-trust-no-ca-file.patch of Package libsoup.openSUSE_11.4_Update

Index: libsoup-2.32.2/libsoup/soup-gnutls.c
===================================================================
--- libsoup-2.32.2.orig/libsoup/soup-gnutls.c
+++ libsoup-2.32.2/libsoup/soup-gnutls.c
@@ -175,6 +175,12 @@ again:
 	if (chan->type == SOUP_SSL_TYPE_CLIENT && chan->creds->have_ca_file &&
 	    !verify_certificate (chan->session, chan->hostname, err))
 		return G_IO_STATUS_ERROR;
+	else if (chan->type == SOUP_SSL_TYPE_CLIENT && !chan->creds->have_ca_file) {
+		g_set_error (err, SOUP_SSL_ERROR,
+			     SOUP_SSL_ERROR_CERTIFICATE,
+			     "The SSL certificate is not trusted.");
+		return G_IO_STATUS_ERROR;
+	}
 
 	return G_IO_STATUS_NORMAL;
 }
openSUSE Build Service is sponsored by