diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-21 16:45:47 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-21 16:45:47 +0000 |
commit | 450aea724eac30317c0e8d77c7fc69e47f02ad7c (patch) | |
tree | b0f980a60f5f9f3ebac92bb18a4ad2c72f00d24b /meta/packages/gnutls/gnutls-1.4.4 | |
parent | 2a9503f1858fa1bc5539297014a953ce5f6e67ce (diff) | |
download | poky-450aea724eac30317c0e8d77c7fc69e47f02ad7c.tar.gz |
Add lzo, upgrade libgcrypt -> 1.2.3, add gnutls 1.4.4
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@934 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gnutls/gnutls-1.4.4')
-rw-r--r-- | meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch | 120 | ||||
-rw-r--r-- | meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch | 16 | ||||
-rw-r--r-- | meta/packages/gnutls/gnutls-1.4.4/onceonly.m4 | 63 |
3 files changed, 199 insertions, 0 deletions
diff --git a/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch b/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch new file mode 100644 index 0000000000..6eca97efd7 --- /dev/null +++ b/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch | |||
@@ -0,0 +1,120 @@ | |||
1 | --- gnutls-1.3.5/libextra/gnutls_openssl.c.orig 2006-04-28 20:01:40.000000000 +0100 | ||
2 | +++ gnutls-1.3.5/libextra/gnutls_openssl.c 2006-04-28 20:10:33.000000000 +0100 | ||
3 | @@ -252,12 +252,17 @@ | ||
4 | ssl->rfd = (gnutls_transport_ptr_t) - 1; | ||
5 | ssl->wfd = (gnutls_transport_ptr_t) - 1; | ||
6 | |||
7 | + ssl->ssl_peek_buffer = NULL; | ||
8 | + ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0; | ||
9 | + | ||
10 | return ssl; | ||
11 | } | ||
12 | |||
13 | void | ||
14 | SSL_free (SSL * ssl) | ||
15 | { | ||
16 | + if (ssl->ssl_peek_buffer) | ||
17 | + free(ssl->ssl_peek_buffer); | ||
18 | gnutls_certificate_free_credentials (ssl->gnutls_cred); | ||
19 | gnutls_deinit (ssl->gnutls_state); | ||
20 | free (ssl); | ||
21 | @@ -281,6 +286,7 @@ | ||
22 | SSL_set_fd (SSL * ssl, int fd) | ||
23 | { | ||
24 | gnutls_transport_set_ptr (ssl->gnutls_state, (gnutls_transport_ptr_t) fd); | ||
25 | + ssl->rfd = ssl->wfd = fd; | ||
26 | return 1; | ||
27 | } | ||
28 | |||
29 | @@ -306,6 +312,17 @@ | ||
30 | return 1; | ||
31 | } | ||
32 | |||
33 | +int SSL_get_rfd(SSL *ssl) | ||
34 | +{ | ||
35 | + return ssl->rfd; | ||
36 | +} | ||
37 | + | ||
38 | +int SSL_get_wfd(SSL *ssl) | ||
39 | +{ | ||
40 | + return ssl->wfd; | ||
41 | +} | ||
42 | + | ||
43 | + | ||
44 | void | ||
45 | SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio) | ||
46 | { | ||
47 | @@ -321,6 +338,8 @@ | ||
48 | int | ||
49 | SSL_pending (SSL * ssl) | ||
50 | { | ||
51 | + if (ssl->ssl_peek_avail) | ||
52 | + return ssl->ssl_peek_avail; | ||
53 | return gnutls_record_check_pending (ssl->gnutls_state); | ||
54 | } | ||
55 | |||
56 | @@ -476,11 +495,50 @@ | ||
57 | return 1; | ||
58 | } | ||
59 | |||
60 | +int SSL_peek(SSL *ssl, void *buf, int len) | ||
61 | +{ | ||
62 | + if (len > ssl->ssl_peek_buffer_size) { | ||
63 | + ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len); | ||
64 | + ssl->ssl_peek_buffer_size = len; | ||
65 | + } | ||
66 | + | ||
67 | + if (ssl->ssl_peek_avail == 0) { | ||
68 | + | ||
69 | + int ret; | ||
70 | + | ||
71 | + ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len); | ||
72 | + ssl->last_error = ret; | ||
73 | + | ||
74 | + if (ret > 0) | ||
75 | + ssl->ssl_peek_avail += ret; | ||
76 | + } | ||
77 | + | ||
78 | + if (len > ssl->ssl_peek_avail) | ||
79 | + len = ssl->ssl_peek_avail; | ||
80 | + | ||
81 | + memcpy (buf, ssl->ssl_peek_buffer, len); | ||
82 | + | ||
83 | + return len; | ||
84 | +} | ||
85 | + | ||
86 | int | ||
87 | SSL_read (SSL * ssl, void *buf, int len) | ||
88 | { | ||
89 | int ret; | ||
90 | |||
91 | + if (ssl->ssl_peek_avail) { | ||
92 | + int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail; | ||
93 | + | ||
94 | + memcpy (buf, ssl->ssl_peek_buffer, n); | ||
95 | + | ||
96 | + if (ssl->ssl_peek_avail > n) | ||
97 | + memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n); | ||
98 | + | ||
99 | + ssl->ssl_peek_avail -= n; | ||
100 | + | ||
101 | + return n; | ||
102 | + } | ||
103 | + | ||
104 | ret = gnutls_record_recv (ssl->gnutls_state, buf, len); | ||
105 | ssl->last_error = ret; | ||
106 | |||
107 | --- gnutls-1.3.5/includes/gnutls/openssl.h.orig 2006-04-28 20:10:55.000000000 +0100 | ||
108 | +++ gnutls-1.3.5/includes/gnutls/openssl.h 2006-04-28 20:11:52.000000000 +0100 | ||
109 | @@ -164,6 +164,11 @@ | ||
110 | |||
111 | gnutls_transport_ptr_t rfd; | ||
112 | gnutls_transport_ptr_t wfd; | ||
113 | + | ||
114 | + char *ssl_peek_buffer; | ||
115 | + size_t ssl_peek_buffer_size; | ||
116 | + size_t ssl_peek_avail; | ||
117 | + | ||
118 | }; | ||
119 | |||
120 | #define rbio gnutls_state | ||
diff --git a/meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch b/meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch new file mode 100644 index 0000000000..e2a2762424 --- /dev/null +++ b/meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | The version of texinfo in Debian Sarge does not understand the @euro{} command. | ||
2 | This patch replaces the @euro{} command with the word "euro". | ||
3 | |||
4 | --- gnutls-1.3.5/doc/signatures.texi.orig 2006-04-26 08:06:40.918268000 +0930 | ||
5 | +++ gnutls-1.3.5/doc/signatures.texi 2006-04-26 08:06:52.446515440 +0930 | ||
6 | @@ -11,8 +11,8 @@ | ||
7 | long as it is difficult enough to generate two different messages with | ||
8 | the same hash algorithm output. In that case the same signature could | ||
9 | be used as a proof for both messages. Nobody wants to sign an innocent | ||
10 | -message of donating 1 @euro{} to Greenpeace and find out that he | ||
11 | -donated 1.000.000 @euro{} to Bad Inc. | ||
12 | +message of donating 1 euro to Greenpeace and find out that he | ||
13 | +donated 1.000.000 euro to Bad Inc. | ||
14 | |||
15 | For a hash algorithm to be called cryptographic the following three | ||
16 | requirements must hold | ||
diff --git a/meta/packages/gnutls/gnutls-1.4.4/onceonly.m4 b/meta/packages/gnutls/gnutls-1.4.4/onceonly.m4 new file mode 100644 index 0000000000..f6fec37cbf --- /dev/null +++ b/meta/packages/gnutls/gnutls-1.4.4/onceonly.m4 | |||
@@ -0,0 +1,63 @@ | |||
1 | # onceonly.m4 serial 3 | ||
2 | dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
3 | dnl This file is free software, distributed under the terms of the GNU | ||
4 | dnl General Public License. As a special exception to the GNU General | ||
5 | dnl Public License, this file may be distributed as part of a program | ||
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
8 | |||
9 | dnl This file defines some "once only" variants of standard autoconf macros. | ||
10 | dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS | ||
11 | dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS | ||
12 | dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS | ||
13 | dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC | ||
14 | dnl The advantage is that the check for each of the headers/functions/decls | ||
15 | dnl will be put only once into the 'configure' file. It keeps the size of | ||
16 | dnl the 'configure' file down, and avoids redundant output when 'configure' | ||
17 | dnl is run. | ||
18 | dnl The drawback is that the checks cannot be conditionalized. If you write | ||
19 | dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi | ||
20 | dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to | ||
21 | dnl empty, and the check will be inserted before the body of the AC_DEFUNed | ||
22 | dnl function. | ||
23 | |||
24 | dnl Autoconf version 2.57 or newer is recommended. | ||
25 | AC_PREREQ(2.54) | ||
26 | |||
27 | # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of | ||
28 | # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). | ||
29 | AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ | ||
30 | : | ||
31 | AC_FOREACH([gl_HEADER_NAME], [$1], [ | ||
32 | AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), | ||
33 | [-./], [___])), [ | ||
34 | AC_CHECK_HEADERS(gl_HEADER_NAME) | ||
35 | ]) | ||
36 | AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, | ||
37 | [-./], [___]))) | ||
38 | ]) | ||
39 | ]) | ||
40 | |||
41 | # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of | ||
42 | # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). | ||
43 | AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ | ||
44 | : | ||
45 | AC_FOREACH([gl_FUNC_NAME], [$1], [ | ||
46 | AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ | ||
47 | AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) | ||
48 | ]) | ||
49 | AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) | ||
50 | ]) | ||
51 | ]) | ||
52 | |||
53 | # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of | ||
54 | # AC_CHECK_DECLS(DECL1, DECL2, ...). | ||
55 | AC_DEFUN([AC_CHECK_DECLS_ONCE], [ | ||
56 | : | ||
57 | AC_FOREACH([gl_DECL_NAME], [$1], [ | ||
58 | AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ | ||
59 | AC_CHECK_DECLS(defn([gl_DECL_NAME])) | ||
60 | ]) | ||
61 | AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) | ||
62 | ]) | ||
63 | ]) | ||