- upgrade to latest upstream
This commit is contained in:
parent
3a86b722c2
commit
9e40af7ee6
@ -1 +1 @@
|
||||
gnutls-1.6.3-nosrp.tar.bz2
|
||||
gnutls-2.0.4-nosrp.tar.bz2
|
||||
|
@ -1,59 +0,0 @@
|
||||
--- gnutls-1.2.9/doc/examples/ex-client-srp.c.nosrp 2005-08-10 11:13:30.000000000 +0200
|
||||
+++ gnutls-1.2.9/doc/examples/ex-client-srp.c 2005-11-23 11:58:46.000000000 +0100
|
||||
@@ -17,13 +17,16 @@
|
||||
#define SA struct sockaddr
|
||||
#define MSG "GET / HTTP/1.0\r\n\r\n"
|
||||
|
||||
+#if 0
|
||||
const int kx_priority[] = { GNUTLS_KX_SRP, GNUTLS_KX_SRP_DSS,
|
||||
GNUTLS_KX_SRP_RSA, 0
|
||||
};
|
||||
+#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
+#if 0
|
||||
int ret;
|
||||
int sd, ii;
|
||||
gnutls_session_t session;
|
||||
@@ -122,6 +125,6 @@
|
||||
gnutls_certificate_free_credentials (cert_cred);
|
||||
|
||||
gnutls_global_deinit ();
|
||||
-
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
--- gnutls-1.2.9/doc/examples/ex-serv-srp.c.nosrp 2005-09-23 00:40:19.000000000 +0200
|
||||
+++ gnutls-1.2.9/doc/examples/ex-serv-srp.c 2005-11-23 12:02:44.000000000 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
#define MAX_BUF 1024
|
||||
#define PORT 5556 /* listen to 5556 port */
|
||||
|
||||
+#if 0
|
||||
/* These are global */
|
||||
gnutls_srp_server_credentials_t srp_cred;
|
||||
gnutls_certificate_credentials_t cert_cred;
|
||||
@@ -54,10 +55,12 @@
|
||||
|
||||
return session;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
+#if 0
|
||||
int err, listen_sd, i;
|
||||
int sd, ret;
|
||||
struct sockaddr_in sa_serv;
|
||||
@@ -170,7 +173,7 @@
|
||||
gnutls_certificate_free_credentials (cert_cred);
|
||||
|
||||
gnutls_global_deinit ();
|
||||
-
|
||||
+#endif
|
||||
return 0;
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
--- gnutls-1.4.1/configure.enable-psk 2006-07-14 12:01:10.000000000 +0200
|
||||
+++ gnutls-1.4.1/configure 2006-07-18 17:57:53.000000000 +0200
|
||||
@@ -11460,10 +11460,10 @@
|
||||
echo $ECHO_N "checking whether to disable PSK authentication support... $ECHO_C" >&6; }
|
||||
# Check whether --enable-psk-authentication was given.
|
||||
if test "${enable_psk_authentication+set}" = set; then
|
||||
- enableval=$enable_psk_authentication; ac_enable_srp=no
|
||||
+ enableval=$enable_psk_authentication; ac_enable_psk=no
|
||||
fi
|
||||
|
||||
-if test x$ac_enable_srp != xno; then
|
||||
+if test x$ac_enable_psk != xno; then
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
|
@ -1,194 +0,0 @@
|
||||
--- gnutls-1.6.3/doc/examples/ex-pkcs12.c.incompat 2006-06-16 17:35:46.000000000 +0200
|
||||
+++ gnutls-1.6.3/doc/examples/ex-pkcs12.c 2007-06-06 22:14:04.000000000 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
int ret, bag_index;
|
||||
gnutls_pkcs12_bag_t bag, key_bag;
|
||||
char pkcs12_struct[10 * 1024];
|
||||
- int pkcs12_struct_size;
|
||||
+ size_t pkcs12_struct_size;
|
||||
FILE *fd;
|
||||
|
||||
/* A good idea might be to use gnutls_x509_privkey_get_key_id()
|
||||
--- gnutls-1.6.3/doc/examples/ex-crq.c.incompat 2006-06-16 17:35:46.000000000 +0200
|
||||
+++ gnutls-1.6.3/doc/examples/ex-crq.c 2007-06-06 22:14:46.000000000 +0200
|
||||
@@ -19,7 +19,7 @@
|
||||
gnutls_x509_crq_t crq;
|
||||
gnutls_x509_privkey_t key;
|
||||
unsigned char buffer[10 * 1024];
|
||||
- int buffer_size = sizeof (buffer);
|
||||
+ size_t buffer_size = sizeof (buffer);
|
||||
|
||||
gnutls_global_init ();
|
||||
|
||||
--- gnutls-1.6.3/lib/gnutls_x509.c.incompat 2007-05-25 14:26:19.000000000 +0200
|
||||
+++ gnutls-1.6.3/lib/gnutls_x509.c 2007-06-06 21:42:57.000000000 +0200
|
||||
@@ -1884,6 +1884,7 @@
|
||||
gnutls_x509_crt_t cert = NULL;
|
||||
gnutls_x509_crl_t crl = NULL;
|
||||
int ret;
|
||||
+ size_t size;
|
||||
|
||||
ret = gnutls_pkcs12_init (&p12);
|
||||
if (ret < 0)
|
||||
@@ -1892,7 +1893,8 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
- p12blob.data = read_binary_file (pkcs12file, &p12blob.size);
|
||||
+ p12blob.data = read_binary_file (pkcs12file, &size);
|
||||
+ p12blob.size = (unsigned int)size;
|
||||
if (p12blob.data == NULL)
|
||||
{
|
||||
gnutls_assert ();
|
||||
--- gnutls-1.6.3/lib/gnutls_psk.c.incompat 2006-03-08 11:44:59.000000000 +0100
|
||||
+++ gnutls-1.6.3/lib/gnutls_psk.c 2007-06-06 21:51:05.000000000 +0200
|
||||
@@ -117,8 +117,9 @@
|
||||
}
|
||||
else
|
||||
{ /* HEX key */
|
||||
- res->key.size = key->size / 2;
|
||||
- res->key.data = gnutls_malloc (res->key.size);
|
||||
+ size_t size;
|
||||
+ size = res->key.size = key->size / 2;
|
||||
+ res->key.data = gnutls_malloc (size);
|
||||
if (res->key.data == NULL)
|
||||
{
|
||||
gnutls_assert ();
|
||||
@@ -126,7 +127,8 @@
|
||||
goto error;
|
||||
}
|
||||
|
||||
- ret = gnutls_hex_decode (key, (char *) res->key.data, &res->key.size);
|
||||
+ ret = gnutls_hex_decode (key, (char *) res->key.data, &size);
|
||||
+ res->key.size = (unsigned int)size;
|
||||
if (ret < 0)
|
||||
{
|
||||
gnutls_assert ();
|
||||
--- gnutls-1.6.3/lib/auth_psk_passwd.c.incompat 2006-03-08 11:44:59.000000000 +0100
|
||||
+++ gnutls-1.6.3/lib/auth_psk_passwd.c 2007-06-06 21:47:10.000000000 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
{
|
||||
char *p;
|
||||
int len, ret;
|
||||
+ size_t size;
|
||||
|
||||
p = strchr (str, ':');
|
||||
if (p == NULL)
|
||||
@@ -68,15 +69,16 @@
|
||||
if (p[len - 1] == '\n' || p[len - 1] == ' ')
|
||||
len--;
|
||||
|
||||
- psk->size = len / 2;
|
||||
- psk->data = gnutls_malloc (psk->size);
|
||||
+ size = psk->size = len / 2;
|
||||
+ psk->data = gnutls_malloc (size);
|
||||
if (psk->data == NULL)
|
||||
{
|
||||
gnutls_assert ();
|
||||
return GNUTLS_E_MEMORY_ERROR;
|
||||
}
|
||||
|
||||
- ret = _gnutls_hex2bin ((opaque *) p, len, psk->data, &psk->size);
|
||||
+ ret = _gnutls_hex2bin ((opaque *) p, len, psk->data, &size);
|
||||
+ psk->size = (unsigned int)size;
|
||||
if (ret < 0)
|
||||
{
|
||||
gnutls_assert ();
|
||||
--- gnutls-1.6.3/libextra/gnutls_openpgp.c.incompat 2006-09-26 10:17:11.000000000 +0200
|
||||
+++ gnutls-1.6.3/libextra/gnutls_openpgp.c 2007-06-06 22:03:31.000000000 +0200
|
||||
@@ -728,6 +728,7 @@
|
||||
struct stat statbuf;
|
||||
int rc = 0;
|
||||
gnutls_datum_t key, cert;
|
||||
+ size_t size;
|
||||
|
||||
if (!res || !keyfile || !certfile)
|
||||
{
|
||||
@@ -741,14 +742,16 @@
|
||||
return GNUTLS_E_FILE_ERROR;
|
||||
}
|
||||
|
||||
- cert.data = read_binary_file (certfile, &cert.size);
|
||||
+ cert.data = read_binary_file (certfile, &size);
|
||||
+ cert.size = (unsigned int)size;
|
||||
if (cert.data == NULL)
|
||||
{
|
||||
gnutls_assert ();
|
||||
return GNUTLS_E_FILE_ERROR;
|
||||
}
|
||||
|
||||
- key.data = read_binary_file (keyfile, &key.size);
|
||||
+ key.data = read_binary_file (keyfile, &size);
|
||||
+ key.size = (unsigned int)size;
|
||||
if (key.data == NULL)
|
||||
{
|
||||
gnutls_assert ();
|
||||
--- gnutls-1.6.3/libextra/openssl_compat.c.incompat 2006-03-08 11:44:59.000000000 +0100
|
||||
+++ gnutls-1.6.3/libextra/openssl_compat.c 2007-06-06 22:05:55.000000000 +0200
|
||||
@@ -537,6 +537,7 @@
|
||||
{
|
||||
gnutls_x509_crt_t xcert;
|
||||
int result;
|
||||
+ size_t size;
|
||||
|
||||
result = gnutls_x509_crt_init (&xcert);
|
||||
if (result < 0)
|
||||
@@ -549,10 +550,11 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
+ size = sizeof_buf;
|
||||
if (!issuer)
|
||||
- result = gnutls_x509_crt_get_dn (xcert, buf, &sizeof_buf);
|
||||
+ result = gnutls_x509_crt_get_dn (xcert, buf, &size);
|
||||
else
|
||||
- result = gnutls_x509_crt_get_issuer_dn (xcert, buf, &sizeof_buf);
|
||||
+ result = gnutls_x509_crt_get_issuer_dn (xcert, buf, &size);
|
||||
|
||||
gnutls_x509_crt_deinit (xcert);
|
||||
|
||||
--- gnutls-1.6.3/libextra/opencdk/read-packet.c.incompat 2006-10-26 16:17:23.000000000 +0200
|
||||
+++ gnutls-1.6.3/libextra/opencdk/read-packet.c 2007-06-06 21:55:22.000000000 +0200
|
||||
@@ -876,7 +876,7 @@
|
||||
|
||||
static void
|
||||
read_new_length( cdk_stream_t inp,
|
||||
- size_t *r_len, size_t *r_size, size_t *r_partial )
|
||||
+ size_t *r_len, size_t *r_size, int *r_partial )
|
||||
{
|
||||
int c, c1;
|
||||
|
||||
--- gnutls-1.6.3/libextra/opencdk/seskey.c.incompat 2006-10-26 16:17:23.000000000 +0200
|
||||
+++ gnutls-1.6.3/libextra/opencdk/seskey.c 2007-06-06 22:01:57.000000000 +0200
|
||||
@@ -95,7 +95,8 @@
|
||||
byte * p, * frame;
|
||||
size_t n = 0;
|
||||
u16 chksum = 0;
|
||||
- int i = 0, nframe = 0;
|
||||
+ int i = 0;
|
||||
+ size_t nframe = 0;
|
||||
int rc = 0;
|
||||
|
||||
if( !r_esk || !dek )
|
||||
--- gnutls-1.6.3/src/tests.c.incompat 2006-09-21 13:27:59.000000000 +0200
|
||||
+++ gnutls-1.6.3/src/tests.c 2007-06-06 22:10:43.000000000 +0200
|
||||
@@ -50,7 +50,7 @@
|
||||
/* keep session info */
|
||||
static char *session_data = NULL;
|
||||
static char session_id[32];
|
||||
-static int session_data_size = 0, session_id_size = 0;
|
||||
+static size_t session_data_size = 0, session_id_size = 0;
|
||||
static int sfree = 0;
|
||||
static int handshake_output = 0;
|
||||
|
||||
--- gnutls-1.6.3/src/common.c.incompat 2006-07-05 23:32:53.000000000 +0200
|
||||
+++ gnutls-1.6.3/src/common.c 2007-06-06 22:09:10.000000000 +0200
|
||||
@@ -88,7 +88,7 @@
|
||||
{
|
||||
gnutls_x509_crt crt;
|
||||
const gnutls_datum *cert_list;
|
||||
- size_t cert_list_size = 0;
|
||||
+ int cert_list_size = 0;
|
||||
int ret;
|
||||
char digest[20];
|
||||
char serial[40];
|
70
gnutls-2.0.4-nosrp.patch
Normal file
70
gnutls-2.0.4-nosrp.patch
Normal file
@ -0,0 +1,70 @@
|
||||
diff -up gnutls-2.0.4/doc/examples/ex-serv-srp.c.nosrp gnutls-2.0.4/doc/examples/ex-serv-srp.c
|
||||
--- gnutls-2.0.4/doc/examples/ex-serv-srp.c.nosrp 2007-11-15 16:24:56.000000000 +0100
|
||||
+++ gnutls-2.0.4/doc/examples/ex-serv-srp.c 2007-11-29 14:50:37.000000000 +0100
|
||||
@@ -29,6 +29,7 @@
|
||||
#define MAX_BUF 1024
|
||||
#define PORT 5556 /* listen to 5556 port */
|
||||
|
||||
+#if 0
|
||||
/* These are global */
|
||||
gnutls_srp_server_credentials_t srp_cred;
|
||||
gnutls_certificate_credentials_t cert_cred;
|
||||
@@ -57,10 +58,12 @@ initialize_tls_session (void)
|
||||
|
||||
return session;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
+#if 0
|
||||
int err, listen_sd, i;
|
||||
int sd, ret;
|
||||
struct sockaddr_in sa_serv;
|
||||
@@ -173,7 +176,7 @@ main (void)
|
||||
gnutls_certificate_free_credentials (cert_cred);
|
||||
|
||||
gnutls_global_deinit ();
|
||||
-
|
||||
+#endif
|
||||
return 0;
|
||||
|
||||
}
|
||||
diff -up gnutls-2.0.4/doc/examples/ex-session-info.c.nosrp gnutls-2.0.4/doc/examples/ex-session-info.c
|
||||
--- gnutls-2.0.4/doc/examples/ex-session-info.c.nosrp 2007-11-15 16:24:56.000000000 +0100
|
||||
+++ gnutls-2.0.4/doc/examples/ex-session-info.c 2007-11-29 15:54:12.000000000 +0100
|
||||
@@ -35,12 +35,12 @@ print_info (gnutls_session_t session)
|
||||
printf ("- TLS/IA session\n");
|
||||
break;
|
||||
|
||||
-
|
||||
+#if 0
|
||||
case GNUTLS_CRD_SRP:
|
||||
printf ("- SRP session with username %s\n",
|
||||
gnutls_srp_server_get_username (session));
|
||||
break;
|
||||
-
|
||||
+#endif
|
||||
case GNUTLS_CRD_PSK:
|
||||
if (gnutls_psk_server_get_username (session) != NULL)
|
||||
printf ("- PSK authentication. Connected as '%s'\n",
|
||||
diff -up gnutls-2.0.4/doc/examples/ex-client-srp.c.nosrp gnutls-2.0.4/doc/examples/ex-client-srp.c
|
||||
--- gnutls-2.0.4/doc/examples/ex-client-srp.c.nosrp 2007-11-15 16:24:56.000000000 +0100
|
||||
+++ gnutls-2.0.4/doc/examples/ex-client-srp.c 2007-11-29 14:50:37.000000000 +0100
|
||||
@@ -24,6 +24,7 @@ extern void tcp_close (int sd);
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
+#if 0
|
||||
int ret;
|
||||
int sd, ii;
|
||||
gnutls_session_t session;
|
||||
@@ -121,6 +122,6 @@ end:
|
||||
gnutls_certificate_free_credentials (cert_cred);
|
||||
|
||||
gnutls_global_deinit ();
|
||||
-
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
15
gnutls.spec
15
gnutls.spec
@ -1,9 +1,9 @@
|
||||
Summary: A TLS protocol implementation
|
||||
Name: gnutls
|
||||
Version: 1.6.3
|
||||
Release: 2%{?dist}
|
||||
Version: 2.0.4
|
||||
Release: 1%{?dist}
|
||||
# The libgnutls library is LGPLv2+, utilities and remaining libraries are GPLv2+
|
||||
License: GPLv2+ and LGPLv2+
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
BuildRequires: libgcrypt-devel >= 1.2.2, gettext
|
||||
BuildRequires: zlib-devel, readline-devel
|
||||
@ -15,9 +15,7 @@ URL: http://www.gnutls.org/
|
||||
# XXX patent tainted SRP code removed.
|
||||
Source0: %{name}-%{version}-nosrp.tar.bz2
|
||||
Source1: libgnutls-config
|
||||
Patch0: gnutls-1.4.0-nosrp.patch
|
||||
Patch1: gnutls-1.4.1-enable-psk.patch
|
||||
Patch2: gnutls-1.6.3-incompat-pointers.patch
|
||||
Patch0: gnutls-2.0.4-nosrp.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: libgcrypt >= 1.2.2
|
||||
@ -59,8 +57,6 @@ manipulation tools.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .nosrp
|
||||
%patch1 -p1 -b .enable-psk
|
||||
%patch2 -p1 -b .incompat
|
||||
|
||||
for i in auth_srp_rsa.c auth_srp_sb64.c auth_srp_passwd.c auth_srp.c gnutls_srp.c ext_srp.c; do
|
||||
touch lib/$i
|
||||
@ -127,6 +123,9 @@ fi
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 4 2007 Tomas Mraz <tmraz@redhat.com> 2.0.4-1
|
||||
- upgrade to latest upstream
|
||||
|
||||
* Tue Aug 21 2007 Tomas Mraz <tmraz@redhat.com> 1.6.3-2
|
||||
- license tag fix
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user