OBS User unknown 2009-02-06 17:03:23 +00:00 committed by Git OBS Bridge
parent 1798002d35
commit 026231a502
5 changed files with 101 additions and 311 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88a20ee81d61e3423ec60398a3828f9dd56f7d441f88f03b69675e7f43594750
size 649933

3
libsoup-2.25.4.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:99feb91ab9b6509e69b6ca1010de232f7791c3d409d6403e9a167cf0c74399b7
size 713430

View File

@ -1,301 +0,0 @@
=== modified file 'configure.in'
--- configure.in 2008-04-08 21:37:12 +0000
+++ configure.in 2008-04-21 17:32:27 +0000
@@ -145,6 +145,11 @@
if test "$have_ssl" = "yes"; then
AC_DEFINE(HAVE_SSL, 1, [Defined if you have SSL support])
SSL_REQUIREMENT="gnutls"
+
+ old_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $LIBGNUTLS_LIBS $LIBGCRYPT_LIBS"
+ AC_CHECK_FUNCS(gnutls_certificate_client_set_sign_function)
+ LDFLAGS="$old_LDFLAGS"
else
if test "$enable_ssl" = "auto"; then
AC_MSG_WARN(Disabling SSL support);
=== modified file 'libsoup/soup-gnutls.c'
--- libsoup/soup-gnutls.c 2008-04-20 23:11:54 +0000
+++ libsoup/soup-gnutls.c 2008-04-21 17:32:27 +0000
@@ -41,6 +41,12 @@
struct SoupSSLCredentials {
gnutls_certificate_credentials creds;
gboolean have_ca_file;
+
+#ifdef HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION
+ SoupGnuTLSCertificateRequestFunc cert_func;
+ SoupGnuTLSSignDataFunc sign_func;
+ gpointer auth_data;
+#endif
};
typedef struct {
@@ -419,6 +425,7 @@
gnutls_dh_set_prime_bits (session, DH_BITS);
gnutls_transport_set_ptr (session, GINT_TO_POINTER (sockfd));
+ gnutls_session_set_ptr (session, creds);
chan = g_slice_new0 (SoupGNUTLSChannel);
chan->fd = sockfd;
@@ -462,6 +469,111 @@
}
}
+#ifdef HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION
+static int
+soup_ssl_retrieve_cert (gnutls_session_t session,
+ const gnutls_datum_t *req_ca_rdn, int nreqs,
+ const gnutls_pk_algorithm_t *sign_algos,
+ int sign_algos_length, gnutls_retr_st * st)
+{
+ SoupSSLCredentials *creds;
+ int cert_ret_len = 0;
+ gnutls_datum_t *cert_ret;
+ gnutls_x509_crt_t *gnutls_cert;
+ int i;
+ int ret;
+
+ creds = gnutls_session_get_ptr (session);
+ if (!creds)
+ return -1;
+
+ g_return_val_if_fail (creds->cert_func != NULL, -1);
+
+ if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509)
+ return -1;
+
+ ret = creds->cert_func (req_ca_rdn, nreqs,
+ &cert_ret, &cert_ret_len,
+ creds->auth_data);
+
+ if (ret != 0)
+ return -1;
+
+ if (cert_ret_len == 0)
+ return 0;
+
+ gnutls_cert = gnutls_malloc (sizeof (gnutls_x509_crt_t) * cert_ret_len);
+ for (i = 0; i < cert_ret_len; i++) {
+ if (ret == 0) {
+ gnutls_x509_crt_init (&gnutls_cert[i]);
+ ret = gnutls_x509_crt_import (gnutls_cert[i],
+ &cert_ret[i],
+ GNUTLS_X509_FMT_DER);
+ if (ret != 0) {
+ int j;
+ for (j = 0; i < i; j++)
+ gnutls_x509_crt_deinit (gnutls_cert[j]);
+ }
+ }
+ gnutls_free (cert_ret[i].data);
+ }
+ gnutls_free (cert_ret);
+
+ if (ret != 0) {
+ gnutls_free (gnutls_cert);
+ return -1;
+ }
+
+ st->type = GNUTLS_CRT_X509;
+ st->cert.x509 = gnutls_cert;
+ st->ncerts = cert_ret_len;
+ st->key.x509 = NULL;
+ st->deinit_all = 1;
+
+ return 0;
+}
+
+static int
+soup_ssl_sign_data (gnutls_session_t session,
+ gnutls_datum_t * cert,
+ gnutls_certificate_type_t cert_type,
+ const gnutls_datum_t *hash_concat,
+ gnutls_datum_t * signature)
+{
+ SoupSSLCredentials *creds;
+ int ret;
+
+ creds = gnutls_session_get_ptr (session);
+ if (!creds)
+ return -1;
+
+ g_return_val_if_fail (creds->sign_func != NULL, -1);
+ g_return_val_if_fail (cert_type == GNUTLS_CRT_X509, -1);
+
+ ret = creds->sign_func (cert, hash_concat, signature,
+ creds->auth_data);
+
+ return ret;
+}
+
+void
+soup_gnutls_set_callbacks (SoupSSLCredentials *creds,
+ SoupGnuTLSCertificateRequestFunc cert_func,
+ SoupGnuTLSSignDataFunc sign_func,
+ gpointer user_data)
+{
+ creds->cert_func = cert_func;
+ creds->sign_func = sign_func;
+ creds->auth_data = user_data;
+
+ if (cert_func)
+ gnutls_certificate_client_set_retrieve_function (creds->creds, soup_ssl_retrieve_cert);
+
+ if (sign_func)
+ gnutls_certificate_client_set_sign_function (creds->creds, soup_ssl_sign_data);
+}
+#endif /* HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION */
+
/**
* soup_ssl_get_client_credentials:
* @ca_file: path to a file containing X509-encoded Certificate
=== modified file 'libsoup/soup-marshal.list'
--- libsoup/soup-marshal.list 2008-01-15 17:40:47 +0000
+++ libsoup/soup-marshal.list 2008-04-21 17:34:46 +0000
@@ -5,3 +5,5 @@
NONE:OBJECT,OBJECT
NONE:OBJECT,POINTER
NONE:OBJECT,OBJECT,BOOLEAN
+INT:POINTER,INT,POINTER,POINTER
+INT:POINTER,POINTER,POINTER
=== modified file 'libsoup/soup-session.c'
--- libsoup/soup-session.c 2008-04-08 22:13:03 +0000
+++ libsoup/soup-session.c 2008-04-21 17:34:09 +0000
@@ -124,6 +124,8 @@
REQUEST_STARTED,
REQUEST_UNQUEUED,
AUTHENTICATE,
+ CERTIFICATE_REQUESTED,
+ SIGN_DATA,
LAST_SIGNAL
};
@@ -391,6 +393,35 @@
SOUP_TYPE_AUTH,
G_TYPE_BOOLEAN);
+ /* This signal is not part of SoupSession's public API, and
+ * *will* disappear without warning in the future.
+ */
+ signals[CERTIFICATE_REQUESTED] =
+ g_signal_new ("certificate-requested",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ soup_marshal_INT__POINTER_INT_POINTER_POINTER,
+ G_TYPE_INT, 4,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
+
+ /* This signal is not part of SoupSession's public API, and
+ * *will* disappear without warning in the future.
+ */
+ signals[SIGN_DATA] =
+ g_signal_new ("sign-data",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ soup_marshal_INT__POINTER_POINTER_POINTER,
+ G_TYPE_INT, 3,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
+
/* properties */
g_object_class_install_property (
object_class, PROP_PROXY_URI,
@@ -701,6 +732,46 @@
/* Hosts */
+#ifdef HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION
+static int
+soup_session_ssl_certificate_requested (const gnutls_datum_t *req_ca_rdn,
+ int nreqs,
+ gnutls_datum_t **cert_ret,
+ int *cert_ret_len,
+ gpointer user_data)
+{
+ SoupSession *session = user_data;
+ int ret = 0;
+
+ g_return_val_if_fail (SOUP_IS_SESSION (user_data), -1);
+
+ g_signal_emit (session, signals[CERTIFICATE_REQUESTED], 0,
+ req_ca_rdn, nreqs,
+ cert_ret, cert_ret_len,
+ &ret);
+
+ return ret;
+}
+
+static int
+soup_session_ssl_sign_data (gnutls_datum_t *cert_der,
+ const gnutls_datum_t *hash_data,
+ gnutls_datum_t *sign_data,
+ gpointer user_data)
+{
+ SoupSession *session = user_data;
+ int ret = 0;
+
+ g_return_val_if_fail (SOUP_IS_SESSION (user_data), -1);
+
+ g_signal_emit (session, signals[SIGN_DATA], 0,
+ cert_der, hash_data, sign_data,
+ &ret);
+
+ return ret;
+}
+#endif
+
static SoupSessionHost *
soup_session_host_new (SoupSession *session, SoupURI *source_uri)
{
@@ -714,6 +785,12 @@
!priv->ssl_creds) {
priv->ssl_creds =
soup_ssl_get_client_credentials (priv->ssl_ca_file);
+#ifdef HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION
+ soup_gnutls_set_callbacks (priv->ssl_creds,
+ soup_session_ssl_certificate_requested,
+ soup_session_ssl_sign_data,
+ session);
+#endif
}
return host;
=== modified file 'libsoup/soup-ssl.h'
--- libsoup/soup-ssl.h 2008-04-20 23:11:54 +0000
+++ libsoup/soup-ssl.h 2008-04-21 17:32:27 +0000
@@ -28,4 +28,24 @@
const char *remote_host,
SoupSSLCredentials *creds);
+#ifdef HAVE_GNUTLS_CERTIFICATE_CLIENT_SET_SIGN_FUNCTION
+#include <gnutls/gnutls.h>
+
+typedef int (*SoupGnuTLSCertificateRequestFunc) (const gnutls_datum_t *req_ca_rdn,
+ int nreqs,
+ gnutls_datum_t **cert_ret,
+ int *cert_ret_len,
+ gpointer user_data);
+
+typedef int (*SoupGnuTLSSignDataFunc) (gnutls_datum_t *cert_der,
+ const gnutls_datum_t *hash_data,
+ gnutls_datum_t *sign_data,
+ gpointer user_data);
+
+void soup_gnutls_set_callbacks (SoupSSLCredentials *creds,
+ SoupGnuTLSCertificateRequestFunc cert_func,
+ SoupGnuTLSSignDataFunc sign_func,
+ gpointer user_data);
+#endif /* HAVE_GNUTLS... */
+
#endif /* SOUP_SSL_H */

View File

@ -3,6 +3,55 @@ Wed Jan 7 12:34:56 CET 2009 - olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
-------------------------------------------------------------------
Tue Jan 6 09:49:05 EST 2009 - mboman@suse.de
- Update to version 2.25.4:
+ Added soup_session_get_feature() and
soup_session_get_features(), to query the features currently
available in a session
-------------------------------------------------------------------
Tue Dec 23 07:41:43 EST 2008 - mboman@suse.de
- Update to version 2.25.3:
+ Fixed a crash when using both cookies and a proxy. [bgo#562191]
+ Fixed soup_form_decode() to correctly handle forms with
URI-encoded parameter names [bgo#563302]
+ Fixed a crash in SoupProxyResolverGConf. [bgo#563145]
+ Fixed client behavior when presented with multiple auth
types to choose the *strongest* auth type (eg, Digest)
rather than the *weakest* one [bgo#562339]
Added a regression test for this.
+ Moved libsoup-gnome headers to a different directory to make
it easier to split libsoup and libsoup-gnome into separate
packages, and to ensure that things that only want to be
looking at plain libsoup headers (like gir-repository) don't
accidentally see the libsoup-gnome ones.
+ Some minor doc fixes
+ Fixed libsoup-gnome linking with --as-needed. [bgo#559342]
+ New library libsoup-gnome
+ SoupCookieJarText, like SoupCookieJarSqlite, but using the
old-style cookies.txt format, and in the base libsoup rather
than libsoup-gnome.
+ Various bugfixes to SoupCookie and SoupCookieJar to fix the
problems with cookies not working on certain sites.
+ The new SoupMultipart type provides support for multipart
MIME bodies, and soup-form now includes several methods for
generating and parsing multipart form data and file uploads.
+ SoupMessageHeaders now has methods for easy handling of the
Content-Type, Content-Disposition, Range, and Content-Range
headers. The Content-Disposition handling recognizes
RFC2231-encoded UTF-8 filenames.
+ SoupServer now automatically handles partial GET requests;
if your server returns SOUP_STATUS_OK in response to a
partial GET, libsoup will automatically convert it to a
SOUP_STATUS_PARTIAL_CONTENT response with only the requested
portions.
- Drop libsoup-334021-client-ssl-certs.patch: it required a gnutls
patch (gnutls-1.4.4-sign-callback.patch) that was dropped in
August 2007.
-------------------------------------------------------------------
Tue Oct 21 19:28:57 EST 2008 - mboman@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package libsoup (Version 2.24.1)
# spec file for package libsoup (Version 2.25.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -20,9 +20,11 @@
Name: libsoup
BuildRequires: glib2-devel
BuildRequires: gconf2-devel
BuildRequires: gnutls-devel
BuildRequires: gtk-doc
BuildRequires: libxml2-devel
BuildRequires: sqlite3-devel
# We do not need these dependencies needed only for tests.
#BuildRequires: apache2-mod_php5 php5-xmlrpc
License: LGPL v2.1 or later
@ -34,11 +36,9 @@ Obsoletes: libsoup-64bit
%endif
#
Summary: Simple Object Access Protocol (SOAP)
Version: 2.24.1
Release: 2
Version: 2.25.4
Release: 1
Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/libsoup/2.2/%{name}-%{version}.tar.bz2
# PATCH-FEATURE-UPSTREAM libsoup-334021-client-ssl-certs.patch bgo334021 -- client SSL certificate support
Patch0: libsoup-334021-client-ssl-certs.patch
Url: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-2_4-1 = %{version}
@ -162,7 +162,6 @@ Authors:
%prep
%setup -q
%patch0 -p0
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@ -193,8 +192,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%{_includedir}/libsoup-2.4
%{_libdir}/*.so
#%{_libdir}/*.*a
%{_libdir}/pkgconfig/*.pc
%{_includedir}/libsoup-gnome-2.4
%files doc
%defattr(-,root,root)
@ -203,6 +202,49 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Jan 07 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Tue Jan 06 2009 mboman@suse.de
- Update to version 2.25.4:
+ Added soup_session_get_feature() and
soup_session_get_features(), to query the features currently
available in a session
* Tue Dec 23 2008 mboman@suse.de
- Update to version 2.25.3:
+ Fixed a crash when using both cookies and a proxy. [bgo#562191]
+ Fixed soup_form_decode() to correctly handle forms with
URI-encoded parameter names [bgo#563302]
+ Fixed a crash in SoupProxyResolverGConf. [bgo#563145]
+ Fixed client behavior when presented with multiple auth
types to choose the *strongest* auth type (eg, Digest)
rather than the *weakest* one [bgo#562339]
Added a regression test for this.
+ Moved libsoup-gnome headers to a different directory to make
it easier to split libsoup and libsoup-gnome into separate
packages, and to ensure that things that only want to be
looking at plain libsoup headers (like gir-repository) don't
accidentally see the libsoup-gnome ones.
+ Some minor doc fixes
+ Fixed libsoup-gnome linking with --as-needed. [bgo#559342]
+ New library libsoup-gnome
+ SoupCookieJarText, like SoupCookieJarSqlite, but using the
old-style cookies.txt format, and in the base libsoup rather
than libsoup-gnome.
+ Various bugfixes to SoupCookie and SoupCookieJar to fix the
problems with cookies not working on certain sites.
+ The new SoupMultipart type provides support for multipart
MIME bodies, and soup-form now includes several methods for
generating and parsing multipart form data and file uploads.
+ SoupMessageHeaders now has methods for easy handling of the
Content-Type, Content-Disposition, Range, and Content-Range
headers. The Content-Disposition handling recognizes
RFC2231-encoded UTF-8 filenames.
+ SoupServer now automatically handles partial GET requests;
if your server returns SOUP_STATUS_OK in response to a
partial GET, libsoup will automatically convert it to a
SOUP_STATUS_PARTIAL_CONTENT response with only the requested
portions.
- Drop libsoup-334021-client-ssl-certs.patch: it required a gnutls
patch (gnutls-1.4.4-sign-callback.patch) that was dropped in
August 2007.
* Wed Oct 22 2008 mboman@suse.de
- Update to version 2.24.1:
+ Bugs fixed: bgo#533473, bgo##536285, bgo#498509, bgo#553976, bgo#557072