summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc28
-rw-r--r--meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff636
-rw-r--r--meta/recipes-support/gnutls/gnutls/CVE-2014-0092-corrected-return-codes.patch106
-rw-r--r--meta/recipes-support/gnutls/gnutls/CVE-2014-1959-rejection-of-v1-intermediate-cert.patch33
-rw-r--r--meta/recipes-support/gnutls/gnutls/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch51
-rw-r--r--meta/recipes-support/gnutls/gnutls/configure-fix.patch65
-rw-r--r--meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch36
-rw-r--r--meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch46
-rw-r--r--meta/recipes-support/gnutls/gnutls/gnutls-openssl.patch126
-rw-r--r--meta/recipes-support/gnutls/gnutls_2.12.23.bb16
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.2.13.bb7
11 files changed, 42 insertions, 1108 deletions
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
index 206ba4b96e..8820b0ef39 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -1,46 +1,42 @@
1SUMMARY = "GNU Transport Layer Security Library" 1SUMMARY = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/" 2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls" 3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
4DEPENDS = "zlib lzo libtasn1 libgcrypt (>= 1.4.2) libcap readline" 4DEPENDS = "zlib nettle"
5
6INC_PR = "r8"
7 5
8LICENSE = "GPLv3+ & LGPLv2.1+" 6LICENSE = "GPLv3+ & LGPLv2.1+"
9LICENSE_${PN} = "LGPLv2.1+" 7LICENSE_${PN} = "LGPLv2.1+"
10LICENSE_${PN}-xx = "LGPLv2.1+" 8LICENSE_${PN}-xx = "LGPLv2.1+"
11LICENSE_${PN}-bin = "GPLv3+" 9LICENSE_${PN}-bin = "GPLv3+"
12LICENSE_${PN}-extra = "GPLv3+"
13LICENSE_${PN}-openssl = "GPLv3+" 10LICENSE_${PN}-openssl = "GPLv3+"
11
14LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
15 file://lib/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 13 file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
16 file://libextra/COPYING;md5=d32239bcb673463ab874e80d47fae504" 14
17 15
18SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" 16SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
19 17
20SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.bz2" 18SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
21 19
22inherit autotools-brokensep texinfo binconfig pkgconfig gettext lib_package 20inherit autotools-brokensep texinfo binconfig pkgconfig gettext lib_package
23 21
24EXTRA_OECONF="--with-included-opencdk --with-included-libcfg --disable-rpath \ 22EXTRA_OECONF="--disable-rpath \
25 --with-libtasn1-prefix=${STAGING_DIR_HOST}${prefix} \ 23 --with-included-libtasn1 \
26 --with-libgcrypt --with-libgcrypt-prefix=${STAGING_DIR_HOST}${prefix} \ 24 --enable-local-libopts \
27 --with-libdl-prefix=${STAGING_DIR_HOST}${prefix} \
28 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ 25 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
29 --with-libreadline-prefix=${STAGING_DIR_HOST}${prefix} \
30 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} \ 26 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} \
31 --with-lzo --disable-guile \ 27 --disable-guile \
32 --without-p11-kit \ 28 --without-p11-kit \
33 " 29 "
30
34do_configure_prepend() { 31do_configure_prepend() {
35 for dir in . lib libextra; do 32 for dir in . lib; do
36 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4 33 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
37 done 34 done
38} 35}
39 36
40PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-xx" 37PACKAGES =+ "${PN}-openssl ${PN}-xx"
41 38
42FILES_${PN}-dev += "${bindir}/gnutls-cli-debug" 39FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
43FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
44FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*" 40FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
45FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*" 41FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
46 42
diff --git a/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff b/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
deleted file mode 100644
index 76108a09fc..0000000000
--- a/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
+++ /dev/null
@@ -1,636 +0,0 @@
1Description: Update gdoc script from gnutls master.
2 This includes bef38b98c0536d81c0e4b2e78a9182e1df1d451c among other fixes:
3 .
4 [PATCH] Avoid depending on hash order in gdoc.
5 .
6 Previously, gdoc had a hash of regexp replacements for each output
7 format, and applied the replacements in the order that "keys" returned
8 for the hash. However, not all orders are safe -- and now that Perl 5.18
9 randomises hash order per-process, it only worked sometimes!
10
11Bug-Debian: http://bugs.debian.org/724167
12
13Upstream-Status: Backport
14
15Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
16
17--- gnutls26-2.12.23.orig/doc/scripts/gdoc
18+++ gnutls26-2.12.23/doc/scripts/gdoc
19@@ -1,4 +1,6 @@
20-#!/usr/bin/perl
21+eval '(exit $?0)' && eval 'exec perl "$0" ${1+"$@"}'
22+ & eval 'exec perl "$0" $argv:q'
23+ if 0;
24
25 ## Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson
26 ## added -texinfo, -listfunc, -pkg-name
27@@ -7,6 +9,8 @@
28 ## Copyright (c) 2001, 2002 Nikos Mavrogiannopoulos
29 ## added -tex
30 ## Copyright (c) 1998 Michael Zucchi
31+## Copyright (c) 2013 Adam Sampson
32+## made highlighting not depend on hash order, for Perl 5.18
33
34 # This program is free software: you can redistribute it and/or modify
35 # it under the terms of the GNU General Public License as published by
36@@ -132,57 +136,59 @@
37 use POSIX qw(strftime);
38
39 # match expressions used to find embedded type information
40-$type_constant = "((?<!\")\\\%(\\w+))";
41-$type_func = "(\\w+\\(\\))";
42-$type_param = "\\\@(\\w+)";
43-$type_struct = "\\\#(\\w+)";
44-$type_env = "(\\\$\\w+)";
45+$type_constant = "\\\%([A-Za-z0-9_]+)";
46+$type_func = "([A-Za-z0-9_]+\\(\\))";
47+$type_param = '\@([A-Za-z0-9_]+)\s*';
48+$type_struct = "\\\#([A-Za-z0-9_]+)";
49+$type_env = "(\\\$[A-Za-z0-9_]+)";
50
51
52 # Output conversion substitutions.
53 # One for each output format
54
55 # these work fairly well
56-%highlights_html = ( $type_constant, "<i>\$2</i>",
57- $type_func, "<b>\$1</b>",
58- $type_struct, "<i>\$1</i>",
59- $type_param, "<tt><b>\$1</b></tt>" );
60+@highlights_html = ( [$type_constant, '"<i>$1</i>"'],
61+ [$type_func, '"<b>$1</b>"'],
62+ [$type_struct, '"<i>$1</i>"'],
63+ [$type_param, '" <tt><b>$1</b></tt> "'] );
64 $blankline_html = "<p>";
65
66-%highlights_texinfo = ( $type_constant, "\\\@code{\$2}",
67- $type_func, "\\\@code{\$1}",
68- $type_struct, "\\\@code{\$1}",
69- $type_param, "\\\@code{\$1}" );
70+@highlights_texinfo = ( [$type_param, '" \@code{$1} "'],
71+ [$type_constant, '"\@code{$1} "'],
72+ [$type_func, '"\@code{$1} "'],
73+ [$type_struct, '"\@code{$1} "'],
74+ );
75 $blankline_texinfo = "";
76
77-%highlights_tex = ( $type_constant, "{\\\\it \$2}",
78- $type_func, "{\\\\bf \$1}",
79- $type_struct, "{\\\\it \$1}",
80- $type_param, "{\\\\bf \$1}" );
81+@highlights_tex = ( [$type_param, '" {\\\bf $1} "'],
82+ [$type_constant, '"{\\\it $1}"'],
83+ [$type_func, '"{\\\bf $1}"'],
84+ [$type_struct, '"{\\\it $1}"'],
85+ );
86 $blankline_tex = "\\\\";
87
88 # sgml, docbook format
89-%highlights_sgml = ( $type_constant, "<replaceable class=\"option\">\$2</replaceable>",
90- $type_func, "<function>\$1</function>",
91- $type_struct, "<structname>\$1</structname>",
92- $type_env, "<envar>\$1</envar>",
93- $type_param, "<parameter>\$1</parameter>" );
94+@highlights_sgml = ( [$type_constant, '"<replaceable class=\"option\">$1</replaceable>"'],
95+ [$type_func, '"<function>$1</function>"'],
96+ [$type_struct, '"<structname>$1</structname>"'],
97+ [$type_env, '"<envar>$1</envar>"'],
98+ [$type_param, '" <parameter>$1</parameter> "'] );
99 $blankline_sgml = "</para><para>\n";
100
101 # these are pretty rough
102-%highlights_man = ( $type_constant, "\\\\fB\$2\\\\fP",
103- $type_func, "\\\\fB\$1\\\\fP",
104- $type_struct, "\\\\fB\$1\\\\fP",
105- $type_param, "\\\\fI\$1\\\\fP" );
106+@highlights_man = ( [$type_constant, '"\\\fB$1\\\fP"'],
107+ [$type_func, '"\\\fB$1\\\fP"'],
108+ [$type_struct, '"\\\fB$1\\\fP"'],
109+ [$type_param, '" \\\fI$1\\\fP "'] );
110 $blankline_man = "";
111
112 # text-mode
113-%highlights_text = ( $type_constant, "\$2",
114- $type_func, "\$1",
115- $type_struct, "\$1",
116- $type_param, "\$1" );
117+@highlights_text = ( [$type_constant, '"$1"'],
118+ [$type_func, '"$1"'],
119+ [$type_struct, '"$1"'],
120+ [$type_param, '"$1 "'] );
121 $blankline_text = "";
122-
123+my $lineprefix = "";
124
125 sub usage {
126 print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -tex | -texinfo -listfunc ]\n";
127@@ -201,7 +207,7 @@ if ($#ARGV==-1) {
128
129 $verbose = 0;
130 $output_mode = "man";
131-%highlights = %highlights_man;
132+@highlights = @highlights_man;
133 $blankline = $blankline_man;
134 $modulename = "API Documentation";
135 $sourceversion = strftime "%Y-%m-%d", localtime;
136@@ -210,27 +216,27 @@ while ($ARGV[0] =~ m/^-(.*)/) {
137 $cmd = shift @ARGV;
138 if ($cmd eq "-html") {
139 $output_mode = "html";
140- %highlights = %highlights_html;
141+ @highlights = @highlights_html;
142 $blankline = $blankline_html;
143 } elsif ($cmd eq "-man") {
144 $output_mode = "man";
145- %highlights = %highlights_man;
146+ @highlights = @highlights_man;
147 $blankline = $blankline_man;
148 } elsif ($cmd eq "-tex") {
149 $output_mode = "tex";
150- %highlights = %highlights_tex;
151+ @highlights = @highlights_tex;
152 $blankline = $blankline_tex;
153 } elsif ($cmd eq "-texinfo") {
154 $output_mode = "texinfo";
155- %highlights = %highlights_texinfo;
156+ @highlights = @highlights_texinfo;
157 $blankline = $blankline_texinfo;
158 } elsif ($cmd eq "-text") {
159 $output_mode = "text";
160- %highlights = %highlights_text;
161+ @highlights = @highlights_text;
162 $blankline = $blankline_text;
163 } elsif ($cmd eq "-docbook") {
164 $output_mode = "sgml";
165- %highlights = %highlights_sgml;
166+ @highlights = @highlights_sgml;
167 $blankline = $blankline_sgml;
168 } elsif ($cmd eq "-listfunc") {
169 $output_mode = "listfunc";
170@@ -270,6 +276,8 @@ sub dump_section {
171 my $name = shift @_;
172 my $contents = join "\n", @_;
173
174+ $name = " $name";
175+
176 if ($name =~ m/$type_constant/) {
177 $name = $1;
178 # print STDERR "constant section '$1' = '$contents'\n";
179@@ -280,6 +288,7 @@ sub dump_section {
180 $parameters{$name} = $contents;
181 } else {
182 # print STDERR "other section '$name' = '$contents'\n";
183+ $name =~ tr/ //d;
184 $sections{$name} = $contents;
185 push @sectionlist, $name;
186 }
187@@ -296,35 +305,15 @@ sub dump_section {
188 # sections => %descriont descriptions
189 #
190
191-sub repstr {
192- $pattern = shift;
193- $repl = shift;
194- $match1 = shift;
195- $match2 = shift;
196- $match3 = shift;
197- $match4 = shift;
198-
199- $output = $repl;
200- $output =~ s,\$1,$match1,g;
201- $output =~ s,\$2,$match2,g;
202- $output =~ s,\$3,$match3,g;
203- $output =~ s,\$4,$match4,g;
204-
205- eval "\$return = qq/$output/";
206-
207-# print "pattern $pattern matched 1=$match1 2=$match2 3=$match3 4=$match4 replace $repl yielded $output interpolated $return\n";
208-
209- $return;
210-}
211-
212 sub just_highlight {
213 my $contents = join "\n", @_;
214 my $line;
215 my $ret = "";
216
217- foreach $pattern (keys %highlights) {
218-# print "scanning pattern $pattern ($highlights{$pattern})\n";
219- $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2, $3, $4):gse;
220+ foreach $highlight (@highlights) {
221+ my ($pattern, $replace) = @$highlight;
222+ #print "scanning pattern $pattern ($replace)\n";
223+ $contents =~ s/$pattern/$replace/gees;
224 }
225 foreach $line (split "\n", $contents) {
226 if ($line eq ""){
227@@ -370,13 +359,45 @@ sub output_texinfo {
228 }
229 }
230 foreach $section (@{$args{'sectionlist'}}) {
231+ $section =~ s/\@//g;
232 print "\n\@strong{$section:} " if $section ne $section_default;
233- $args{'sections'}{$section} =~ s:([{}]):\@\1:gs;
234+ $args{'sections'}{$section} =~ s:([{}]):\@$1:gs;
235 output_highlight($args{'sections'}{$section});
236 }
237 print "\@end deftypefun\n\n";
238 }
239
240+sub output_enum_texinfo {
241+ my %args = %{$_[0]};
242+ my ($parameter, $section);
243+ my $count;
244+ my $name = $args{'enum'};
245+ my $param;
246+ my $param2;
247+ my $sec;
248+ my $check;
249+ my $type;
250+
251+ print "\n\@c $name\n";
252+ print "\@table \@code\n";
253+
254+ $check=0;
255+ foreach $parameter (@{$args{'parameterlist'}}) {
256+ $param1 = $parameter;
257+ $param1 =~ s/_/_\@-/g;
258+
259+ $check = 1;
260+ print "\@item ".$param1."\n";
261+# print "\n";
262+
263+ $param2 = $args{'parameters'}{$parameter};
264+ $out = just_highlight($param2);
265+ chomp $out;
266+ print $out . "\n";
267+ }
268+ print "\@end table\n";
269+}
270+
271 # output in html
272 sub output_html {
273 my %args = %{$_[0]};
274@@ -428,7 +449,9 @@ sub output_tex {
275
276 $func =~ s/_/\\_/g;
277
278- print "\n\n\\subsection{". $func . "}\n\\label{" . $args{'function'} . "}\n";
279+ print "\n\n\\begin{function}\n";
280+ print "\\functionTitle{". $func . "}\n";
281+ print "\\index{". $func . "}\n";
282
283 $type = $args{'functiontype'};
284 $type =~ s/_/\\_/g;
285@@ -451,9 +474,8 @@ sub output_tex {
286 }
287 print ")\n";
288
289- print "\n{\\large{Arguments}}\n";
290+ print "\n\\begin{functionArguments}\n";
291
292- print "\\begin{itemize}\n";
293 $check=0;
294 foreach $parameter (@{$args{'parameterlist'}}) {
295 $param1 = $args{'parametertypes'}{$parameter};
296@@ -462,11 +484,12 @@ sub output_tex {
297 $param2 =~ s/_/\\_/g;
298
299 $check = 1;
300- print "\\item {\\it ".$param1."} {\\bf ".$param2."}: \n";
301+ print "\\functionArgument {\\it ".$param1."} {\\bf ".$param2."}: \n";
302 # print "\n";
303
304 $param3 = $args{'parameters'}{$parameter};
305- $param3 =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
306+ $param3 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
307+ $param3 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
308
309 $out = just_highlight($param3);
310 $out =~ s/_/\\_/g;
311@@ -475,31 +498,72 @@ sub output_tex {
312 if ($check==0) {
313 print "\\item void\n";
314 }
315- print "\\end{itemize}\n";
316+ print "\\end{functionArguments}\n";
317
318 foreach $section (@{$args{'sectionlist'}}) {
319 $sec = $section;
320 $sec =~ s/_/\\_/g;
321- $sec =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
322+ $sec =~ s/#([a-zA-Z\_]+)/{\\it $1}/g;
323
324- print "\n{\\large{$sec}}\\\\\n";
325- print "\\begin{rmfamily}\n";
326+ print "\n\\begin{function${sec}}\n";
327+ $out = $args{'sections'}{$section};
328
329- $sec = $args{'sections'}{$section};
330- $sec =~ s/\\:/:/g;
331- $sec =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
332- $sec =~ s/->/\$\\rightarrow\$/g;
333- $sec =~ s/([0-9]+)\^([0-9]+)/\$\{\1\}\^\{\2\}\$/g;
334-
335- $out = just_highlight($sec);
336- $out =~ s/_/\\_/g;
337+ $out =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
338+ $out =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
339+ $out =~ s/\@([a-zA-Z\_]+)/{\\bf $1}/g;
340+ $out =~ s/_/\\_\\-/g;
341+ $out =~ s/\$/\\\$/g;
342+ $out =~ s/#/\\#/g;
343+ $out =~ s/\n\n/\n/g;
344+ $out =~ s/\\:/:/g;
345+ $out =~ s/\-\>/\$\\rightarrow\$/g;
346+ $out =~ s/([0-9]+)\^([0-9]+)/\$\{$1\}\^\{$2\}\$/g;
347
348 print $out;
349- print "\\end{rmfamily}\n";
350+ print "\\end{function${sec}}\n";
351 }
352- print "\n";
353+ print "\\end{function}\n\n";
354 }
355
356+sub output_enum_tex {
357+ my %args = %{$_[0]};
358+ my ($parameter, $section);
359+ my $count;
360+ my $name = $args{'enum'};
361+ my $param;
362+ my $param2;
363+ my $sec;
364+ my $check;
365+ my $type;
366+
367+ print "\n\n\\begin{enum}\n";
368+ $name =~ s/_/\\_/g;
369+ print "\\enumTitle{". $name . "}\n";
370+ print "\\index{". $name . "}\n";
371+
372+ print "\n\\begin{enumList}\n";
373+
374+ $check=0;
375+ foreach $parameter (@{$args{'parameterlist'}}) {
376+ $param1 = $parameter;
377+ $param1 =~ s/_/\\_\\-/g;
378+
379+ $check = 1;
380+ print "\\enumElement{".$param1."}{";
381+# print "\n";
382+
383+ $param2 = $args{'parameters'}{$parameter};
384+ $param2 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
385+ $param2 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
386+ $out = just_highlight($param2);
387+ $out =~ s/_/\\_/g;
388+ chomp $out;
389+ print $out . "}\n";
390+ }
391+ print "\\end{enumList}\n";
392+
393+ print "\\end{enum}\n\n";
394+}
395
396 # output in sgml DocBook
397 sub output_sgml {
398@@ -639,11 +703,14 @@ sub output_man {
399 if ($args{'bugsto'}) {
400 print ".SH \"REPORTING BUGS\"\n";
401 print "Report bugs to <". $args{'bugsto'} . ">.\n";
402+ print ".br\n";
403+ print "General guidelines for reporting bugs: http://www.gnu.org/gethelp/\n";
404+ print ".br\n";
405 if ($args{'pkgname'}) {
406 print $args{'pkgname'} . " home page: " .
407 "http://www.gnu.org/software/" . $args{'module'} . "/\n";
408 }
409- print "General help using GNU software: http://www.gnu.org/gethelp/\n";
410+ print "\n";
411 }
412
413 if ($args{'copyright'}) {
414@@ -670,6 +737,10 @@ sub output_man {
415 print ".B info " . $args{'seeinfo'} . "\n";
416 print ".PP\n";
417 print "should give you access to the complete manual.\n";
418+ print "As an alternative you may obtain the manual from:\n";
419+ print ".IP\n";
420+ print ".B http://www.gnu.org/software/" . $args{'module'} . "/manual/\n";
421+ print ".PP\n";
422 }
423 }
424
425@@ -705,6 +776,10 @@ sub output_function {
426 eval "output_".$output_mode."(\@_);";
427 }
428
429+sub output_enum {
430+ eval "output_enum_".$output_mode."(\@_);";
431+}
432+
433
434 ##
435 # takes a function prototype and spits out all the details
436@@ -744,7 +819,7 @@ sub dump_function {
437 # print STDERR " :> @args\n";
438 $type = join " ", @args;
439
440- if ($parameters{$param} eq "" && $param != "void") {
441+ if ((!defined($parameters{$param}) || $parameters{$param} eq "") && $param ne "void") {
442 $parameters{$param} = "-- undescribed --";
443 print STDERR "warning: $lineno: Function parameter '$param' not described in '$function_name'\n";
444 }
445@@ -781,6 +856,56 @@ sub dump_function {
446 }
447 }
448
449+sub dump_enum {
450+ my $prototype = shift @_;
451+
452+ if (($prototype =~ m/^\s*typedef\s+enum\s*[a-zA-Z0-9_~:]*\s*\{([\-a-zA-Z0-9_~=,:\s\(\)\<]+)\s*\}\s*([a-zA-Z0-9_]+);.*/)) {
453+# || $prototype =~ m/^\s*enum\s+([a-zA-Z0-9_~:]+).*/) {
454+ $args = $1;
455+ $name = $2;
456+
457+ foreach $arg (split ',', $args) {
458+ # strip leading/trailing spaces
459+ $arg =~ s/^\s*//;
460+ $arg =~ s/\s*$//;
461+ $arg =~ s/([A-Za-z0-9_]+)\s*=.*/$1/g;
462+# print STDERR "SCAN ARG: '$arg'\n";
463+
464+ next if $arg eq '';
465+ if ((!defined($parameters{$arg}) || $parameters{$arg} eq "")) {
466+ $parameters{$arg} = "-- undescribed --";
467+ print STDERR "warning: $lineno: Enumeration parameter '$arg' not described in '$name'\n";
468+ }
469+
470+ push @parameterlist, $arg;
471+
472+# print STDERR "param = '$arg'\n";
473+ }
474+ } else {
475+# print STDERR "warning: $lineno: Cannot understand enumeration: '$prototype'\n";
476+ return;
477+ }
478+
479+ output_enum({'enum' => $name,
480+ 'module' => $modulename,
481+ 'sourceversion' => $sourceversion,
482+ 'include' => $include,
483+ 'includefuncprefix' => $includefuncprefix,
484+ 'bugsto' => $bugsto,
485+ 'pkgname' => $pkgname,
486+ 'copyright' => $copyright,
487+ 'verbatimcopying' => $verbatimcopying,
488+ 'seeinfo' => $seeinfo,
489+ 'functiontype' => $return_type,
490+ 'parameterlist' => \@parameterlist,
491+ 'parameters' => \%parameters,
492+ 'parametertypes' => \%parametertypes,
493+ 'sectionlist' => \@sectionlist,
494+ 'sections' => \%sections,
495+ 'purpose' => $function_purpose
496+ });
497+}
498+
499 ######################################################################
500 # main
501 # states
502@@ -797,7 +922,7 @@ $doc_start = "^/\\*\\*\$";
503 $doc_end = "\\*/";
504 $doc_com = "\\s*\\*\\s*";
505 $doc_func = $doc_com."(\\w+):?";
506-$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w ]+):\\s*(.*)";
507+$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w]+):\\s*(.*)";
508 $doc_content = $doc_com."(.*)";
509
510 %constants = ();
511@@ -809,6 +934,7 @@ $doc_content = $doc_com."(.*)";
512 $contents = "";
513 $section_default = "Description"; # default section
514 $section = $section_default;
515+$enum = 0;
516
517 $lineno = 0;
518 foreach $file (@ARGV) {
519@@ -816,18 +942,21 @@ foreach $file (@ARGV) {
520 print STDERR "Error: Cannot open file $file\n";
521 next;
522 }
523- while (<IN>) {
524+ while ($line = <IN>) {
525 $lineno++;
526
527 if ($state == 0) {
528- if (/$doc_start/o) {
529+ if ($line =~ /$doc_start/o) {
530 $state = 1; # next line is always the function name
531+# print STDERR "XXX: start of doc comment\n";
532 }
533 } elsif ($state == 1) { # this line is the function name (always)
534- if (/$doc_func/o) {
535+ if ($line =~ /$doc_func/o) {
536 $function = $1;
537 $state = 2;
538- if (/-\s*(.*)/) {
539+# print STDERR "XXX: start of doc comment, looking for prototype\n";
540+
541+ if ($line =~ /-\s*(.*)/) {
542 $function_purpose = $1;
543 } else {
544 $function_purpose = "";
545@@ -841,11 +970,11 @@ foreach $file (@ARGV) {
546 $state = 0;
547 }
548 } elsif ($state == 2) { # look for head: lines, and include content
549- if (/$doc_sect/o) {
550+ if ($line =~ /$doc_sect/o) {
551 $newsection = $1;
552 $newcontents = $2;
553
554- if ($contents ne "") {
555+ if ($contents ne '') {
556 dump_section($section, $contents);
557 $section = $section_default;
558 }
559@@ -855,7 +984,7 @@ foreach $file (@ARGV) {
560 $contents .= "\n";
561 }
562 $section = $newsection;
563- } elsif (/$doc_end/) {
564+ } elsif ($line =~ /$doc_end/) {
565
566 if ($contents ne "") {
567 dump_section($section, $contents);
568@@ -863,13 +992,12 @@ foreach $file (@ARGV) {
569 $contents = "";
570 }
571
572-# print STDERR "end of doc comment, looking for prototype\n";
573 $prototype = "";
574 $state = 3;
575- } elsif (/$doc_content/) {
576+ } elsif ($line =~ /$doc_content/) {
577 # miguel-style comment kludge, look for blank lines after
578 # @parameter line to signify start of description
579- if ($1 eq "" && $section =~ m/^@/) {
580+ if ($1 eq '' && $section =~ m/^@/) {
581 dump_section($section, $contents);
582 $section = $section_default;
583 $contents = "";
584@@ -881,13 +1009,16 @@ foreach $file (@ARGV) {
585 print STDERR "warning: $lineno: Bad line: $_";
586 }
587 } elsif ($state == 3) { # scanning for function { (end of prototype)
588- if (m#\s*/\*\s+MACDOC\s*#io) {
589+ if ($line =~ m#\s*/\*\s+MACDOC\s*#io) {
590 # do nothing
591 }
592- elsif (/([^\{]*)/) {
593+ elsif ($enum == 1 && $line =~ /(^\s*\{).*/) {
594+ $prototype .= "{";
595+ }
596+ elsif ($line =~ /([^\{]*)/) {
597 $prototype .= $1;
598 }
599- if (/\{/) {
600+ if ($enum == 0 && $line =~ /\{/) {
601 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
602 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
603 $prototype =~ s@^ +@@gos; # strip leading spaces
604@@ -901,9 +1032,32 @@ foreach $file (@ARGV) {
605 %sections = ();
606 @sectionlist = ();
607 $prototype = "";
608+ $enum = 0;
609
610 $state = 0;
611 }
612+ elsif ($enum == 1 && $line =~ /\}/) {
613+ $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
614+ $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
615+ $prototype =~ s@^ +@@gos; # strip leading spaces
616+ dump_enum($prototype);
617+
618+ $function = "";
619+ %constants = ();
620+ %parameters = ();
621+ %parametertypes = ();
622+ @parameterlist = ();
623+ %sections = ();
624+ @sectionlist = ();
625+ $prototype = "";
626+ $enum = 0;
627+
628+ $state = 0;
629+ }
630+ elsif ($line =~ /([a-zA-Z\s]+)enum(.*)$/) {
631+ $enum = 1;
632+ }
633+
634 }
635 }
636 }
diff --git a/meta/recipes-support/gnutls/gnutls/CVE-2014-0092-corrected-return-codes.patch b/meta/recipes-support/gnutls/gnutls/CVE-2014-0092-corrected-return-codes.patch
deleted file mode 100644
index 68ee5bc426..0000000000
--- a/meta/recipes-support/gnutls/gnutls/CVE-2014-0092-corrected-return-codes.patch
+++ /dev/null
@@ -1,106 +0,0 @@
1From 6aa26f78150ccbdf0aec1878a41c17c41d358a3b Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3Date: Thu, 27 Feb 2014 19:42:26 +0100
4Subject: [PATCH 1/3] corrected return codes
5
6Upstream-Status: Backport
7
8Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
9
10---
11 lib/x509/verify.c | 16 ++++++++++------
12 1 file changed, 10 insertions(+), 6 deletions(-)
13
14diff --git a/lib/x509/verify.c b/lib/x509/verify.c
15index c9a6b0d..eef85a8 100644
16--- a/lib/x509/verify.c
17+++ b/lib/x509/verify.c
18@@ -141,7 +141,7 @@ check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
19 if (result < 0)
20 {
21 gnutls_assert ();
22- goto cleanup;
23+ goto fail;
24 }
25
26 result =
27@@ -150,7 +150,7 @@ check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
28 if (result < 0)
29 {
30 gnutls_assert ();
31- goto cleanup;
32+ goto fail;
33 }
34
35 result =
36@@ -158,7 +158,7 @@ check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
37 if (result < 0)
38 {
39 gnutls_assert ();
40- goto cleanup;
41+ goto fail;
42 }
43
44 result =
45@@ -166,7 +166,7 @@ check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
46 if (result < 0)
47 {
48 gnutls_assert ();
49- goto cleanup;
50+ goto fail;
51 }
52
53 /* If the subject certificate is the same as the issuer
54@@ -206,6 +206,7 @@ check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
55 else
56 gnutls_assert ();
57
58+fail:
59 result = 0;
60
61 cleanup:
62@@ -330,7 +331,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
63 gnutls_datum_t cert_signed_data = { NULL, 0 };
64 gnutls_datum_t cert_signature = { NULL, 0 };
65 gnutls_x509_crt_t issuer = NULL;
66- int issuer_version, result;
67+ int issuer_version, result = 0;
68
69 if (output)
70 *output = 0;
71@@ -363,7 +364,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
72 if (issuer_version < 0)
73 {
74 gnutls_assert ();
75- return issuer_version;
76+ return 0;
77 }
78
79 if (!(flags & GNUTLS_VERIFY_DISABLE_CA_SIGN) &&
80@@ -385,6 +386,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
81 if (result < 0)
82 {
83 gnutls_assert ();
84+ result = 0;
85 goto cleanup;
86 }
87
88@@ -393,6 +395,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
89 if (result < 0)
90 {
91 gnutls_assert ();
92+ result = 0;
93 goto cleanup;
94 }
95
96@@ -410,6 +413,7 @@ _gnutls_verify_certificate2 (gnutls_x509_crt_t cert,
97 else if (result < 0)
98 {
99 gnutls_assert();
100+ result = 0;
101 goto cleanup;
102 }
103
104--
1051.8.3.2
106
diff --git a/meta/recipes-support/gnutls/gnutls/CVE-2014-1959-rejection-of-v1-intermediate-cert.patch b/meta/recipes-support/gnutls/gnutls/CVE-2014-1959-rejection-of-v1-intermediate-cert.patch
deleted file mode 100644
index 6567257a83..0000000000
--- a/meta/recipes-support/gnutls/gnutls/CVE-2014-1959-rejection-of-v1-intermediate-cert.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 467478d8ff08a3cb4be3034ff04c9d08a0ceba3e Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@redhat.com>
3Date: Wed, 12 Feb 2014 16:41:33 +0100
4Subject: [PATCH 1/5] Fixed bug that prevented the rejection of v1 intermediate
5 CA certificates.
6
7Upstream-Status: Backport
8
9Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
10
11---
12 lib/x509/verify.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/lib/x509/verify.c b/lib/x509/verify.c
16index 2efcebf..c9a6b0d 100644
17--- a/lib/x509/verify.c
18+++ b/lib/x509/verify.c
19@@ -645,7 +645,10 @@ _gnutls_x509_verify_certificate (const gnutls_x509_crt_t * certificate_list,
20 * certificates can exist in a supplied chain.
21 */
22 if (!(flags & GNUTLS_VERIFY_ALLOW_ANY_X509_V1_CA_CRT))
23- flags &= ~(GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
24+ {
25+ flags &= ~(GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
26+ flags |= GNUTLS_VERIFY_DO_NOT_ALLOW_X509_V1_CA_CRT;
27+ }
28 if ((ret =
29 _gnutls_verify_certificate2 (certificate_list[i - 1],
30 &certificate_list[i], 1, flags,
31--
321.8.3.2
33
diff --git a/meta/recipes-support/gnutls/gnutls/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-support/gnutls/gnutls/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
deleted file mode 100644
index 479596e53f..0000000000
--- a/meta/recipes-support/gnutls/gnutls/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1Upstream-Status: Inappropriate
2
3automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that,
4and the warnings are treated as errors because of the -Werror parameter.
5
6These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not
7eliminated these deprecated macros yet. So disable the treatment of warnings
8as errors until gettext is updated to remove the deprecated macros.
9
10Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
112012/07/09
12
13Index: gnutls-2.12.19/configure.ac
14===================================================================
15--- gnutls-2.12.19.orig/configure.ac
16+++ gnutls-2.12.19/configure.ac
17@@ -26,7 +26,7 @@ AC_INIT([GnuTLS], [2.12.19], [bug-gnutls
18 AC_CONFIG_AUX_DIR([build-aux])
19 AC_CONFIG_MACRO_DIR([m4])
20
21-AM_INIT_AUTOMAKE([1.10 no-dist-gzip dist-bzip2 -Wall -Werror -Wno-override])
22+AM_INIT_AUTOMAKE([1.10 no-dist-gzip dist-bzip2 -Wall -Wno-override])
23 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24 AM_CONFIG_HEADER(config.h)
25
26Index: gnutls-2.12.19/lib/configure.ac
27===================================================================
28--- gnutls-2.12.19.orig/lib/configure.ac
29+++ gnutls-2.12.19/lib/configure.ac
30@@ -26,7 +26,7 @@ AC_INIT([libgnutls], [2.12.19], [bug-gnu
31 AC_CONFIG_AUX_DIR([build-aux])
32 AC_CONFIG_MACRO_DIR([m4])
33
34-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
35+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37 AM_CONFIG_HEADER(config.h)
38
39Index: gnutls-2.12.19/libextra/configure.ac
40===================================================================
41--- gnutls-2.12.19.orig/libextra/configure.ac
42+++ gnutls-2.12.19/libextra/configure.ac
43@@ -26,7 +26,7 @@ AC_INIT([libgnutls-extra], [2.12.19], [b
44 AC_CONFIG_AUX_DIR([build-aux])
45 AC_CONFIG_MACRO_DIR([m4])
46
47-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
48+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override])
49 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
50 AM_CONFIG_HEADER(config.h)
51
diff --git a/meta/recipes-support/gnutls/gnutls/configure-fix.patch b/meta/recipes-support/gnutls/gnutls/configure-fix.patch
deleted file mode 100644
index 14f87e03d3..0000000000
--- a/meta/recipes-support/gnutls/gnutls/configure-fix.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1Upstream-Status: Inappropriate [distribution]
2
3rebased from original configure_madness.patch
4
5libtasn1 provides an .pc file in upstream,
6and a libgcrypt.pc is added in libgcrypt recipe,
7so use Requires.private for these two.
8
9against 2.8.6
10
1107/02/2010 - qhe
12
13---
14Index: gnutls-2.12.11/lib/configure.ac
15===================================================================
16--- gnutls-2.12.11.orig/lib/configure.ac
17+++ gnutls-2.12.11/lib/configure.ac
18@@ -126,8 +126,8 @@ lgl_INIT
19 AC_CHECK_FUNCS(getrusage,,)
20 AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
21
22-LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
23-LIBGNUTLS_CFLAGS="-I${includedir}"
24+LIBGNUTLS_LIBS="-lgnutls $LIBS"
25+LIBGNUTLS_CFLAGS=""
26 AC_SUBST(LIBGNUTLS_LIBS)
27 AC_SUBST(LIBGNUTLS_CFLAGS)
28
29Index: gnutls-2.12.11/lib/gnutls.pc.in
30===================================================================
31--- gnutls-2.12.11.orig/lib/gnutls.pc.in
32+++ gnutls-2.12.11/lib/gnutls.pc.in
33@@ -20,6 +20,4 @@ Description: Transport Security Layer im
34 URL: http://www.gnu.org/software/gnutls/
35 Version: @VERSION@
36 Libs: -L${libdir} -lgnutls
37-Libs.private: @LTLIBGCRYPT@ @LTLIBNETTLE@ @NETTLE_LIBS@ @GNUTLS_ZLIB_LIBS_PRIVATE@
38-@GNUTLS_REQUIRES_PRIVATE@
39 Cflags: -I${includedir}
40Index: gnutls-2.12.11/libextra/configure.ac
41===================================================================
42--- gnutls-2.12.11.orig/libextra/configure.ac
43+++ gnutls-2.12.11/libextra/configure.ac
44@@ -41,8 +41,8 @@ LIBGNUTLS_EXTRA_HOOKS
45
46 xgl_INIT
47
48-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
49-LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
50+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
51+LIBGNUTLS_EXTRA_CFLAGS=""
52 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
53 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
54
55Index: gnutls-2.12.11/libextra/gnutls-extra.pc.in
56===================================================================
57--- gnutls-2.12.11.orig/libextra/gnutls-extra.pc.in
58+++ gnutls-2.12.11/libextra/gnutls-extra.pc.in
59@@ -22,5 +22,5 @@ URL: http://www.gnu.org/software/gnutls/
60 Requires: gnutls
61 Version: @VERSION@
62 Libs: -L${libdir} -lgnutls-extra
63-Libs.private: @LIBGNUTLS_EXTRA_LIBS@
64+Libs.private: -llzo2
65 Cflags: -I${includedir}
diff --git a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
index b8f0d727ab..5e452c52e7 100644
--- a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
+++ b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
@@ -1,3 +1,8 @@
1From ae3370788ed3447bba16969d9eb1bf1b9631e1b7 Mon Sep 17 00:00:00 2001
2From: Valentin Popa <valentin.popa@intel.com>
3Date: Fri, 25 Apr 2014 13:58:55 +0300
4Subject: [PATCH] Correct rpl_gettimeofday signature
5
1Currently we fail on uclibc like below 6Currently we fail on uclibc like below
2 7
3| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, 8| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
@@ -14,7 +19,6 @@ Currently we fail on uclibc like below
14| make[4]: *** [ex-cxx.o] Error 1 19| make[4]: *** [ex-cxx.o] Error 1
15| make[4]: *** Waiting for unfinished jobs.... 20| make[4]: *** Waiting for unfinished jobs....
16 21
17
18GCC detects that we call 'restrict' as param name in function 22GCC detects that we call 'restrict' as param name in function
19signatures and complains since both params are called 'restrict' 23signatures and complains since both params are called 'restrict'
20therefore we use __restrict to denote the C99 keywork 24therefore we use __restrict to denote the C99 keywork
@@ -25,14 +29,17 @@ eglibc otherwise we will have same issue there too
25Signed-off-by: Khem Raj <raj.khem@gmail.com> 29Signed-off-by: Khem Raj <raj.khem@gmail.com>
26 30
27Upstream-Status: Pending 31Upstream-Status: Pending
32---
33 gl/sys_time.in.h | 8 ++++----
34 1 file changed, 4 insertions(+), 4 deletions(-)
28 35
29Index: gnutls-2.12.14/gl/sys_time.in.h 36diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
30=================================================================== 37index 84a17c9..6ceadc3 100644
31--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 38--- a/gl/sys_time.in.h
32+++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 39+++ b/gl/sys_time.in.h
33@@ -82,20 +82,20 @@ 40@@ -93,20 +93,20 @@ struct timeval
34 # define gettimeofday rpl_gettimeofday 41 # define gettimeofday rpl_gettimeofday
35 # endif 42 # endif
36 _GL_FUNCDECL_RPL (gettimeofday, int, 43 _GL_FUNCDECL_RPL (gettimeofday, int,
37- (struct timeval *restrict, void *restrict) 44- (struct timeval *restrict, void *restrict)
38+ (struct timeval *__restrict, void *__restrict) 45+ (struct timeval *__restrict, void *__restrict)
@@ -40,18 +47,21 @@ Index: gnutls-2.12.14/gl/sys_time.in.h
40 _GL_CXXALIAS_RPL (gettimeofday, int, 47 _GL_CXXALIAS_RPL (gettimeofday, int,
41- (struct timeval *restrict, void *restrict)); 48- (struct timeval *restrict, void *restrict));
42+ (struct timeval *__restrict, void *__restrict)); 49+ (struct timeval *__restrict, void *__restrict));
43 # else 50 # else
44 # if !@HAVE_GETTIMEOFDAY@ 51 # if !@HAVE_GETTIMEOFDAY@
45 _GL_FUNCDECL_SYS (gettimeofday, int, 52 _GL_FUNCDECL_SYS (gettimeofday, int,
46- (struct timeval *restrict, void *restrict) 53- (struct timeval *restrict, void *restrict)
47+ (struct timeval *__restrict, void *__restrict) 54+ (struct timeval *__restrict, void *__restrict)
48 _GL_ARG_NONNULL ((1))); 55 _GL_ARG_NONNULL ((1)));
49 # endif 56 # endif
50 /* Need to cast, because on glibc systems, by default, the second argument is 57 /* Need to cast, because on glibc systems, by default, the second argument is
51 struct timezone *. */ 58 struct timezone *. */
52 _GL_CXXALIAS_SYS_CAST (gettimeofday, int, 59 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
53- (struct timeval *restrict, void *restrict)); 60- (struct timeval *restrict, void *restrict));
54+ (struct timeval *__restrict, void *__restrict)); 61+ (struct timeval *__restrict, void *__restrict));
55 # endif 62 # endif
56 _GL_CXXALIASWARN (gettimeofday); 63 _GL_CXXALIASWARN (gettimeofday);
57 # elif defined GNULIB_POSIXCHECK 64 #elif defined GNULIB_POSIXCHECK
65--
661.9.1
67
diff --git a/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch b/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch
deleted file mode 100644
index 4c9137a657..0000000000
--- a/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1
2Upstream-Status: Inappropriate [configuration]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: gnutls-2.12.14/lib/po/Makefile.in.in
7===================================================================
8--- gnutls-2.12.14.orig/lib/po/Makefile.in.in
9+++ gnutls-2.12.14/lib/po/Makefile.in.in
10@@ -8,8 +8,8 @@
11 # Please note that the actual code of GNU gettext is covered by the GNU
12 # General Public License and is *not* in the public domain.
13 #
14-# Origin: gettext-0.17
15-GETTEXT_MACRO_VERSION = 0.17
16+# Origin: gettext-0.18
17+GETTEXT_MACRO_VERSION = 0.18
18
19 PACKAGE = @PACKAGE@
20 VERSION = @VERSION@
21Index: gnutls-2.12.14/lib/m4/po.m4
22===================================================================
23--- gnutls-2.12.14.orig/lib/m4/po.m4
24+++ gnutls-2.12.14/lib/m4/po.m4
25@@ -29,7 +29,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
26
27 dnl Release version of the gettext macros. This is used to ensure that
28 dnl the gettext macros and po/Makefile.in.in are in sync.
29- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
30+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
31
32 dnl Perform the following tests also if --disable-nls has been given,
33 dnl because they are needed for "make dist" to work.
34Index: gnutls-2.12.14/lib/configure.ac
35===================================================================
36--- gnutls-2.12.14.orig/lib/configure.ac
37+++ gnutls-2.12.14/lib/configure.ac
38@@ -39,7 +39,7 @@ AC_PROG_LIBTOOL
39 LIBGNUTLS_HOOKS
40
41 AM_GNU_GETTEXT([external])
42-AM_GNU_GETTEXT_VERSION([0.17])
43+AM_GNU_GETTEXT_VERSION([0.18])
44
45 AC_C_BIGENDIAN
46
diff --git a/meta/recipes-support/gnutls/gnutls/gnutls-openssl.patch b/meta/recipes-support/gnutls/gnutls/gnutls-openssl.patch
deleted file mode 100644
index ef70674881..0000000000
--- a/meta/recipes-support/gnutls/gnutls/gnutls-openssl.patch
+++ /dev/null
@@ -1,126 +0,0 @@
1Upstream-Status: Backport
2
3Index: gnutls-1.6.0/libextra/gnutls_openssl.c
4===================================================================
5--- gnutls-1.6.0.orig/libextra/gnutls_openssl.c 2006-08-13 22:34:09.000000000 +0200
6+++ gnutls-1.6.0/libextra/gnutls_openssl.c 2006-12-12 15:07:59.002227000 +0100
7@@ -256,12 +256,17 @@
8 ssl->rfd = (gnutls_transport_ptr_t) - 1;
9 ssl->wfd = (gnutls_transport_ptr_t) - 1;
10
11+ ssl->ssl_peek_buffer = NULL;
12+ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0;
13+
14 return ssl;
15 }
16
17 void
18 SSL_free (SSL * ssl)
19 {
20+ if (ssl->ssl_peek_buffer)
21+ free(ssl->ssl_peek_buffer);
22 gnutls_certificate_free_credentials (ssl->gnutls_cred);
23 gnutls_deinit (ssl->gnutls_state);
24 free (ssl);
25@@ -285,6 +290,7 @@
26 SSL_set_fd (SSL * ssl, int fd)
27 {
28 gnutls_transport_set_ptr (ssl->gnutls_state, GNUTLS_INT_TO_POINTER (fd));
29+ ssl->rfd = ssl->wfd = fd;
30 return 1;
31 }
32
33@@ -310,6 +316,17 @@
34 return 1;
35 }
36
37+int SSL_get_rfd(SSL *ssl)
38+{
39+ return ssl->rfd;
40+}
41+
42+int SSL_get_wfd(SSL *ssl)
43+{
44+ return ssl->wfd;
45+}
46+
47+
48 void
49 SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio)
50 {
51@@ -325,6 +342,8 @@
52 int
53 SSL_pending (SSL * ssl)
54 {
55+ if (ssl->ssl_peek_avail)
56+ return ssl->ssl_peek_avail;
57 return gnutls_record_check_pending (ssl->gnutls_state);
58 }
59
60@@ -480,11 +499,50 @@
61 return 1;
62 }
63
64+int SSL_peek(SSL *ssl, void *buf, int len)
65+{
66+ if (len > ssl->ssl_peek_buffer_size) {
67+ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len);
68+ ssl->ssl_peek_buffer_size = len;
69+ }
70+
71+ if (ssl->ssl_peek_avail == 0) {
72+
73+ int ret;
74+
75+ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len);
76+ ssl->last_error = ret;
77+
78+ if (ret > 0)
79+ ssl->ssl_peek_avail += ret;
80+ }
81+
82+ if (len > ssl->ssl_peek_avail)
83+ len = ssl->ssl_peek_avail;
84+
85+ memcpy (buf, ssl->ssl_peek_buffer, len);
86+
87+ return len;
88+}
89+
90 int
91 SSL_read (SSL * ssl, void *buf, int len)
92 {
93 int ret;
94
95+ if (ssl->ssl_peek_avail) {
96+ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail;
97+
98+ memcpy (buf, ssl->ssl_peek_buffer, n);
99+
100+ if (ssl->ssl_peek_avail > n)
101+ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n);
102+
103+ ssl->ssl_peek_avail -= n;
104+
105+ return n;
106+ }
107+
108 ret = gnutls_record_recv (ssl->gnutls_state, buf, len);
109 ssl->last_error = ret;
110
111Index: gnutls-1.6.0/includes/gnutls/openssl.h
112===================================================================
113--- gnutls-1.6.0.orig/libextra/includes/gnutls/openssl.h 2006-03-08 11:44:58.000000000 +0100
114+++ gnutls-1.6.0/libextra/includes/gnutls/openssl.h 2006-12-12 15:07:26.032227000 +0100
115@@ -164,6 +164,11 @@
116
117 gnutls_transport_ptr_t rfd;
118 gnutls_transport_ptr_t wfd;
119+
120+ char *ssl_peek_buffer;
121+ size_t ssl_peek_buffer_size;
122+ size_t ssl_peek_avail;
123+
124 };
125
126 #define rbio gnutls_state
diff --git a/meta/recipes-support/gnutls/gnutls_2.12.23.bb b/meta/recipes-support/gnutls/gnutls_2.12.23.bb
deleted file mode 100644
index 22182426ee..0000000000
--- a/meta/recipes-support/gnutls/gnutls_2.12.23.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1require gnutls.inc
2
3PR = "${INC_PR}.4"
4
5SRC_URI += "file://gnutls-openssl.patch \
6 file://correct_rpl_gettimeofday_signature.patch \
7 file://configure-fix.patch \
8 file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
9 file://CVE-2014-1959-rejection-of-v1-intermediate-cert.patch \
10 file://CVE-2014-0092-corrected-return-codes.patch \
11 file://25_updatedgdocfrommaster.diff \
12 ${@['', 'file://fix-gettext-version.patch'][bb.data.inherits_class('native', d) or (not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1))]} \
13 "
14
15SRC_URI[md5sum] = "f3c1d34bd5f113395c4be0d5dfc2b7fe"
16SRC_URI[sha256sum] = "dfa67a7e40727eb0913e75f3c44911d5d8cd58d1ead5acfe73dd933fc0d17ed2"
diff --git a/meta/recipes-support/gnutls/gnutls_3.2.13.bb b/meta/recipes-support/gnutls/gnutls_3.2.13.bb
new file mode 100644
index 0000000000..97e2df2010
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.2.13.bb
@@ -0,0 +1,7 @@
1require gnutls.inc
2
3SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
4 "
5
6SRC_URI[md5sum] = "300e5f413054e2f4719c1c3b5179a611"
7SRC_URI[sha256sum] = "e83676218ba80c4d577d7027b5b087692280347a9b06f90a452403ba70faa604"