summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/gnutls
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/gnutls')
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc49
-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.patch57
-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/libtasn1/dont-depend-on-help2man.patch14
-rw-r--r--meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch28
-rw-r--r--meta/recipes-support/gnutls/libtasn1_3.4.bb21
13 files changed, 1248 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 0000000000..25ec3a6659
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,49 @@
1SUMMARY = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
4DEPENDS = "zlib lzo libtasn1 libgcrypt (>= 1.4.2) libcap readline"
5
6INC_PR = "r8"
7
8LICENSE = "GPLv3+ & LGPLv2.1+"
9LICENSE_${PN} = "LGPLv2.1+"
10LICENSE_${PN}-xx = "LGPLv2.1+"
11LICENSE_${PN}-bin = "GPLv3+"
12LICENSE_${PN}-extra = "GPLv3+"
13LICENSE_${PN}-openssl = "GPLv3+"
14LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
15 file://lib/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
16 file://libextra/COPYING;md5=d32239bcb673463ab874e80d47fae504"
17
18SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
19
20SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.bz2"
21
22inherit autotools-brokensep binconfig pkgconfig gettext lib_package
23
24EXTRA_OECONF="--with-included-opencdk --with-included-libcfg --disable-rpath \
25 --with-libtasn1-prefix=${STAGING_DIR_HOST}${prefix} \
26 --with-libgcrypt --with-libgcrypt-prefix=${STAGING_DIR_HOST}${prefix} \
27 --with-libdl-prefix=${STAGING_DIR_HOST}${prefix} \
28 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
29 --with-libreadline-prefix=${STAGING_DIR_HOST}${prefix} \
30 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} \
31 --with-lzo --disable-guile \
32 --without-p11-kit \
33 "
34do_configure_prepend() {
35 for dir in . lib libextra; do
36 rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
37 done
38}
39
40PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-xx"
41
42FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
43FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
44FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
45FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
46
47LDFLAGS_append_libc-uclibc += " -pthread"
48
49BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff b/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
new file mode 100644
index 0000000000..76108a09fc
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
@@ -0,0 +1,636 @@
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
new file mode 100644
index 0000000000..68ee5bc426
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/CVE-2014-0092-corrected-return-codes.patch
@@ -0,0 +1,106 @@
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
new file mode 100644
index 0000000000..6567257a83
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/CVE-2014-1959-rejection-of-v1-intermediate-cert.patch
@@ -0,0 +1,33 @@
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
new file mode 100644
index 0000000000..479596e53f
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
@@ -0,0 +1,51 @@
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
new file mode 100644
index 0000000000..14f87e03d3
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/configure-fix.patch
@@ -0,0 +1,65 @@
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
new file mode 100644
index 0000000000..b8f0d727ab
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
@@ -0,0 +1,57 @@
1Currently we fail on uclibc like below
2
3| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
4| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26,
5| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392,
6| from ../../gl/signal.h:52,
7| from ../../gl/sys/select.h:58,
8| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220,
9| from ../../gl/sys/types.h:28,
10| from ../../lib/includes/gnutls/gnutls.h:46,
11| from ex-cxx.cpp:3:
12| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict'
13| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict'
14| make[4]: *** [ex-cxx.o] Error 1
15| make[4]: *** Waiting for unfinished jobs....
16
17
18GCC detects that we call 'restrict' as param name in function
19signatures and complains since both params are called 'restrict'
20therefore we use __restrict to denote the C99 keywork
21
22This only happens of uclibc since this code is not excercised with
23eglibc otherwise we will have same issue there too
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26
27Upstream-Status: Pending
28
29Index: gnutls-2.12.14/gl/sys_time.in.h
30===================================================================
31--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800
32+++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800
33@@ -82,20 +82,20 @@
34 # define gettimeofday rpl_gettimeofday
35 # endif
36 _GL_FUNCDECL_RPL (gettimeofday, int,
37- (struct timeval *restrict, void *restrict)
38+ (struct timeval *__restrict, void *__restrict)
39 _GL_ARG_NONNULL ((1)));
40 _GL_CXXALIAS_RPL (gettimeofday, int,
41- (struct timeval *restrict, void *restrict));
42+ (struct timeval *__restrict, void *__restrict));
43 # else
44 # if !@HAVE_GETTIMEOFDAY@
45 _GL_FUNCDECL_SYS (gettimeofday, int,
46- (struct timeval *restrict, void *restrict)
47+ (struct timeval *__restrict, void *__restrict)
48 _GL_ARG_NONNULL ((1)));
49 # endif
50 /* Need to cast, because on glibc systems, by default, the second argument is
51 struct timezone *. */
52 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
53- (struct timeval *restrict, void *restrict));
54+ (struct timeval *__restrict, void *__restrict));
55 # endif
56 _GL_CXXALIASWARN (gettimeofday);
57 # elif defined GNULIB_POSIXCHECK
diff --git a/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch b/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch
new file mode 100644
index 0000000000..4c9137a657
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/fix-gettext-version.patch
@@ -0,0 +1,46 @@
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
new file mode 100644
index 0000000000..ef70674881
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/gnutls-openssl.patch
@@ -0,0 +1,126 @@
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
new file mode 100644
index 0000000000..22182426ee
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_2.12.23.bb
@@ -0,0 +1,16 @@
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/libtasn1/dont-depend-on-help2man.patch b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
new file mode 100644
index 0000000000..2ac89f3b32
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Inappropriate
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libtasn1-2.14/doc/Makefile.am libtasn1-2.14/doc/Makefile.am
5--- libtasn1-2.14/doc/Makefile.am 2012-09-24 15:08:42.000000000 +0300
6+++ libtasn1-2.14/doc/Makefile.am 2013-01-03 07:35:26.702763403 +0200
7@@ -31,7 +31,7 @@
8 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
9 --no-split --number-sections --css-include=texinfo.css
10
11-dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1
12+dist_man_MANS = $(gdoc_MANS)
13
14 HELP2MAN_OPTS = --info-page libtasn1
diff --git a/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch
new file mode 100644
index 0000000000..5540bef940
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Pending
2
3This patch avoids following issues with automake 1.12:
4
5| automake: warnings are treated as errors
6| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libtasn1.la': linking libtool libraries using a non-POSIX
7| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/02
11
12
13Index: libtasn1-2.11/configure.ac
14===================================================================
15--- libtasn1-2.11.orig/configure.ac
16+++ libtasn1-2.11/configure.ac
17@@ -38,6 +38,11 @@ lgl_EARLY
18 AC_PROG_YACC
19 AC_PROG_LN_S
20
21+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
22+m4_pattern_allow([AM_PROG_AR])
23+AM_PROG_AR
24+
25+
26 dnl Checks for programs.
27 AC_PROG_INSTALL
28 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
diff --git a/meta/recipes-support/gnutls/libtasn1_3.4.bb b/meta/recipes-support/gnutls/libtasn1_3.4.bb
new file mode 100644
index 0000000000..590987e504
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1_3.4.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Library for ASN.1 and DER manipulation"
2HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
3
4LICENSE = "GPLv3+ & LGPLv2.1+"
5LICENSE_${PN}-bin = "GPLv3+"
6LICENSE_${PN} = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
8 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
9 file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
10
11SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
12 file://libtasn1_fix_for_automake_1.12.patch \
13 file://dont-depend-on-help2man.patch \
14 "
15
16SRC_URI[md5sum] = "21ec021c534b0f30b2834ce233c70f15"
17SRC_URI[sha256sum] = "f353507a458fe2372b791016a056c95946eebfc7256b49013851f134a5e6acc8"
18
19inherit autotools binconfig lib_package
20
21BBCLASSEXTEND = "native"