summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-20 20:21:18 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-20 20:21:18 +0200
commitb679178e1c1b08286068462c9bbbbb4f303351e5 (patch)
treeb5906f4b3f534e9462cd769e23136b26a7444878
parent7114ead4d4e0e4159001089f861c60c80f5bb417 (diff)
downloadgnutls-b679178e1c1b08286068462c9bbbbb4f303351e5.tar.gz
Tables were also made floating
-rw-r--r--doc/cha-auth.texi7
-rw-r--r--doc/cha-intro-tls.texi19
-rw-r--r--doc/examples/ex-client1.c2
-rwxr-xr-xdoc/scripts/mytexi2latex67
4 files changed, 65 insertions, 30 deletions
diff --git a/doc/cha-auth.texi b/doc/cha-auth.texi
index 9a9bb38598..edfb36d161 100644
--- a/doc/cha-auth.texi
+++ b/doc/cha-auth.texi
@@ -348,10 +348,9 @@ maintain @acronym{PSK} keys.
In @acronym{GnuTLS} every key exchange method is associated with a
credentials type. So in order to enable to enable a specific method,
the corresponding credentials type should be initialized and set using
-@funcref{gnutls_credentials_set}. A mapping is shown below.
-
-Key exchange algorithms and the corresponding credential types:
+@funcref{gnutls_credentials_set}. A mapping is shown in @ref{tab:key-exchange-cred}.
+@float Table,tab:key-exchange-cred
@multitable @columnfractions .4 .25 .25
@headitem Key exchange @tab Client credentials @tab Server credentials
@@ -384,6 +383,8 @@ Key exchange algorithms and the corresponding credential types:
@tab @code{CRD_PSK}
@end multitable
+@caption{Key exchange algorithms and the corresponding credential types.}
+@end float
@node Parameters stored in credentials
@section Parameters Stored in Credentials
diff --git a/doc/cha-intro-tls.texi b/doc/cha-intro-tls.texi
index adfe22f627..b45551ee73 100644
--- a/doc/cha-intro-tls.texi
+++ b/doc/cha-intro-tls.texi
@@ -858,20 +858,17 @@ can be used both by clients and servers.
@cindex key sizes
In TLS, since a lot of algorithms are involved, it is not easy to set
-a consistent security level. For this reason this section will
+a consistent security level. For this reason in @ref{tab:key-sizes} we
present some correspondance between key sizes of symmetric algorithms
-and public key algorithms based on the ``ECRYPT II Yearly Report on Algorithms and Keysizes (2009-2010)''
-in @xcite{ECRYPT}. Those can be used to generate certificates with
-appropriate key sizes as well as parameters for Diffie-Hellman and SRP
+and public key algorithms based on @xcite{ECRYPT}.
+Those can be used to generate certificates with
+appropriate key sizes as well as select parameters for Diffie-Hellman and SRP
authentication.
+@float Table,tab:key-sizes
@multitable @columnfractions .10 .15 .10 .20 .35
-@item Security bits
-@tab RSA, DH and SRP parameter size
-@tab ECC key size
-@tab Security parameter
-@tab Description
+@headitem Security bits @tab RSA, DH and SRP parameter size @tab ECC key size @tab Security parameter @tab Description
@item 64
@tab 816
@@ -904,8 +901,10 @@ authentication.
@tab Foreseeable future
@end multitable
+@caption{Key sizes and security parameters.}
+@end float
-The first column provides a security parameter in a number of bits. This
+The first column provides a security parameter in a number of bits. This
gives an indication of the number of combinations to be tried by an adversary
to brute force a key. For example to test all possible keys in a 112 bit security parameter
@math{2^{112}} combinations have to be tried. For today's technology this is infeasible.
diff --git a/doc/examples/ex-client1.c b/doc/examples/ex-client1.c
index b5b7665845..322e400ec0 100644
--- a/doc/examples/ex-client1.c
+++ b/doc/examples/ex-client1.c
@@ -40,7 +40,7 @@ main (void)
gnutls_init (&session, GNUTLS_CLIENT);
/* Use default priorities */
- gnutls_priority_set_direct (session, "PERFORMANCE:+ANON-ECDH:+ANON-DH:!ARCFOUR-128",
+ gnutls_priority_set_direct (session, "PERFORMANCE:+ANON-ECDH:+ANON-DH",
NULL);
/* put the anonymous credentials to the current session
diff --git a/doc/scripts/mytexi2latex b/doc/scripts/mytexi2latex
index 38bbfd53c1..aa547665e9 100755
--- a/doc/scripts/mytexi2latex
+++ b/doc/scripts/mytexi2latex
@@ -11,6 +11,8 @@ use constant EXAMPLE => 7;
use constant SMALL_EXAMPLE => 8;
use constant QUOTE => 9;
use constant FLOAT => 10;
+use constant FLOAT_TABLE => 11;
+use constant MULTITABLE_INIT => 12;
sub unescape()
{
@@ -46,42 +48,55 @@ my $underscorematch = "[\\s\\w\\d-\\.\\/\\@\\_\\\\\:\\~]";
my $codematch = "[\\s\\w\\d-\\.\\/\\@\\_\\\\\:\\-\\\"\+\\%]";
my ($line, $prev_mode);
my ($verbatim, $label);
+my @stack = ();
+
while ($line = <FILE>) {
$verbatim = 0;
if ($mode == SKIP) {
#print "%menu: $line";
if ($line =~ m/\@end /) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$prev_mode = $mode;
next;
} elsif ($mode == ITEMIZE) {
#print "%itemize: $line";
if ($line =~ s/\@end itemize/\\end{itemize}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$line =~ s/\@item (.+)/\\item $1/g;
$prev_mode = $mode;
} elsif ($mode == ENUMERATE) {
if ($line =~ s/\@end itemize/\\end{enumerate}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
if ($line =~ s/\@end enumerate/\\end{enumerate}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$line =~ s/\@item(.*)/\\item $1/g;
$prev_mode = $mode;
} elsif ($mode == FLOAT) {
if ($line =~ s/\@end float/\\label\{$label\}\n\\end{figure}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$line =~ s/\@image\{(\w)\,($spacematch)\}/\\includegraphics\[width=$2\]\{$1\}/g;
$line =~ s/\@caption\{/\\caption\{/g;
$prev_mode = $mode;
+ } elsif ($mode == FLOAT_TABLE) {
+ if ($line =~ s/\@end float/\\label\{$label\}\n\\end{table}/g) {
+ $mode = pop(@stack);
+ } else {
+ $line =~ s/\@caption\{/\\caption\{/g;
+ $line =~ s/\@multitable \@columnfractions ([\.\d]+) ([\.\d]+) ([\.\d]+)$/\n\\begin{tabular}{|p{3.3cm}|p{3.3cm}|p{4.3cm}|}\n\\hline\n/g;
+ $line =~ s/\@multitable \@columnfractions ([\.\d]+) ([\.\d]+) ([\.\d]+) ([\.\d]+) ([\.\d]+)$/\n\\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{3cm}|}\n\\hline\n/g;
+ push(@stack, FLOAT_TABLE);
+ goto multitable;
+ }
+ $prev_mode = $mode;
} elsif ($mode == TABLE_ITEMIZE) {
if ($line =~ s/\@end table/\n\\end{itemize}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
chomp $line;
if ($line eq "") {
@@ -94,8 +109,9 @@ while ($line = <FILE>) {
$prev_mode = $mode;
} elsif ($mode == MULTITABLE) {
+multitable:
if ($line =~ s/\@end multitable/\\\\\n\\hline\n\\end{tabular}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
} else {
chomp $line;
if ($line eq "") {
@@ -105,31 +121,33 @@ while ($line = <FILE>) {
$line =~ s/\@tab/\&/g;
if ($line =~ m/\@headitem/) {
$line =~ s/\@headitem (.+)/$1\\\\\n\\hline\n\\hline/g;
+ $prev_mode = MULTITABLE_INIT;
} else {
- if ($prev_mode != $mode) {
+ if ($prev_mode == MULTITABLE_INIT) {
$line =~ s/\@item (.+)/$1/g;
$line =~ s/\@itemx (.+)/$1/g;
- } else {
+ $prev_mode = MULTITABLE;
+ } elsif ($prev_mode == MULTITABLE) {
$line =~ s/\@item (.+)/\\\\\n\\hline\n$1/g;
$line =~ s/\@itemx (.+)/\\\\\n\\hline\n$1/g;
}
}
}
- $prev_mode = $mode;
+
} elsif ($mode == VERBATIM) {
if ($line =~ s/\@end verbatim/\\end{verbatim}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$verbatim = 1;
$prev_mode = $mode;
} elsif ($mode == QUOTE) {
if ($line =~ s/\@end quotation/\\end{quote}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$prev_mode = $mode;
} elsif ($mode == EXAMPLE) {
if ($line =~ s/\@end example/\\end{example}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$line =~ s/\@{/{/g;
$line =~ s/\@}/}/g;
@@ -138,7 +156,7 @@ while ($line = <FILE>) {
$prev_mode = $mode;
} elsif ($mode == SMALL_EXAMPLE) {
if ($line =~ s/\@end smallexample/\\end{smallexample}/g) {
- $mode = NORMAL;
+ $mode = pop(@stack);
}
$line =~ s/\@{/\{/g;
$line =~ s/\@}/\}/g;
@@ -181,47 +199,64 @@ while ($line = <FILE>) {
} else {
$label = '';
}
-
if ($line =~ s/\@menu//g) {
$mode = SKIP;
+ push(@stack, NORMAL);
next;
}
if ($line =~ s/\@ifnottex//g) {
$mode = SKIP;
+ push(@stack, NORMAL);
next;
}
if ($line =~ s/\@itemize \@bullet/\\begin{itemize}/g) {
$mode = ITEMIZE;
+ push(@stack, NORMAL);
}
if ($line =~ s/\@itemize/\\begin{itemize}/g) {
$mode = ITEMIZE;
+ push(@stack, NORMAL);
}
- if ($line =~ s/\@float Figure\,(.*)/\\begin{figure}[htp]/g) {
+ if ($line =~ s/\@float Figure\,(.*)/\\begin{figure}[htp]\n\\centering/g) {
$label = $1;
+ push(@stack, NORMAL);
$mode = FLOAT;
}
+ if ($line =~ s/\@float Table\,(.*)/\\begin{table}[htp]\n\\centering/g) {
+ $label = $1;
+ push(@stack, NORMAL);
+ $mode = FLOAT_TABLE;
+ }
if ($line =~ s/\@enumerate/\\begin{enumerate}/g) {
+ push(@stack, NORMAL);
$mode = ENUMERATE;
}
if ($line =~ s/\@table .*/\n\\begin{itemize}/g) {
+ push(@stack, NORMAL);
$mode = TABLE_ITEMIZE;
}
if ($line =~ s/\@multitable \@columnfractions ([\.\d]+) ([\.\d]+) ([\.\d]+)$/\n\\begin{tabular}{|p{3.3cm}|p{3.3cm}|p{4.3cm}|}\n\\hline\n/g) {
+ push(@stack, NORMAL);
$mode = MULTITABLE;
}
if ($line =~ s/\@multitable \@columnfractions ([\.\d]+) ([\.\d]+) ([\.\d]+) ([\.\d]+) ([\.\d]+)$/\n\\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{3cm}|}\n\\hline\n/g) {
+ push(@stack, NORMAL);
$mode = MULTITABLE;
}
if ($line =~ s/\@example/\\begin{example}/g) {
+ push(@stack, NORMAL);
$mode = EXAMPLE;
}
if ($line =~ s/\@smallexample/\\begin{smallexample}/g) {
+ push(@stack, NORMAL);
$mode = SMALL_EXAMPLE;
}
if ($line =~ s/\@verbatim$/\\begin{verbatim}/g) {
+ push(@stack, NORMAL);
$mode = VERBATIM;
}
if ($line =~ s/\@quotation$/\\begin{quote}/g) {
+ push(@stack, NORMAL);
$mode = QUOTE;
}
}