summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-04-17 14:18:13 +0200
committerLudovic Courtès <ludo@gnu.org>2008-04-17 14:18:13 +0200
commitb70070b6b11327e7967c83ad77e9d35fa2db05a9 (patch)
tree7f20d36c1102b7bb35c7325f1cdb0a97f6d97f35
parentd5b3b9c5b4cd118cb3229f3b64d8bda146bf7b1b (diff)
parent2b4f4e3fd2b0df0b77b283928154b5f3e9139fe8 (diff)
downloadgnutls-b70070b6b11327e7967c83ad77e9d35fa2db05a9.tar.gz
Merge branch 'master' of ssh://civodul@git.savannah.gnu.org/srv/git/gnutls
Conflicts: configure.in
-rw-r--r--ChangeLog308
-rw-r--r--GNUmakefile97
-rw-r--r--Makefile.am4
-rw-r--r--NEWS60
-rw-r--r--README4
-rw-r--r--THANKS4
-rw-r--r--build-aux/GNUmakefile60
-rwxr-xr-xbuild-aux/gnupload8
-rw-r--r--cfg.mk (renamed from maint-cfg.mk)11
-rw-r--r--configure.in67
-rw-r--r--doc/examples/Makefile.am6
-rw-r--r--doc/gnutls.texi114
-rw-r--r--doc/manpages/Makefile.am500
-rw-r--r--doc/manpages/certtool.112
-rw-r--r--doc/manpages/gnutls-cli.176
-rw-r--r--doc/manpages/gnutls-serv.175
-rw-r--r--doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-00.txt539
-rw-r--r--doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-01.txt539
-rw-r--r--doc/protocol/draft-ietf-netconf-tls-01.txt485
-rw-r--r--doc/protocol/draft-ietf-tls-ecc-new-mac-05.txt448
-rw-r--r--doc/protocol/draft-ietf-tls-ecdhe-psk-01.txt377
-rw-r--r--doc/protocol/draft-ietf-tls-rfc4346-bis-10.txt5660
-rw-r--r--doc/protocol/draft-ietf-tls-rsa-aes-gcm-03.txt504
-rw-r--r--doc/protocol/draft-keromytis-tls-authz-keynote-00.txt210
-rw-r--r--doc/protocol/draft-nir-tls-eap-03.txt1176
-rw-r--r--doc/protocol/draft-rescorla-tls-suiteb-02.txt449
-rw-r--r--doc/reference/Makefile.am3
-rw-r--r--gl/fseeko.c21
-rw-r--r--gl/getdelim.c7
-rw-r--r--gl/gnulib.mk16
-rw-r--r--gl/m4/eoverflow.m470
-rw-r--r--gl/m4/gnulib-cache.m45
-rw-r--r--gl/m4/gnulib-common.m423
-rw-r--r--gl/m4/gnulib-comp.m420
-rw-r--r--gl/m4/include_next.m44
-rw-r--r--gl/m4/lib-link.m466
-rw-r--r--includes/gnutls/crypto.h14
-rw-r--r--includes/gnutls/gnutls.h.in8
-rw-r--r--includes/gnutls/openpgp.h2
-rw-r--r--lgl/Makefile.am7
-rw-r--r--lgl/gc-gnulib.c33
-rw-r--r--lgl/gc-libgcrypt.c18
-rw-r--r--lgl/gc.h6
-rw-r--r--lgl/m4/gc-random.m412
-rw-r--r--lgl/m4/gnulib-cache.m47
-rw-r--r--lgl/m4/gnulib-common.m423
-rw-r--r--lgl/m4/gnulib-comp.m45
-rw-r--r--lgl/m4/include_next.m44
-rw-r--r--lgl/m4/lib-link.m466
-rw-r--r--lgl/m4/stdint.m416
-rw-r--r--lgl/m4/stdlib_h.m47
-rw-r--r--lgl/m4/sys_socket_h.m425
-rw-r--r--lgl/m4/vasnprintf.m43
-rw-r--r--lgl/override/lib/gc-libgcrypt.c.diff26
-rw-r--r--lgl/snprintf.c7
-rw-r--r--lgl/stdlib.in.h19
-rw-r--r--lgl/sys_socket.in.h27
-rw-r--r--lgl/vasnprintf.c126
-rw-r--r--lgl/vasprintf.c7
-rw-r--r--lgl/wchar.in.h11
-rw-r--r--lib/Makefile.am15
-rw-r--r--lib/auth_cert.c8
-rw-r--r--lib/auth_psk_passwd.c17
-rw-r--r--lib/auth_rsa.c13
-rw-r--r--lib/auth_srp_passwd.c23
-rw-r--r--lib/crypto.c76
-rw-r--r--lib/crypto.h1
-rw-r--r--lib/gnutls_algorithms.c6
-rw-r--r--lib/gnutls_asn1_tab.c112
-rw-r--r--lib/gnutls_buffers.c6
-rw-r--r--lib/gnutls_cipher.c14
-rw-r--r--lib/gnutls_constate.c14
-rw-r--r--lib/gnutls_errors.c3
-rw-r--r--lib/gnutls_global.c13
-rw-r--r--lib/gnutls_handshake.c23
-rw-r--r--lib/gnutls_mem.h26
-rw-r--r--lib/gnutls_mpi.c16
-rw-r--r--lib/gnutls_openpgp.c2
-rw-r--r--lib/gnutls_pk.c40
-rw-r--r--lib/gnutls_state.c8
-rw-r--r--lib/opencdk/misc.c76
-rw-r--r--lib/opencdk/pubkey.c5
-rw-r--r--lib/openpgp/extras.c6
-rw-r--r--lib/openpgp/openpgp_int.h2
-rw-r--r--lib/openpgp/output.c30
-rw-r--r--lib/openpgp/pgp.c63
-rw-r--r--lib/openpgp/privkey.c37
-rw-r--r--lib/pkix_asn1_tab.c2236
-rw-r--r--lib/random.c86
-rw-r--r--lib/random.h14
-rw-r--r--lib/x509/crl.c6
-rw-r--r--lib/x509/crq.c47
-rw-r--r--lib/x509/mpi.c8
-rw-r--r--lib/x509/output.c10
-rw-r--r--lib/x509/pkcs12.c7
-rw-r--r--lib/x509/privkey_pkcs8.c30
-rw-r--r--lib/x509/sign.c6
-rw-r--r--lib/x509/x509.c18
-rw-r--r--maint.mk (renamed from build-aux/maint.mk)0
-rw-r--r--po/Makevars5
-rw-r--r--po/de.po.in (renamed from po/de.po)0
-rw-r--r--po/ms.po.in (renamed from po/ms.po)0
-rw-r--r--po/nl.po.in (renamed from po/nl.po)0
-rw-r--r--po/pl.po.in (renamed from po/pl.po)0
-rw-r--r--po/sv.po.in (renamed from po/sv.po)0
-rw-r--r--src/certtool.c4
-rw-r--r--src/cli.c11
-rw-r--r--src/tls_test.c11
-rwxr-xr-xtests/pathlen/pathlen6
109 files changed, 13771 insertions, 1896 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e465cfa8a..b6c325bf23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,311 @@
+2008-04-14 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Version 2.3.5.
+
+2008-04-14 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-14 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-14 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * src/cli.c, src/tls_test.c: Rely on sys/socket.h for SHUT_*.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * lgl/m4/sys_socket_h.m4, lgl/sys_socket.in.h: Update gnulib files.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * lgl/Makefile.am, lgl/gc-libgcrypt.c, lgl/m4/gnulib-cache.m4:
+ Update gnulib files.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * lgl/m4/gnulib-cache.m4, lgl/override/lib/gc-libgcrypt.c.diff:
+ Quick fix for SHA-224 and old libgcrypt's.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * doc/manpages/Makefile.am: Generated.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * lib/random.h: Fix warnings.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * cfg.mk: Typo.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * po/Makevars: We don't need --no-location any more, git stores
+ *.po.in's.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * Makefile.am, cfg.mk: Translation fixes.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * po/de.po, po/de.po.in, po/ms.po, po/ms.po.in, po/nl.po,
+ po/nl.po.in, po/pl.po, po/pl.po.in, po/sv.po, po/sv.po.in: Improve
+ translation handling to avoid git conflicts.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * GNUmakefile, build-aux/gnupload, gl/fseeko.c, gl/getdelim.c,
+ gl/m4/eoverflow.m4, gl/m4/gnulib-common.m4, gl/m4/gnulib-comp.m4,
+ gl/m4/include_next.m4, lgl/gc-gnulib.c, lgl/m4/gc-random.m4,
+ lgl/m4/gnulib-common.m4, lgl/m4/gnulib-comp.m4,
+ lgl/m4/include_next.m4, lgl/m4/stdint.m4, lgl/m4/vasnprintf.m4,
+ lgl/snprintf.c, lgl/vasnprintf.c, lgl/vasprintf.c, lgl/wchar.in.h:
+ Update gnulib files.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * doc/manpages/Makefile.am: Cosmetic.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * doc/manpages/Makefile.am: Whitespace fix.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * doc/manpages/Makefile.am: Improve APIMANS/SRPMANS, to make it
+ easier to understand changes.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * configure.in: Fix test.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * configure.in: Don't bother checking for --output-def if shared
+ libraries are disabled. Based on report from Massimo Gaspari
+ <massimo.gaspari@alice.it> in
+ <http://permalink.gmane.org/gmane.network.gnutls.general/1145>.
+
+2008-04-13 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS, THANKS, doc/gnutls.texi: Document how to generate CRLs.
+
+2008-04-13 Nikos Mavrogiannopoulos <nmav@crystal.(none)>
+
+ * includes/gnutls/openpgp.h: changed api.
+
+2008-04-12 Nikos Mavrogiannopoulos <nmav@crystal.(none)>
+
+ * src/cli.c: get_auth_subkey has one more parameter.
+
+2008-04-12 Nikos Mavrogiannopoulos <nmav@crystal.(none)>
+
+ * lib/opencdk/pubkey.c: return the size of the required buffer to
+ hold the data
+
+2008-04-12 Nikos Mavrogiannopoulos <nmav@crystal.(none)>
+
+ * lib/openpgp/output.c: Deallocate memory from parameters only when
+ function run was successful.
+
+2008-04-12 Nikos Mavrogiannopoulos <nmav@crystal.(none)>
+
+ * lib/gnutls_openpgp.c, lib/openpgp/pgp.c: Added a flag in
+ get_auth_subkey() to work for all use cases
+
+2008-04-10 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/pgp.c: do not return any subkey if an authentication
+ subkey is not found
+
+2008-04-10 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/extras.c, lib/openpgp/pgp.c, lib/openpgp/privkey.c:
+ corrected bug in openpgp import when data is of size zero. Reported
+ by Daniel Kahn
+
+2008-04-04 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/pgp.c, lib/openpgp/privkey.c: Fail at import stage if
+ a non proper certificate is loaded.
+
+2008-04-04 Simon Josefsson <simon@josefsson.org>
+
+ * doc/protocol/draft-nir-tls-eap-03.txt: Add.
+
+2008-04-04 Simon Josefsson <simon@josefsson.org>
+
+ * doc/protocol/draft-ietf-netconf-tls-01.txt: Add.
+
+2008-04-03 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Add.
+
+2008-04-03 Simon Josefsson <simon@josefsson.org>
+
+ * lib/auth_psk_passwd.c: (_gnutls_psk_pwd_find_entry): Call fclose after fopen. Tiny patch
+ from Laurence Withers <l@lwithers.me.uk>, see
+
+ <http://lists.gnu.org/archive/html/gnutls-devel/2008-04/msg00002.html>.
+
+2008-04-03 Simon Josefsson <simon@josefsson.org>
+
+ * : commit 117152d4c91e1c01055eedada1412ec763e5196b Author: Simon
+ Josefsson <simon@josefsson.org> Date: Thu Apr 3 09:40:01 2008
+ +0200
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * NEWS: documented the openpgp updates.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * doc/manpages/certtool.1: added the openpgp functionality to the
+ manpage.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/privkey.c: Corrected exporting the DSA secret key
+ parameters.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/openpgp_int.h, lib/openpgp/pgp.c,
+ lib/openpgp/privkey.c: Add proper ARMOR header in private keys.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/output.c, lib/openpgp/pgp.c, lib/openpgp/privkey.c:
+ Consistent printing of revoked status. Consistent printing of key
+ algorithm.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * lib/gnutls_errors.c: Added revoked UID error string.
+
+2008-04-02 Nikos <nmav@crystal.(none)>
+
+ * lib/openpgp/output.c, lib/openpgp/privkey.c: Print revoked names.
+
+2008-04-02 Simon Josefsson <simon@josefsson.org>
+
+ * doc/protocol/draft-ietf-tls-ecdhe-psk-01.txt: Add.
+
+2008-03-30 Simon Josefsson <simon@josefsson.org>
+
+ * lib/crypto.h: Fix warnings.
+
+2008-03-30 Simon Josefsson <simon@josefsson.org>
+
+ * lgl/Makefile.am, lgl/gc-libgcrypt.c, lgl/gc.h,
+ lgl/m4/stdlib_h.m4, lgl/stdlib.in.h: Update gnulib files.
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * NEWS: Documented the --priority option to gnutls-cli and
+ gnutls-serv.
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * doc/manpages/gnutls-cli.1, doc/manpages/gnutls-serv.1: documented
+ the --priority option.
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * NEWS: corrected the news entry.
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * lib/auth_cert.c: Reverted to gnutls 2.2 behaviour of allowing an
+ empty key (for PKCS #11). Reported by Joe Orton.
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * NEWS: gnutls_crypto_rnd_register: ADDED
+
+2008-03-29 Nikos <nmav@crystal.(none)>
+
+ * : commit 0b37eef0f6b6626d5e4b5936bbc6f012416ef61a Author: Nikos
+ <nmav@crystal.(none)> Date: Sat Mar 29 12:01:27 2008 +0200
+
+2008-03-29 Simon Josefsson <simon@josefsson.org>
+
+ * doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-00.txt,
+ doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-01.txt: Add.
+
+2008-03-28 Simon Josefsson <simon@josefsson.org>
+
+ * lgl/gc-libgcrypt.c, lgl/gc.h: Update gnulib files.
+
+2008-03-28 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS: Entries added at wrong place, move them.
+
+2008-03-28 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS, includes/gnutls/gnutls.h.in: Avoid defining SHA-224 MAC
+ since it isn't specified in TLS 1.2.
+
+2008-03-28 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS, includes/gnutls/gnutls.h.in: Add SHA-224 enum types.
+
+2008-03-28 Simon Josefsson <simon@josefsson.org>
+
+ * gl/gnulib.mk: Update gnulib files.
+
+2008-03-27 Simon Josefsson <simon@josefsson.org>
+
+ * doc/protocol/draft-ietf-tls-rfc4346-bis-10.txt: Add.
+
+2008-03-25 Simon Josefsson <simon@josefsson.org>
+
+ * GNUmakefile, build-aux/GNUmakefile, build-aux/maint.mk, cfg.mk,
+ gl/gnulib.mk, gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4,
+ gl/m4/lib-link.m4, lgl/Makefile.am, lgl/m4/gnulib-cache.m4,
+ lgl/m4/gnulib-comp.m4, lgl/m4/lib-link.m4, maint-cfg.mk, maint.mk:
+ Update gnulib files.
+
+2008-03-19 Simon Josefsson <simon@josefsson.org>
+
+ * libextra/gnutls_extra.c: Fix LZO build failure.
+
+2008-03-19 Ludovic Courtès <ludo@gnu.org>
+
+ * guile/src/Makefile.am: guile: Compile with `-fgnu89-inline'. * guile/src/Makefile.am (AM_CFLAGS): Add `-fgnu89-inline' when `HAVE_GCC' is true. This works around the fact that GnuTLS is compiled with `-std=c99', while Guile and GMP expect GNU inline semantics, which defer from C99 inline semantics.
+
+2008-03-19 Ludovic Courtès <ludo@gnu.org>
+
+ * guile/src/core.c: guile: Don't declare `inline' functions that use
+ `alloca ()'. * guile/src/core.c (set_certificate_file): Remove `inline' keyword.
+
+2008-03-19 Simon Josefsson <simon@josefsson.org>
+
+ * NEWS, configure.in: Bump versions.
+
+2008-03-19 Simon Josefsson <simon@josefsson.org>
+
+ * ChangeLog: Generated.
+
2008-03-19 Simon Josefsson <simon@josefsson.org>
* includes/Makefile.am: Dist gnutls/crypto.h.
diff --git a/GNUmakefile b/GNUmakefile
index 78ba0d1a38..0c1bc38afb 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,9 +1,92 @@
-have-gnulib-files := $(shell test -f gnulib.mk && test -f maint.mk && echo yes)
-ifneq ($(have-gnulib-files),yes)
-gnulib.mk:
- ln -s build-aux/GNUmakefile gnulib.mk || cp build-aux/GNUmakefile gnulib.mk
- ln -s build-aux/maint.mk maint.mk || cp build-aux/maint.mk maint.mk
- mv build-aux/config.rpath build-aux/config.rpath-
+# Having a separate GNUmakefile lets me `include' the dynamically
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+
+# Copyright (C) 2001, 2003, 2006-2008 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Systems where /bin/sh is not the default shell need this. The $(shell)
+# command below won't work with e.g. stock DOS/Windows shells.
+ifeq ($(wildcard /bin/s[h]),/bin/sh)
+SHELL = /bin/sh
+else
+# will be used only with the next shell-test line, then overwritten
+# by a configured-in value
+SHELL = sh
+endif
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+_have-Makefile := $(shell test -f Makefile && echo yes)
+ifeq ($(_have-Makefile),yes)
+
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+
+include Makefile
+
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/cfg.mk
+include $(srcdir)/maint.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf
+
+# Ensure that $(VERSION) is up to date for dist-related targets, but not
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
+_have-git-version-gen := \
+ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
+ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
+ _is-dist-target = $(filter-out %clean, \
+ $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
+ ifneq (,$(_is-dist-target))
+ _curr-ver := $(shell cd $(srcdir) && ./$(_build-aux)/git-version-gen \
+ $(srcdir)/.tarball-version)
+ ifneq ($(_curr-ver),$(VERSION))
+ $(info INFO: running autoreconf for new version string: $(_curr-ver))
+ _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \
+ && $(_autoreconf))
+ endif
+ endif
+endif
+
+else
+
+.DEFAULT_GOAL := abort-due-to-no-makefile
+srcdir = .
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.mk
+include ./maint.mk
+
+ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
+$(MAKECMDGOALS): abort-due-to-no-makefile
+endif
+
+abort-due-to-no-makefile:
+ @echo There seems to be no Makefile in this directory. 1>&2
+ @echo "You must run ./configure before running \`make'." 1>&2
+ @exit 1
+
endif
--include gnulib.mk
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel. This is necessary in case someone tries to
+# build multiple targets on one command line.
+.NOTPARALLEL:
diff --git a/Makefile.am b/Makefile.am
index 74df98f8df..f4d08a49b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,10 +32,6 @@ ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lgl/m4
# Maintainer targets
-update-po: refresh-po
- -cg-add `ls po/*.po | grep -v quot.po`
- cg-commit -m "Sync with TP." po/LINGUAS `ls po/*.po | grep -v quot.po`
-
ChangeLog:
git log --pretty --numstat --summary --since="2005 November 07" -- | git2cl > ChangeLog
cat .cvscopying >> ChangeLog
diff --git a/NEWS b/NEWS
index db32a9a801..2ac7f826dd 100644
--- a/NEWS
+++ b/NEWS
@@ -3,11 +3,69 @@ Copyright (C) 2004, 2005, 2006, 2007, 2008 Simon Josefsson
Copyright (C) 2000, 2001, 2002, 2003, 2004 Nikos Mavrogiannopoulos
See the end for copying conditions.
-* Version 2.3.5 (unreleased)
+* Version 2.3.6 (unreleased)
+
+** Make gnutls_x509_crq_sign2 set certificate request version if not set.
+** Improve documentation for gnutls_x509_crq_sign2.
+Based on report from "John Brooks" <aspecialj@gmail.com> in
+<http://permalink.gmane.org/gmane.network.gnutls.general/1154>.
+
+** tests/pathlen: run diff without parameters to improve portability.
+Based on HPUX build hints in
+<http://hpux.cs.utah.edu/hppd/cgi-bin/wwwtar?/hpux/Gnu/gnutls-2.3.4/gnutls-2.3.4-src-11.11.tar.gz+gnutls-2.3.4/HPUX.Install+text>.
+
+** Don't use %e specifier with strftime, it doesn't work under Windows.
+Reported by Massimo Gaspari <massimo.gaspari@alice.it> in
+<http://permalink.gmane.org/gmane.network.gnutls.general/1170>.
+
+** Remove all uses of gnutls_alloca/gnutls_afree.
+Use normal gnutls_malloc instead. One reason is increased portability
+to Windows, the other is that several of the uses may be unsafe
+because the size of data allocated could be large. Reported by
+Massimo Gaspari <massimo.gaspari@alice.it> in
+<http://permalink.gmane.org/gmane.network.gnutls.general/1170>.
** API and ABI modifications:
No changes since last version.
+* Version 2.3.5 (released 2008-04-14)
+
+** Build fix for MinGW and --disable-shared.
+Reported by Massimo Gaspari <massimo.gaspari@alice.it> in
+<http://permalink.gmane.org/gmane.network.gnutls.general/1145>.
+
+** Document how to generate CRLs.
+Suggested by "Rainer Gerhards" <rgerhards@gmail.com>.
+
+** Documented the --priority option to gnutls-cli and gnutls-serv.
+
+** Several minor fixes in the OpenPGP interface.
+Thanks to Daniel Kahn Gillmor.
+
+** Fix fopen file descriptor leak in PSK server code.
+Thanks to Laurence Withers <l@lwithers.me.uk>, see
+<http://lists.gnu.org/archive/html/gnutls-devel/2008-04/msg00002.html>.
+
+** Translations files not stored directly in git to avoid merge conflicts.
+
+** New APIs to let applications replace the RNG used.
+Update all RNG callers in the code to use the new interface.
+
+** Guile code now built with -fgnu89-inline to fix inline semantic problem.
+
+** Update gnulib files.
+
+** API and ABI modifications:
+gnutls_crypto_rnd_register: ADDED
+gnutls_rnd_level_t: ADDED
+GNUTLS_RND_KEY: ADDED, gnutls_rnd_level_t member
+GNUTLS_RND_RANDOM: ADDED, gnutls_rnd_level_t member
+GNUTLS_RND_NONCE: ADDED, gnutls_rnd_level_t member
+gnutls_crypto_rnd_st: ADDED
+GNUTLS_DIG_SHA224: ADDED
+GNUTLS_SIGN_RSA_SHA224: ADDED
+gnutls_openpgp_crt_get_auth_subkey: MODIFIED
+
* Version 2.3.4 (released 2008-03-19)
** Finish renaming of gnutls_certificate_export_x509_cas etc.
diff --git a/README b/README
index f4a750bf87..cf72ea54de 100644
--- a/README
+++ b/README
@@ -18,10 +18,6 @@ The library needs libgcrypt. You can find libgcrypt at
compiling libgcrypt with CPU optimizations gnutls' speed will
increase.
-For OpenPGP key support, the OpenCDK library can be used. You can
-find libopencdk at: <ftp://ftp.gnutls.org/pub/gnutls/opencdk/>. A
-copy of libopencdk is also included with GnuTLS.
-
In case you are compiling for embedded systems you should check the
configure options (that is run: 'configure --help'), and disable
unneeded features of gnutls.
diff --git a/THANKS b/THANKS
index bb302145e9..389c69c20d 100644
--- a/THANKS
+++ b/THANKS
@@ -75,6 +75,10 @@ Dennis Vshivkov <walrus@amur.ru>
Kristofer T. Karas <ktk@enterprise.bidmc.harvard.edu>
Marc Haber <mh+debian-bugs@zugschlus.de>
Tim Mooney <tim@tim-the-enchanter.org>
+Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>
+Rainer Gerhards <rgerhards@gmail.com>
+John Brooks <aspecialj@gmail.com>
+Massimo Gaspari <massimo.gaspari@alice.it>
----------------------------------------------------------------------
Copying and distribution of this file, with or without modification,
diff --git a/build-aux/GNUmakefile b/build-aux/GNUmakefile
deleted file mode 100644
index 35c8869de5..0000000000
--- a/build-aux/GNUmakefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Having a separate GNUmakefile lets me `include' the dynamically
-# generated rules created via Makefile.maint as well as Makefile.maint itself.
-# This makefile is used only if you run GNU Make.
-# It is necessary if you want to build targets usually of interest
-# only to the maintainer.
-
-# Copyright (C) 2001, 2003, 2006, 2007 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License,
-# or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Systems where /bin/sh is not the default shell need this. The $(shell)
-# command below won't work with e.g. stock DOS/Windows shells.
-ifeq ($(wildcard /bin/s[h]),/bin/sh)
-SHELL = /bin/sh
-else
-# will be used only with the next shell-test line, then overwritten
-# by a configured-in value
-SHELL = sh
-endif
-
-# Make tar archive easier to reproduce.
-export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
-
-# Ran autoreconf and configure or not?
-have-Makefile := $(shell test -f Makefile && echo yes)
-ifeq ($(have-Makefile),yes)
-
-include Makefile
--include $(srcdir)/maint-cfg.mk
-include $(srcdir)/maint.mk
-
-else
-
-.DEFAULT_GOAL := abort-due-to-no-makefile
-
--include ./maint-cfg.mk
-include ./maint.mk
-
-abort-due-to-no-makefile:
- @echo There seems to be no Makefile in this directory. 1>&2
- @echo "You must run ./configure before running \`make'." 1>&2
- @exit 1
-
-endif
-
-# Tell version 3.79 and up of GNU make to not build goals in this
-# directory in parallel. This is necessary in case someone tries to
-# build multiple targets on one command line.
-.NOTPARALLEL:
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 2e3c8014c7..6621ebd8b7 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,9 +1,9 @@
#!/bin/sh
# Sign files and upload them.
-scriptversion=2007-12-18.17
+scriptversion=2008-04-02.19
-# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
+# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -145,7 +145,7 @@ do
cat >$file.directive<<EOF
version: 1.1
directory: $destdir
-filename: $file
+filename: `basename -- "$file"`
EOF
echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
ncftpput ftp-upload.gnu.org /incoming/alpha $files $file.directive.asc
@@ -156,7 +156,7 @@ EOF
cat >$file.directive<<EOF
version: 1.1
directory: $destdir
-filename: $file
+filename: `basename -- "$file"`
EOF
echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
ncftpput ftp-upload.gnu.org /incoming/ftp $files $file.directive.asc
diff --git a/maint-cfg.mk b/cfg.mk
index 6bbcf11624..ca8d875a25 100644
--- a/maint-cfg.mk
+++ b/cfg.mk
@@ -27,9 +27,20 @@ ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
endif
autoreconf:
+ for f in po/*.po.in; do \
+ cp $$f `echo $$f | sed 's/.in//'`; \
+ done
+ mv build-aux/config.rpath build-aux/config.rpath-
test -f ./configure || autoreconf --install
mv build-aux/config.rpath- build-aux/config.rpath
+update-po: refresh-po
+ for f in `ls po/*.po | grep -v quot.po`; do \
+ cp $$f $$f.in; \
+ done
+ git-add po/*.po.in
+ git-commit -m "Sync with TP." po/LINGUAS po/*.po.in
+
bootstrap: autoreconf
./configure $(CFGFLAGS)
diff --git a/configure.in b/configure.in
index 4d0d3a977c..fd70eb1ecf 100644
--- a/configure.in
+++ b/configure.in
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
# USA
AC_PREREQ(2.61)
-AC_INIT([GnuTLS], [2.3.5], [bug-gnutls@gnu.org])
+AC_INIT([GnuTLS], [2.3.6], [bug-gnutls@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_TARGET
@@ -37,7 +37,7 @@ AB_INIT
# Interfaces added: AGE++
# Interfaces removed: AGE=0
AC_SUBST(LT_CURRENT, 29)
-AC_SUBST(LT_REVISION, 0)
+AC_SUBST(LT_REVISION, 1)
AC_SUBST(LT_AGE, 3)
ac_full=1
@@ -45,8 +45,6 @@ ac_full=1
SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(SOVERSION)
-dnl for opencdk needs also change in the test
-GNUTLS_OPENCDK_VERSION=0.6.5
GNUTLS_GCRYPT_VERSION=1:1.2.4
GNUTLS_LIBTASN1_VERSION=0.3.4
AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION", [version of gcrypt])
@@ -170,12 +168,17 @@ if test $ac_cv_c_compiler_gnu != no; then
[test "x$_gcc_gnu89_inline" = "xyes"])
CFLAGS=$_gcc_cflags_save;
- AC_MSG_CHECKING([whether gcc/ld supports -Wl,--output-def])
- _gcc_ldflags_save=$LDFLAGS
- LDFLAGS="-Wl,--output-def,foo.def"
- AC_LINK_IFELSE(AC_LANG_PROGRAM([]),output_def=yes,output_def=no)
- AC_MSG_RESULT($output_def)
- LDFLAGS="$_gcc_ldflags_save"
+ AC_MSG_CHECKING([if gcc/ld supports -Wl,--output-def])
+ if test "$enable_shared" = no; then
+ output_def=no
+ AC_MSG_RESULT([no need, since shared libraries are disabled])
+ else
+ _gcc_ldflags_save=$LDFLAGS
+ LDFLAGS="-Wl,--output-def,foo.def"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([]),output_def=yes,output_def=no)
+ AC_MSG_RESULT($output_def)
+ LDFLAGS="$_gcc_ldflags_save"
+ fi
if test x$opt_dmalloc_mode = xyes; then
AC_CHECK_LIB(dmalloc, main)
@@ -205,12 +208,11 @@ AC_MSG_RESULT([***
])
AC_HEADER_STDC
-AC_CHECK_HEADERS(strings.h alloca.h)
+AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(errno.h)
AC_CHECK_HEADERS(math.h limits.h float.h stdarg.h ctype.h)
AC_CHECK_HEADERS(netdb.h)
AC_CHECK_FUNCS(umask vasprintf isascii fork,,)
-AC_FUNC_ALLOCA
# No fork on MinGW, disable some self-tests until we fix them.
AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
@@ -495,43 +497,6 @@ else
fi
AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
-dnl Test whether to use the included opencdk library
-dnl
-dnl We no longer test for it. We use the LGPL parts of this library internally
-dnl if test x$ac_enable_openpgp = xyes; then
-dnl AC_ARG_WITH(included-opencdk,
-dnl AS_HELP_STRING([--with-included-opencdk], [use the included opencdk]),
-dnl ac_enable_included_opencdk=$withval,
-dnl ac_enable_included_opencdk=no)
-dnl if test x$ac_enable_included_opencdk = xno;then
-dnl AC_LIB_HAVE_LINKFLAGS(opencdk,, [
-dnl #include <opencdk.h>], [
-dnl #if OPENCDK_VERSION_MINOR < 6 || OPENCDK_VERSION_PATCH < 5
-dnl # error "OpenCDK 0.6.5 is required"
-dnl #else
-dnl cdk_check_version( NULL);
-dnl #endif
-dnl ])
-dnl if test "$ac_cv_libopencdk" != yes; then
-dnl ac_enable_included_opencdk=yes
-dnl AC_MSG_WARN([[
-dnl ***
-dnl *** libopencdk was not found. You may want to get it from
-dnl *** ftp://ftp.gnutls.org/pub/gnutls/opencdk/
-dnl ***
-dnl *** Will use the included opencdk.
-dnl ***
-dnl ]])
-dnl fi
-dnl AC_MSG_CHECKING([whether to use the included opencdk])
-dnl AC_MSG_RESULT($ac_enable_included_opencdk)
-dnl fi
-dnl fi
-
-ac_enable_included_opencdk=yes
-
-AM_CONDITIONAL(ENABLE_INCLUDED_OPENCDK, test "$ac_enable_included_opencdk" = "yes")
-
AC_MSG_CHECKING([whether to disable OpenSSL compatibility layer])
AC_ARG_ENABLE(openssl-compatibility,
AS_HELP_STRING([--disable-openssl-compatibility],
@@ -680,8 +645,8 @@ LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
AC_SUBST(LIBGNUTLS_LIBS)
AC_SUBST(LIBGNUTLS_CFLAGS)
-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
-LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK -I${includedir}"
+LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
+LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
export ac_full
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 0370a2c6b0..f5db096241 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation
+# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation
#
# Author: Simon Josefsson
#
@@ -24,9 +24,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes \
-I$(top_srcdir)/gl -I$(top_builddir)/gl
AM_LDFLAGS = -no-install
LDADD = libexamples.la \
- ../../gl/libgnu.la \
../../lib/libgnutls.la \
- ../../libextra/libgnutls-extra.la
+ ../../libextra/libgnutls-extra.la \
+ ../../gl/libgnu.la
noinst_PROGRAMS = ex-cert-select ex-client2 ex-client-resume \
ex-crq ex-serv1 ex-serv-export
diff --git a/doc/gnutls.texi b/doc/gnutls.texi
index 527c23ddd3..e55e86ec2f 100644
--- a/doc/gnutls.texi
+++ b/doc/gnutls.texi
@@ -225,15 +225,11 @@ want to install it separately (e.g., to make it possibly to use
libtasn1 in other programs), you can get it from
@url{http://www.gnu.org/software/gnutls/download.html}.
-The OpenPGP part of GnuTLS-extra needs OpenCDK for parsing OpenPGP
-packets. A copy of OpenCDK is included in GnuTLS. If you want to
-install it separately (e.g., to make it possibly to use libtasn1 in
-other programs), you can get it from
-@url{http://www.gnu.org/software/gnutls/download.html}. Use parameter
-@code{--with-included-opencdk} to unconditionally use the internal
-copy of OpenCDK. Use parameter
+The OpenPGP part of GnuTLS uses a stripped down version of OpenCDK for
+parsing OpenPGP packets. It is included GnuTLS. Use parameter
@code{--disable-openpgp-authentication} to disable the OpenPGP
-functionality in GnuTLS.
+functionality in GnuTLS. Unfortunately, we didn't have resources to
+maintain the code in a separate library.
Regarding the Guile bindings, there are additional installation
considerations, see @xref{Guile Preparations}.
@@ -400,8 +396,9 @@ verification functions which is partially implemented in the
@acronym{GnuTLS} library. The
@acronym{Libtasn1}@footnote{@url{ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/}},
a library which offers @acronym{ASN.1} parsing capabilities, is used
-for the @acronym{X.509} certificate parsing functions, and
-@acronym{Opencdk}@footnote{@url{ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/}}
+for the @acronym{X.509} certificate parsing functions. A smaller
+version of
+@acronym{OpenCDK}@footnote{@url{ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/}}
is used for the @acronym{OpenPGP} key support in @acronym{GnuTLS}.
The ``Crypto backend'' is provided by the
@acronym{Libgcrypt}@footnote{@url{ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/}}
@@ -543,19 +540,21 @@ should allocate and free memory using the functions shown below.
@chapter Introduction to @acronym{TLS}
@acronym{TLS} stands for ``Transport Layer Security'' and is the
-successor of SSL, the Secure Sockets Layer protocol @xcite{SSL3} designed by Netscape. @acronym{TLS} is an Internet
-protocol, defined by @acronym{IETF}@footnote{IETF, or Internet
-Engineering Task Force, is a large open international community of
-network designers, operators, vendors, and researchers concerned with
-the evolution of the Internet architecture and the smooth operation of
-the Internet. It is open to any interested individual.}, described in
-@acronym{RFC} 2246 and also in @xcite{RESCOLA}. The protocol provides
+successor of SSL, the Secure Sockets Layer protocol @xcite{SSL3}
+designed by Netscape. @acronym{TLS} is an Internet protocol, defined
+by @acronym{IETF}@footnote{IETF, or Internet Engineering Task Force,
+is a large open international community of network designers,
+operators, vendors, and researchers concerned with the evolution of
+the Internet architecture and the smooth operation of the Internet.
+It is open to any interested individual.}, described in @acronym{RFC}
+4346 and also in @xcite{RESCORLA}. The protocol provides
confidentiality, and authentication layers over any reliable transport
-layer. The description, below, refers to @acronym{TLS} 1.0 but also
-applies to @acronym{TLS} 1.1 @xcite{RFC4346} and @acronym{SSL} 3.0, since the
-differences of these protocols are minor. Older protocols such as
-@acronym{SSL} 2.0 are not discussed nor implemented in
-@acronym{GnuTLS} since they are not considered secure today.
+layer. The description, below, refers to @acronym{TLS} 1.0 but also
+applies to @acronym{TLS} 1.1 @xcite{RFC4346} and @acronym{SSL} 3.0,
+since the differences of these protocols are minor. Older protocols
+such as @acronym{SSL} 2.0 are not discussed nor implemented in
+@acronym{GnuTLS} since they are not considered secure today. GnuTLS
+also supports @acronym{X.509} and @acronym{OpenPGP} @xcite{RFC4880}.
@menu
* TLS layers::
@@ -3056,6 +3055,27 @@ $ certtool --generate-proxy --load-ca-privkey key.pem \
--outfile proxy-cert.pem
@end example
+@item
+To create an empty Certificate Revocation List (CRL) do:
+
+@example
+$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem --load-ca-certificate x509-ca.pem
+@end example
+
+To create a CRL that contains some revoked certificates, place the
+certificates in a file and use @code{--load-certificate} as follows:
+
+@example
+$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem --load-ca-certificate x509-ca.pem --load-certificate revoked-certs.pem
+@end example
+
+@item
+To verify a Certificate Revocation List (CRL) do:
+
+@example
+$ certtool --verify-crl --load-ca-certificate x509-ca.pem < crl.pem
+@end example
+
@end itemize
Certtool's template file format:
@@ -3704,10 +3724,6 @@ is summarized in the following diagram.
@table @asis
-@item @anchor{SELKEY}[SELKEY]
-Arjen Lenstra and Eric Verheul, "Selecting Cryptographic Key Sizes", 2003, available from
-@url{http://www.win.tue.nl/~klenstra/key.pdf}.
-
@item @anchor{CBCATT}[CBCATT]
Bodo Moeller, "Security of CBC Ciphersuites in SSL/TLS: Problems and
Countermeasures", 2002, available from
@@ -3725,52 +3741,54 @@ forced to find out", Available from
@item @anchor{RFC2246}[RFC2246]
Tim Dierks and Christopher Allen, "The TLS Protocol Version 1.0",
January 1999, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2246.txt}.
+@url{http://www.ietf.org/rfc/rfc2246.txt}.
@item @anchor{RFC4346}[RFC4346]
Tim Dierks and Eric Rescorla, "The TLS Protocol Version 1.1", Match
-2006, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc4346.txt}.
+2006, Available from @url{http://www.ietf.org/rfc/rfc4346.txt}.
@item @anchor{RFC2440}[RFC2440]
Jon Callas, Lutz Donnerhacke, Hal Finney and Rodney Thayer, "OpenPGP
Message Format", November 1998, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2440.txt}.
+@url{http://www.ietf.org/rfc/rfc2440.txt}.
+
+@item @anchor{RFC4880}[RFC4880]
+Jon Callas, Lutz Donnerhacke, Hal Finney, David Shaw and Rodney
+Thayer, "OpenPGP Message Format", November 2007, Available from
+@url{http://www.ietf.org/rfc/rfc4880.txt}.
@item @anchor{RFC4211}[RFC4211]
J. Schaad, "Internet X.509 Public Key Infrastructure Certificate
Request Message Format (CRMF)", September 2005, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc4211.txt}.
+@url{http://www.ietf.org/rfc/rfc4211.txt}.
@item @anchor{RFC2817}[RFC2817]
Rohit Khare and Scott Lawrence, "Upgrading to TLS Within HTTP/1.1",
-May 2000, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2817.txt}
+May 2000, Available from @url{http://www.ietf.org/rfc/rfc2817.txt}
@item @anchor{RFC2818}[RFC2818]
-Eric Rescola, "HTTP Over TLS", May 2000, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2818.txt}.
+Eric Rescorla, "HTTP Over TLS", May 2000, Available from
+@url{http://www.ietf/rfc/rfc2818.txt}.
@item @anchor{RFC2945}[RFC2945]
Tom Wu, "The SRP Authentication and Key Exchange System", September
-2000, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2945.txt}.
+2000, Available from @url{http://www.ietf.org/rfc/rfc2945.txt}.
@item @anchor{RFC2986}[RFC2986]
Magnus Nystrom and Burt Kaliski, "PKCS 10 v1.7: Certification Request
Syntax Specification", November 2000, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc2986.txt}.
+@url{http://www.ietf.org/rfc/rfc2986.txt}.
@item @anchor{RFC3280}[RFC3280]
Russell Housley, Tim Polk, Warwick Ford and David Solo, "Internet
X.509 Public Key Infrastructure Certificate and Certificate Revocation
List (CRL) Profile", April 2002, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc3280.txt}.
+@url{http://www.ietf.org/rfc/rfc3280.txt}.
@item @anchor{RFC3749}[RFC3749]
Scott Hollenbeck, "Transport Layer Security Protocol Compression
Methods", May 2004, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc3749.txt}.
+@url{http://www.ietf.org/rfc/rfc3749.txt}.
@item @anchor{RFC3820}[RFC3820]
Steven Tuecke, Von Welch, Doug Engert, Laura Pearlman, and Mary
@@ -3782,10 +3800,14 @@ Certificate Profile", June 2004, available from
RSA Laboratories, "PKCS 12 v1.0: Personal Information Exchange
Syntax", June 1999, Available from @url{http://www.rsa.com}.
-@item @anchor{RESCOLA}[RESCOLA]
-Eric Rescola, "SSL and TLS: Designing and Building Secure Systems",
+@item @anchor{RESCORLA}[RESCORLA]
+Eric Rescorla, "SSL and TLS: Designing and Building Secure Systems",
2001
+@item @anchor{SELKEY}[SELKEY]
+Arjen Lenstra and Eric Verheul, "Selecting Cryptographic Key Sizes",
+2003, available from @url{http://www.win.tue.nl/~klenstra/key.pdf}.
+
@item @anchor{SSL3}[SSL3]
Alan Freier, Philip Karlton and Paul Kocher, "The SSL Protocol Version
3.0", November 1996, Available from
@@ -3798,22 +3820,22 @@ PTR, January 1998
@item @anchor{TLSEXT}[TLSEXT]
Simon Blake-Wilson, Magnus Nystrom, David Hopwood, Jan Mikkelsen and
Tim Wright, "Transport Layer Security (TLS) Extensions", June 2003,
-Available from @url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc3546.txt}.
+Available from @url{http://www.ietf.org/rfc/rfc3546.txt}.
@item @anchor{TLSPGP}[TLSPGP]
Nikos Mavrogiannopoulos, "Using OpenPGP keys for TLS authentication",
April 2004, November 2007. Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc5081.txt}.
+@url{http://www.ietf.org/rfc/rfc5081.txt}.
@item @anchor{TLSSRP}[TLSSRP]
David Taylor, Trevor Perrin, Tom Wu and Nikos Mavrogiannopoulos,
"Using SRP for TLS Authentication", November 2007. Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc5054.txt}.
+@url{http://www.ietf.org/rfc/rfc5054.txt}.
@item @anchor{TLSPSK}[TLSPSK]
Pasi Eronen and Hannes Tschofenig, "Pre-shared key Ciphersuites for
TLS", December 2005, Available from
-@url{http://kaizi.viagenie.qc.ca/ietf/rfc/rfc4279.txt}.
+@url{http://www.ietf.org/rfc/rfc4279.txt}.
@item @anchor{TOMSRP}[TOMSRP]
Tom Wu, "The Stanford SRP Authentication Project", Available at
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index c5714a42bb..00606c5a0f 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -26,9 +26,495 @@ if ENABLE_SRP
dist_man_MANS += srptool.1
endif
-APIMANS = gnutls_oprfi_enable_client.3 gnutls_oprfi_enable_server.3 gnutls_server_name_get.3 gnutls_server_name_set.3 gnutls_alert_get_name.3 gnutls_alert_send.3 gnutls_error_to_alert.3 gnutls_alert_send_appropriate.3 gnutls_alert_get.3 gnutls_mac_get_name.3 gnutls_mac_get_id.3 gnutls_mac_get_key_size.3 gnutls_mac_list.3 gnutls_compression_get_name.3 gnutls_compression_get_id.3 gnutls_compression_list.3 gnutls_cipher_get_key_size.3 gnutls_cipher_get_name.3 gnutls_cipher_get_id.3 gnutls_cipher_list.3 gnutls_kx_get_name.3 gnutls_kx_get_id.3 gnutls_kx_list.3 gnutls_protocol_get_name.3 gnutls_protocol_get_id.3 gnutls_protocol_list.3 gnutls_cipher_suite_get_name.3 gnutls_cipher_suite_info.3 gnutls_certificate_type_get_name.3 gnutls_certificate_type_get_id.3 gnutls_certificate_type_list.3 gnutls_sign_algorithm_get_name.3 gnutls_pk_algorithm_get_name.3 gnutls_anon_free_server_credentials.3 gnutls_anon_allocate_server_credentials.3 gnutls_anon_free_client_credentials.3 gnutls_anon_allocate_client_credentials.3 gnutls_anon_set_server_dh_params.3 gnutls_anon_set_server_params_function.3 gnutls_credentials_clear.3 gnutls_credentials_set.3 gnutls_auth_get_type.3 gnutls_auth_server_get_type.3 gnutls_auth_client_get_type.3 gnutls_transport_set_errno.3 gnutls_transport_set_global_errno.3 gnutls_record_check_pending.3 gnutls_certificate_free_keys.3 gnutls_certificate_free_cas.3 gnutls_certificate_get_x509_cas.3 gnutls_certificate_get_x509_crls.3 gnutls_certificate_get_openpgp_keyring.3 gnutls_certificate_free_ca_names.3 gnutls_certificate_free_credentials.3 gnutls_certificate_allocate_credentials.3 gnutls_certificate_server_set_request.3 gnutls_certificate_client_set_retrieve_function.3 gnutls_certificate_server_set_retrieve_function.3 gnutls_certificate_verify_peers2.3 gnutls_certificate_verify_peers.3 gnutls_certificate_expiration_time_peers.3 gnutls_certificate_activation_time_peers.3 gnutls_sign_callback_set.3 gnutls_sign_callback_get.3 gnutls_db_set_retrieve_function.3 gnutls_db_set_remove_function.3 gnutls_db_set_store_function.3 gnutls_db_set_ptr.3 gnutls_db_get_ptr.3 gnutls_db_set_cache_expiration.3 gnutls_db_check_entry.3 gnutls_db_remove_session.3 gnutls_dh_params_import_raw.3 gnutls_dh_params_init.3 gnutls_dh_params_deinit.3 gnutls_dh_params_cpy.3 gnutls_dh_params_generate2.3 gnutls_dh_params_import_pkcs3.3 gnutls_dh_params_export_pkcs3.3 gnutls_dh_params_export_raw.3 gnutls_error_is_fatal.3 gnutls_perror.3 gnutls_strerror.3 gnutls_global_set_log_function.3 gnutls_global_set_log_level.3 gnutls_global_set_mem_functions.3 gnutls_global_init.3 gnutls_global_deinit.3 gnutls_transport_set_pull_function.3 gnutls_transport_set_push_function.3 gnutls_check_version.3 gnutls_rehandshake.3 gnutls_handshake.3 gnutls_handshake_set_max_packet_length.3 gnutls_handshake_get_last_in.3 gnutls_handshake_get_last_out.3 gnutls_malloc.3 gnutls_free.3 gnutls_certificate_set_openpgp_key.3 gnutls_certificate_set_openpgp_key_mem.3 gnutls_certificate_set_openpgp_key_file.3 gnutls_certificate_set_openpgp_key_mem2.3 gnutls_certificate_set_openpgp_key_file2.3 gnutls_certificate_set_openpgp_keyring_file.3 gnutls_certificate_set_openpgp_keyring_mem.3 gnutls_openpgp_set_recv_key_function.3 gnutls_openpgp_privkey_sign_hash.3 gnutls_cipher_set_priority.3 gnutls_kx_set_priority.3 gnutls_mac_set_priority.3 gnutls_compression_set_priority.3 gnutls_protocol_set_priority.3 gnutls_certificate_type_set_priority.3 gnutls_priority_set.3 gnutls_priority_init.3 gnutls_priority_deinit.3 gnutls_priority_set_direct.3 gnutls_set_default_priority.3 gnutls_set_default_export_priority.3 gnutls_psk_free_client_credentials.3 gnutls_psk_allocate_client_credentials.3 gnutls_psk_set_client_credentials.3 gnutls_psk_free_server_credentials.3 gnutls_psk_allocate_server_credentials.3 gnutls_psk_set_server_credentials_file.3 gnutls_psk_set_server_credentials_function.3 gnutls_psk_set_client_credentials_function.3 gnutls_psk_server_get_username.3 gnutls_hex_decode.3 gnutls_hex_encode.3 gnutls_psk_set_server_dh_params.3 gnutls_psk_set_server_params_function.3 gnutls_protocol_get_version.3 gnutls_transport_set_lowat.3 gnutls_record_disable_padding.3 gnutls_transport_set_ptr.3 gnutls_transport_set_ptr2.3 gnutls_transport_get_ptr.3 gnutls_transport_get_ptr2.3 gnutls_bye.3 gnutls_record_send.3 gnutls_record_recv.3 gnutls_record_get_max_size.3 gnutls_record_set_max_size.3 gnutls_rsa_params_import_raw.3 gnutls_rsa_params_init.3 gnutls_rsa_params_deinit.3 gnutls_rsa_params_cpy.3 gnutls_rsa_params_generate2.3 gnutls_rsa_params_import_pkcs1.3 gnutls_rsa_params_export_pkcs1.3 gnutls_rsa_params_export_raw.3 gnutls_session_get_data.3 gnutls_session_get_data2.3 gnutls_session_get_id.3 gnutls_session_set_data.3 gnutls_cipher_get.3 gnutls_certificate_type_get.3 gnutls_kx_get.3 gnutls_mac_get.3 gnutls_compression_get.3 gnutls_init.3 gnutls_deinit.3 gnutls_openpgp_send_cert.3 gnutls_certificate_send_x509_rdn_sequence.3 gnutls_handshake_set_private_extensions.3 gnutls_prf_raw.3 gnutls_prf.3 gnutls_session_get_client_random.3 gnutls_session_get_server_random.3 gnutls_session_get_master_secret.3 gnutls_session_is_resumed.3 gnutls_session_get_ptr.3 gnutls_session_set_ptr.3 gnutls_record_get_direction.3 gnutls_handshake_set_post_client_hello_function.3 gnutls_session_enable_compatibility_mode.3 gnutls_hex2bin.3 gnutls_dh_set_prime_bits.3 gnutls_dh_get_group.3 gnutls_dh_get_pubkey.3 gnutls_rsa_export_get_pubkey.3 gnutls_dh_get_secret_bits.3 gnutls_dh_get_prime_bits.3 gnutls_rsa_export_get_modulus_bits.3 gnutls_dh_get_peers_public_bits.3 gnutls_certificate_get_ours.3 gnutls_certificate_get_peers.3 gnutls_certificate_client_get_request_status.3 gnutls_fingerprint.3 gnutls_certificate_set_dh_params.3 gnutls_certificate_set_params_function.3 gnutls_certificate_set_verify_flags.3 gnutls_certificate_set_verify_limits.3 gnutls_certificate_set_rsa_export_params.3 gnutls_psk_set_params_function.3 gnutls_anon_set_params_function.3 gnutls_certificate_set_x509_key_mem.3 gnutls_certificate_set_x509_key.3 gnutls_certificate_set_x509_key_file.3 gnutls_certificate_set_x509_trust_mem.3 gnutls_certificate_set_x509_trust.3 gnutls_certificate_set_x509_trust_file.3 gnutls_certificate_set_x509_crl_mem.3 gnutls_certificate_set_x509_crl.3 gnutls_certificate_set_x509_crl_file.3 gnutls_certificate_set_x509_simple_pkcs12_file.3 gnutls_certificate_free_crls.3 gnutls_pem_base64_encode.3 gnutls_pem_base64_encode_alloc.3 gnutls_pem_base64_decode.3 gnutls_pem_base64_decode_alloc.3 gnutls_global_init_extra.3 gnutls_extra_check_version.3 gnutls_ia_permute_inner_secret.3 gnutls_ia_generate_challenge.3 gnutls_ia_extract_inner_secret.3 gnutls_ia_endphase_send.3 gnutls_ia_verify_endphase.3 gnutls_ia_send.3 gnutls_ia_recv.3 gnutls_ia_handshake_p.3 gnutls_ia_handshake.3 gnutls_ia_allocate_client_credentials.3 gnutls_ia_free_client_credentials.3 gnutls_ia_set_client_avp_function.3 gnutls_ia_set_client_avp_ptr.3 gnutls_ia_get_client_avp_ptr.3 gnutls_ia_allocate_server_credentials.3 gnutls_ia_free_server_credentials.3 gnutls_ia_set_server_avp_function.3 gnutls_ia_set_server_avp_ptr.3 gnutls_ia_get_server_avp_ptr.3 gnutls_ia_enable.3 gnutls_x509_dn_oid_known.3 gnutls_x509_crl_init.3 gnutls_x509_crl_deinit.3 gnutls_x509_crl_import.3 gnutls_x509_crl_get_issuer_dn.3 gnutls_x509_crl_get_issuer_dn_by_oid.3 gnutls_x509_crl_get_dn_oid.3 gnutls_x509_crl_get_signature_algorithm.3 gnutls_x509_crl_get_signature.3 gnutls_x509_crl_get_version.3 gnutls_x509_crl_get_this_update.3 gnutls_x509_crl_get_next_update.3 gnutls_x509_crl_get_crt_count.3 gnutls_x509_crl_get_crt_serial.3 gnutls_x509_crl_export.3 gnutls_x509_crl_set_version.3 gnutls_x509_crl_sign2.3 gnutls_x509_crl_sign.3 gnutls_x509_crl_set_this_update.3 gnutls_x509_crl_set_next_update.3 gnutls_x509_crl_set_crt_serial.3 gnutls_x509_crl_set_crt.3 gnutls_x509_crq_init.3 gnutls_x509_crq_deinit.3 gnutls_x509_crq_import.3 gnutls_x509_crq_get_dn.3 gnutls_x509_crq_get_dn_by_oid.3 gnutls_x509_crq_get_dn_oid.3 gnutls_x509_crq_get_challenge_password.3 gnutls_x509_crq_set_attribute_by_oid.3 gnutls_x509_crq_get_attribute_by_oid.3 gnutls_x509_crq_set_dn_by_oid.3 gnutls_x509_crq_set_version.3 gnutls_x509_crq_get_version.3 gnutls_x509_crq_set_key.3 gnutls_x509_crq_set_challenge_password.3 gnutls_x509_crq_sign2.3 gnutls_x509_crq_sign.3 gnutls_x509_crq_export.3 gnutls_x509_crq_get_pk_algorithm.3 gnutls_x509_dn_init.3 gnutls_x509_dn_import.3 gnutls_x509_dn_deinit.3 gnutls_x509_rdn_get.3 gnutls_x509_rdn_get_by_oid.3 gnutls_x509_rdn_get_oid.3 gnutls_x509_dn_export.3 gnutls_x509_crt_print.3 gnutls_x509_crl_print.3 gnutls_pkcs12_init.3 gnutls_pkcs12_deinit.3 gnutls_pkcs12_import.3 gnutls_pkcs12_export.3 gnutls_pkcs12_get_bag.3 gnutls_pkcs12_set_bag.3 gnutls_pkcs12_generate_mac.3 gnutls_pkcs12_verify_mac.3 gnutls_pkcs12_bag_init.3 gnutls_pkcs12_bag_deinit.3 gnutls_pkcs12_bag_get_type.3 gnutls_pkcs12_bag_get_count.3 gnutls_pkcs12_bag_get_data.3 gnutls_pkcs12_bag_set_data.3 gnutls_pkcs12_bag_set_crt.3 gnutls_pkcs12_bag_set_crl.3 gnutls_pkcs12_bag_set_key_id.3 gnutls_pkcs12_bag_get_key_id.3 gnutls_pkcs12_bag_get_friendly_name.3 gnutls_pkcs12_bag_set_friendly_name.3 gnutls_pkcs12_bag_decrypt.3 gnutls_pkcs12_bag_encrypt.3 gnutls_pkcs7_init.3 gnutls_pkcs7_deinit.3 gnutls_pkcs7_import.3 gnutls_pkcs7_get_crt_raw.3 gnutls_pkcs7_get_crt_count.3 gnutls_pkcs7_export.3 gnutls_pkcs7_set_crt_raw.3 gnutls_pkcs7_set_crt.3 gnutls_pkcs7_delete_crt.3 gnutls_pkcs7_get_crl_raw.3 gnutls_pkcs7_get_crl_count.3 gnutls_pkcs7_set_crl_raw.3 gnutls_pkcs7_set_crl.3 gnutls_pkcs7_delete_crl.3 gnutls_x509_privkey_init.3 gnutls_x509_privkey_deinit.3 gnutls_x509_privkey_cpy.3 gnutls_x509_privkey_import.3 gnutls_x509_privkey_import_rsa_raw.3 gnutls_x509_privkey_import_dsa_raw.3 gnutls_x509_privkey_get_pk_algorithm.3 gnutls_x509_privkey_export.3 gnutls_x509_privkey_export_rsa_raw.3 gnutls_x509_privkey_export_dsa_raw.3 gnutls_x509_privkey_generate.3 gnutls_x509_privkey_get_key_id.3 gnutls_x509_privkey_sign_data.3 gnutls_x509_privkey_sign_hash.3 gnutls_x509_privkey_verify_data.3 gnutls_x509_privkey_fix.3 gnutls_x509_privkey_export_pkcs8.3 gnutls_x509_privkey_import_pkcs8.3 gnutls_x509_crt_check_hostname.3 gnutls_x509_crt_check_issuer.3 gnutls_x509_crt_list_verify.3 gnutls_x509_crt_verify.3 gnutls_x509_crl_check_issuer.3 gnutls_x509_crl_verify.3 gnutls_x509_crt_init.3 gnutls_x509_crt_deinit.3 gnutls_x509_crt_import.3 gnutls_x509_crt_get_issuer_dn.3 gnutls_x509_crt_get_issuer_dn_by_oid.3 gnutls_x509_crt_get_issuer_dn_oid.3 gnutls_x509_crt_get_dn.3 gnutls_x509_crt_get_dn_by_oid.3 gnutls_x509_crt_get_dn_oid.3 gnutls_x509_crt_get_signature_algorithm.3 gnutls_x509_crt_get_signature.3 gnutls_x509_crt_get_version.3 gnutls_x509_crt_get_activation_time.3 gnutls_x509_crt_get_expiration_time.3 gnutls_x509_crt_get_serial.3 gnutls_x509_crt_get_subject_key_id.3 gnutls_x509_crt_get_authority_key_id.3 gnutls_x509_crt_get_pk_algorithm.3 gnutls_x509_crt_get_subject_alt_name.3 gnutls_x509_crt_get_subject_alt_name2.3 gnutls_x509_crt_get_subject_alt_othername_oid.3 gnutls_x509_crt_get_basic_constraints.3 gnutls_x509_crt_get_ca_status.3 gnutls_x509_crt_get_key_usage.3 gnutls_x509_crt_get_proxy.3 gnutls_x509_crt_get_extension_by_oid.3 gnutls_x509_crt_get_extension_oid.3 gnutls_x509_crt_get_extension_info.3 gnutls_x509_crt_get_extension_data.3 gnutls_x509_crt_get_raw_issuer_dn.3 gnutls_x509_crt_get_raw_dn.3 gnutls_x509_crt_get_subject.3 gnutls_x509_crt_get_issuer.3 gnutls_x509_dn_get_rdn_ava.3 gnutls_x509_crt_get_fingerprint.3 gnutls_x509_crt_export.3 gnutls_x509_crt_get_key_id.3 gnutls_x509_crt_check_revocation.3 gnutls_x509_crt_verify_data.3 gnutls_x509_crt_get_crl_dist_points.3 gnutls_x509_crt_get_key_purpose_oid.3 gnutls_x509_crt_get_pk_rsa_raw.3 gnutls_x509_crt_get_pk_dsa_raw.3 gnutls_x509_crt_list_import.3 gnutls_x509_crt_set_dn_by_oid.3 gnutls_x509_crt_set_issuer_dn_by_oid.3 gnutls_x509_crt_set_proxy_dn.3 gnutls_x509_crt_set_version.3 gnutls_x509_crt_set_key.3 gnutls_x509_crt_set_crq.3 gnutls_x509_crt_set_extension_by_oid.3 gnutls_x509_crt_set_basic_constraints.3 gnutls_x509_crt_set_ca_status.3 gnutls_x509_crt_set_key_usage.3 gnutls_x509_crt_set_subject_alternative_name.3 gnutls_x509_crt_set_proxy.3 gnutls_x509_crt_sign2.3 gnutls_x509_crt_sign.3 gnutls_x509_crt_set_activation_time.3 gnutls_x509_crt_set_expiration_time.3 gnutls_x509_crt_set_serial.3 gnutls_x509_crt_set_crl_dist_points.3 gnutls_x509_crt_cpy_crl_dist_points.3 gnutls_x509_crt_set_subject_key_id.3 gnutls_x509_crt_set_authority_key_id.3 gnutls_x509_crt_set_key_purpose_oid.3 gnutls_openpgp_keyring_init.3 gnutls_openpgp_keyring_deinit.3 gnutls_openpgp_keyring_check_id.3 gnutls_openpgp_keyring_import.3 gnutls_openpgp_keyring_get_crt_count.3 gnutls_openpgp_keyring_get_crt.3 gnutls_openpgp_crt_print.3 gnutls_openpgp_crt_init.3 gnutls_openpgp_crt_deinit.3 gnutls_openpgp_crt_import.3 gnutls_openpgp_crt_export.3 gnutls_openpgp_crt_get_fingerprint.3 gnutls_openpgp_crt_get_name.3 gnutls_openpgp_crt_get_pk_algorithm.3 gnutls_openpgp_crt_get_version.3 gnutls_openpgp_crt_get_creation_time.3 gnutls_openpgp_crt_get_expiration_time.3 gnutls_openpgp_crt_get_key_id.3 gnutls_openpgp_crt_get_revoked_status.3 gnutls_openpgp_crt_check_hostname.3 gnutls_openpgp_crt_get_key_usage.3 gnutls_openpgp_crt_get_subkey_count.3 gnutls_openpgp_crt_get_subkey_revoked_status.3 gnutls_openpgp_crt_get_subkey_pk_algorithm.3 gnutls_openpgp_crt_get_subkey_creation_time.3 gnutls_openpgp_crt_get_subkey_expiration_time.3 gnutls_openpgp_crt_get_subkey_id.3 gnutls_openpgp_crt_get_subkey_idx.3 gnutls_openpgp_crt_get_subkey_usage.3 gnutls_openpgp_crt_get_pk_rsa_raw.3 gnutls_openpgp_crt_get_pk_dsa_raw.3 gnutls_openpgp_crt_get_subkey_pk_rsa_raw.3 gnutls_openpgp_crt_get_subkey_pk_dsa_raw.3 gnutls_openpgp_crt_get_preferred_key_id.3 gnutls_openpgp_crt_set_preferred_key_id.3 gnutls_openpgp_crt_get_auth_subkey.3 gnutls_openpgp_crt_verify_ring.3 gnutls_openpgp_crt_verify_self.3 gnutls_openpgp_privkey_init.3 gnutls_openpgp_privkey_deinit.3 gnutls_openpgp_privkey_import.3 gnutls_openpgp_privkey_export.3 gnutls_openpgp_privkey_get_pk_algorithm.3 gnutls_openpgp_privkey_get_revoked_status.3 gnutls_openpgp_privkey_get_fingerprint.3 gnutls_openpgp_privkey_get_key_id.3 gnutls_openpgp_privkey_get_subkey_count.3 gnutls_openpgp_privkey_get_subkey_revoked_status.3 gnutls_openpgp_privkey_get_subkey_pk_algorithm.3 gnutls_openpgp_privkey_get_subkey_idx.3 gnutls_openpgp_privkey_get_subkey_creation_time.3 gnutls_openpgp_privkey_get_subkey_expiration_time.3 gnutls_openpgp_privkey_get_subkey_id.3 gnutls_openpgp_privkey_export_rsa_raw.3 gnutls_openpgp_privkey_export_dsa_raw.3 gnutls_openpgp_privkey_export_subkey_rsa_raw.3 gnutls_openpgp_privkey_export_subkey_dsa_raw.3 gnutls_openpgp_privkey_get_preferred_key_id.3 gnutls_openpgp_privkey_set_preferred_key_id.3
+APIMANS =
+APIMANS += gnutls_crypto_cipher_register.3
+APIMANS += gnutls_crypto_rnd_register.3
+APIMANS += gnutls_crypto_mac_register.3
+APIMANS += gnutls_crypto_digest_register.3
+APIMANS += gnutls_oprfi_enable_client.3
+APIMANS += gnutls_oprfi_enable_server.3
+APIMANS += gnutls_server_name_get.3
+APIMANS += gnutls_server_name_set.3
+APIMANS += gnutls_alert_get_name.3
+APIMANS += gnutls_alert_send.3
+APIMANS += gnutls_error_to_alert.3
+APIMANS += gnutls_alert_send_appropriate.3
+APIMANS += gnutls_alert_get.3
+APIMANS += gnutls_mac_get_name.3
+APIMANS += gnutls_mac_get_id.3
+APIMANS += gnutls_mac_get_key_size.3
+APIMANS += gnutls_mac_list.3
+APIMANS += gnutls_compression_get_name.3
+APIMANS += gnutls_compression_get_id.3
+APIMANS += gnutls_compression_list.3
+APIMANS += gnutls_cipher_get_key_size.3
+APIMANS += gnutls_cipher_get_name.3
+APIMANS += gnutls_cipher_get_id.3
+APIMANS += gnutls_cipher_list.3
+APIMANS += gnutls_kx_get_name.3
+APIMANS += gnutls_kx_get_id.3
+APIMANS += gnutls_kx_list.3
+APIMANS += gnutls_protocol_get_name.3
+APIMANS += gnutls_protocol_get_id.3
+APIMANS += gnutls_protocol_list.3
+APIMANS += gnutls_cipher_suite_get_name.3
+APIMANS += gnutls_cipher_suite_info.3
+APIMANS += gnutls_certificate_type_get_name.3
+APIMANS += gnutls_certificate_type_get_id.3
+APIMANS += gnutls_certificate_type_list.3
+APIMANS += gnutls_sign_algorithm_get_name.3
+APIMANS += gnutls_pk_algorithm_get_name.3
+APIMANS += gnutls_anon_free_server_credentials.3
+APIMANS += gnutls_anon_allocate_server_credentials.3
+APIMANS += gnutls_anon_free_client_credentials.3
+APIMANS += gnutls_anon_allocate_client_credentials.3
+APIMANS += gnutls_anon_set_server_dh_params.3
+APIMANS += gnutls_anon_set_server_params_function.3
+APIMANS += gnutls_credentials_clear.3
+APIMANS += gnutls_credentials_set.3
+APIMANS += gnutls_auth_get_type.3
+APIMANS += gnutls_auth_server_get_type.3
+APIMANS += gnutls_auth_client_get_type.3
+APIMANS += gnutls_transport_set_errno.3
+APIMANS += gnutls_transport_set_global_errno.3
+APIMANS += gnutls_record_check_pending.3
+APIMANS += gnutls_certificate_free_keys.3
+APIMANS += gnutls_certificate_free_cas.3
+APIMANS += gnutls_certificate_get_x509_cas.3
+APIMANS += gnutls_certificate_get_x509_crls.3
+APIMANS += gnutls_certificate_get_openpgp_keyring.3
+APIMANS += gnutls_certificate_free_ca_names.3
+APIMANS += gnutls_certificate_free_credentials.3
+APIMANS += gnutls_certificate_allocate_credentials.3
+APIMANS += gnutls_certificate_server_set_request.3
+APIMANS += gnutls_certificate_client_set_retrieve_function.3
+APIMANS += gnutls_certificate_server_set_retrieve_function.3
+APIMANS += gnutls_certificate_verify_peers2.3
+APIMANS += gnutls_certificate_verify_peers.3
+APIMANS += gnutls_certificate_expiration_time_peers.3
+APIMANS += gnutls_certificate_activation_time_peers.3
+APIMANS += gnutls_sign_callback_set.3
+APIMANS += gnutls_sign_callback_get.3
+APIMANS += gnutls_db_set_retrieve_function.3
+APIMANS += gnutls_db_set_remove_function.3
+APIMANS += gnutls_db_set_store_function.3
+APIMANS += gnutls_db_set_ptr.3
+APIMANS += gnutls_db_get_ptr.3
+APIMANS += gnutls_db_set_cache_expiration.3
+APIMANS += gnutls_db_check_entry.3
+APIMANS += gnutls_db_remove_session.3
+APIMANS += gnutls_dh_params_import_raw.3
+APIMANS += gnutls_dh_params_init.3
+APIMANS += gnutls_dh_params_deinit.3
+APIMANS += gnutls_dh_params_cpy.3
+APIMANS += gnutls_dh_params_generate2.3
+APIMANS += gnutls_dh_params_import_pkcs3.3
+APIMANS += gnutls_dh_params_export_pkcs3.3
+APIMANS += gnutls_dh_params_export_raw.3
+APIMANS += gnutls_error_is_fatal.3
+APIMANS += gnutls_perror.3
+APIMANS += gnutls_strerror.3
+APIMANS += gnutls_global_set_log_function.3
+APIMANS += gnutls_global_set_log_level.3
+APIMANS += gnutls_global_set_mem_functions.3
+APIMANS += gnutls_global_init.3
+APIMANS += gnutls_global_deinit.3
+APIMANS += gnutls_transport_set_pull_function.3
+APIMANS += gnutls_transport_set_push_function.3
+APIMANS += gnutls_check_version.3
+APIMANS += gnutls_rehandshake.3
+APIMANS += gnutls_handshake.3
+APIMANS += gnutls_handshake_set_max_packet_length.3
+APIMANS += gnutls_handshake_get_last_in.3
+APIMANS += gnutls_handshake_get_last_out.3
+APIMANS += gnutls_malloc.3
+APIMANS += gnutls_free.3
+APIMANS += gnutls_certificate_set_openpgp_key.3
+APIMANS += gnutls_certificate_set_openpgp_key_mem.3
+APIMANS += gnutls_certificate_set_openpgp_key_file.3
+APIMANS += gnutls_certificate_set_openpgp_key_mem2.3
+APIMANS += gnutls_certificate_set_openpgp_key_file2.3
+APIMANS += gnutls_certificate_set_openpgp_keyring_file.3
+APIMANS += gnutls_certificate_set_openpgp_keyring_mem.3
+APIMANS += gnutls_openpgp_set_recv_key_function.3
+APIMANS += gnutls_openpgp_privkey_sign_hash.3
+APIMANS += gnutls_cipher_set_priority.3
+APIMANS += gnutls_kx_set_priority.3
+APIMANS += gnutls_mac_set_priority.3
+APIMANS += gnutls_compression_set_priority.3
+APIMANS += gnutls_protocol_set_priority.3
+APIMANS += gnutls_certificate_type_set_priority.3
+APIMANS += gnutls_priority_set.3
+APIMANS += gnutls_priority_init.3
+APIMANS += gnutls_priority_deinit.3
+APIMANS += gnutls_priority_set_direct.3
+APIMANS += gnutls_set_default_priority.3
+APIMANS += gnutls_set_default_export_priority.3
+APIMANS += gnutls_psk_free_client_credentials.3
+APIMANS += gnutls_psk_allocate_client_credentials.3
+APIMANS += gnutls_psk_set_client_credentials.3
+APIMANS += gnutls_psk_free_server_credentials.3
+APIMANS += gnutls_psk_allocate_server_credentials.3
+APIMANS += gnutls_psk_set_server_credentials_file.3
+APIMANS += gnutls_psk_set_server_credentials_function.3
+APIMANS += gnutls_psk_set_client_credentials_function.3
+APIMANS += gnutls_psk_server_get_username.3
+APIMANS += gnutls_hex_decode.3
+APIMANS += gnutls_hex_encode.3
+APIMANS += gnutls_psk_set_server_dh_params.3
+APIMANS += gnutls_psk_set_server_params_function.3
+APIMANS += gnutls_protocol_get_version.3
+APIMANS += gnutls_transport_set_lowat.3
+APIMANS += gnutls_record_disable_padding.3
+APIMANS += gnutls_transport_set_ptr.3
+APIMANS += gnutls_transport_set_ptr2.3
+APIMANS += gnutls_transport_get_ptr.3
+APIMANS += gnutls_transport_get_ptr2.3
+APIMANS += gnutls_bye.3
+APIMANS += gnutls_record_send.3
+APIMANS += gnutls_record_recv.3
+APIMANS += gnutls_record_get_max_size.3
+APIMANS += gnutls_record_set_max_size.3
+APIMANS += gnutls_rsa_params_import_raw.3
+APIMANS += gnutls_rsa_params_init.3
+APIMANS += gnutls_rsa_params_deinit.3
+APIMANS += gnutls_rsa_params_cpy.3
+APIMANS += gnutls_rsa_params_generate2.3
+APIMANS += gnutls_rsa_params_import_pkcs1.3
+APIMANS += gnutls_rsa_params_export_pkcs1.3
+APIMANS += gnutls_rsa_params_export_raw.3
+APIMANS += gnutls_session_get_data.3
+APIMANS += gnutls_session_get_data2.3
+APIMANS += gnutls_session_get_id.3
+APIMANS += gnutls_session_set_data.3
+APIMANS += gnutls_cipher_get.3
+APIMANS += gnutls_certificate_type_get.3
+APIMANS += gnutls_kx_get.3
+APIMANS += gnutls_mac_get.3
+APIMANS += gnutls_compression_get.3
+APIMANS += gnutls_init.3
+APIMANS += gnutls_deinit.3
+APIMANS += gnutls_openpgp_send_cert.3
+APIMANS += gnutls_certificate_send_x509_rdn_sequence.3
+APIMANS += gnutls_handshake_set_private_extensions.3
+APIMANS += gnutls_prf_raw.3
+APIMANS += gnutls_prf.3
+APIMANS += gnutls_session_get_client_random.3
+APIMANS += gnutls_session_get_server_random.3
+APIMANS += gnutls_session_get_master_secret.3
+APIMANS += gnutls_session_is_resumed.3
+APIMANS += gnutls_session_get_ptr.3
+APIMANS += gnutls_session_set_ptr.3
+APIMANS += gnutls_record_get_direction.3
+APIMANS += gnutls_handshake_set_post_client_hello_function.3
+APIMANS += gnutls_session_enable_compatibility_mode.3
+APIMANS += gnutls_hex2bin.3
+APIMANS += gnutls_dh_set_prime_bits.3
+APIMANS += gnutls_dh_get_group.3
+APIMANS += gnutls_dh_get_pubkey.3
+APIMANS += gnutls_rsa_export_get_pubkey.3
+APIMANS += gnutls_dh_get_secret_bits.3
+APIMANS += gnutls_dh_get_prime_bits.3
+APIMANS += gnutls_rsa_export_get_modulus_bits.3
+APIMANS += gnutls_dh_get_peers_public_bits.3
+APIMANS += gnutls_certificate_get_ours.3
+APIMANS += gnutls_certificate_get_peers.3
+APIMANS += gnutls_certificate_client_get_request_status.3
+APIMANS += gnutls_fingerprint.3
+APIMANS += gnutls_certificate_set_dh_params.3
+APIMANS += gnutls_certificate_set_params_function.3
+APIMANS += gnutls_certificate_set_verify_flags.3
+APIMANS += gnutls_certificate_set_verify_limits.3
+APIMANS += gnutls_certificate_set_rsa_export_params.3
+APIMANS += gnutls_psk_set_params_function.3
+APIMANS += gnutls_anon_set_params_function.3
+APIMANS += gnutls_certificate_set_x509_key_mem.3
+APIMANS += gnutls_certificate_set_x509_key.3
+APIMANS += gnutls_certificate_set_x509_key_file.3
+APIMANS += gnutls_certificate_set_x509_trust_mem.3
+APIMANS += gnutls_certificate_set_x509_trust.3
+APIMANS += gnutls_certificate_set_x509_trust_file.3
+APIMANS += gnutls_certificate_set_x509_crl_mem.3
+APIMANS += gnutls_certificate_set_x509_crl.3
+APIMANS += gnutls_certificate_set_x509_crl_file.3
+APIMANS += gnutls_certificate_set_x509_simple_pkcs12_file.3
+APIMANS += gnutls_certificate_free_crls.3
+APIMANS += gnutls_pem_base64_encode.3
+APIMANS += gnutls_pem_base64_encode_alloc.3
+APIMANS += gnutls_pem_base64_decode.3
+APIMANS += gnutls_pem_base64_decode_alloc.3
+APIMANS += gnutls_global_init_extra.3
+APIMANS += gnutls_extra_check_version.3
+APIMANS += gnutls_ia_permute_inner_secret.3
+APIMANS += gnutls_ia_generate_challenge.3
+APIMANS += gnutls_ia_extract_inner_secret.3
+APIMANS += gnutls_ia_endphase_send.3
+APIMANS += gnutls_ia_verify_endphase.3
+APIMANS += gnutls_ia_send.3
+APIMANS += gnutls_ia_recv.3
+APIMANS += gnutls_ia_handshake_p.3
+APIMANS += gnutls_ia_handshake.3
+APIMANS += gnutls_ia_allocate_client_credentials.3
+APIMANS += gnutls_ia_free_client_credentials.3
+APIMANS += gnutls_ia_set_client_avp_function.3
+APIMANS += gnutls_ia_set_client_avp_ptr.3
+APIMANS += gnutls_ia_get_client_avp_ptr.3
+APIMANS += gnutls_ia_allocate_server_credentials.3
+APIMANS += gnutls_ia_free_server_credentials.3
+APIMANS += gnutls_ia_set_server_avp_function.3
+APIMANS += gnutls_ia_set_server_avp_ptr.3
+APIMANS += gnutls_ia_get_server_avp_ptr.3
+APIMANS += gnutls_ia_enable.3
+APIMANS += gnutls_x509_dn_oid_known.3
+APIMANS += gnutls_x509_crl_init.3
+APIMANS += gnutls_x509_crl_deinit.3
+APIMANS += gnutls_x509_crl_import.3
+APIMANS += gnutls_x509_crl_get_issuer_dn.3
+APIMANS += gnutls_x509_crl_get_issuer_dn_by_oid.3
+APIMANS += gnutls_x509_crl_get_dn_oid.3
+APIMANS += gnutls_x509_crl_get_signature_algorithm.3
+APIMANS += gnutls_x509_crl_get_signature.3
+APIMANS += gnutls_x509_crl_get_version.3
+APIMANS += gnutls_x509_crl_get_this_update.3
+APIMANS += gnutls_x509_crl_get_next_update.3
+APIMANS += gnutls_x509_crl_get_crt_count.3
+APIMANS += gnutls_x509_crl_get_crt_serial.3
+APIMANS += gnutls_x509_crl_export.3
+APIMANS += gnutls_x509_crl_set_version.3
+APIMANS += gnutls_x509_crl_sign2.3
+APIMANS += gnutls_x509_crl_sign.3
+APIMANS += gnutls_x509_crl_set_this_update.3
+APIMANS += gnutls_x509_crl_set_next_update.3
+APIMANS += gnutls_x509_crl_set_crt_serial.3
+APIMANS += gnutls_x509_crl_set_crt.3
+APIMANS += gnutls_x509_crq_init.3
+APIMANS += gnutls_x509_crq_deinit.3
+APIMANS += gnutls_x509_crq_import.3
+APIMANS += gnutls_x509_crq_get_dn.3
+APIMANS += gnutls_x509_crq_get_dn_by_oid.3
+APIMANS += gnutls_x509_crq_get_dn_oid.3
+APIMANS += gnutls_x509_crq_get_challenge_password.3
+APIMANS += gnutls_x509_crq_set_attribute_by_oid.3
+APIMANS += gnutls_x509_crq_get_attribute_by_oid.3
+APIMANS += gnutls_x509_crq_set_dn_by_oid.3
+APIMANS += gnutls_x509_crq_set_version.3
+APIMANS += gnutls_x509_crq_get_version.3
+APIMANS += gnutls_x509_crq_set_key.3
+APIMANS += gnutls_x509_crq_set_challenge_password.3
+APIMANS += gnutls_x509_crq_sign2.3
+APIMANS += gnutls_x509_crq_sign.3
+APIMANS += gnutls_x509_crq_export.3
+APIMANS += gnutls_x509_crq_get_pk_algorithm.3
+APIMANS += gnutls_x509_dn_init.3
+APIMANS += gnutls_x509_dn_import.3
+APIMANS += gnutls_x509_dn_deinit.3
+APIMANS += gnutls_x509_rdn_get.3
+APIMANS += gnutls_x509_rdn_get_by_oid.3
+APIMANS += gnutls_x509_rdn_get_oid.3
+APIMANS += gnutls_x509_dn_export.3
+APIMANS += gnutls_x509_crt_print.3
+APIMANS += gnutls_x509_crl_print.3
+APIMANS += gnutls_pkcs12_init.3
+APIMANS += gnutls_pkcs12_deinit.3
+APIMANS += gnutls_pkcs12_import.3
+APIMANS += gnutls_pkcs12_export.3
+APIMANS += gnutls_pkcs12_get_bag.3
+APIMANS += gnutls_pkcs12_set_bag.3
+APIMANS += gnutls_pkcs12_generate_mac.3
+APIMANS += gnutls_pkcs12_verify_mac.3
+APIMANS += gnutls_pkcs12_bag_init.3
+APIMANS += gnutls_pkcs12_bag_deinit.3
+APIMANS += gnutls_pkcs12_bag_get_type.3
+APIMANS += gnutls_pkcs12_bag_get_count.3
+APIMANS += gnutls_pkcs12_bag_get_data.3
+APIMANS += gnutls_pkcs12_bag_set_data.3
+APIMANS += gnutls_pkcs12_bag_set_crt.3
+APIMANS += gnutls_pkcs12_bag_set_crl.3
+APIMANS += gnutls_pkcs12_bag_set_key_id.3
+APIMANS += gnutls_pkcs12_bag_get_key_id.3
+APIMANS += gnutls_pkcs12_bag_get_friendly_name.3
+APIMANS += gnutls_pkcs12_bag_set_friendly_name.3
+APIMANS += gnutls_pkcs12_bag_decrypt.3
+APIMANS += gnutls_pkcs12_bag_encrypt.3
+APIMANS += gnutls_pkcs7_init.3
+APIMANS += gnutls_pkcs7_deinit.3
+APIMANS += gnutls_pkcs7_import.3
+APIMANS += gnutls_pkcs7_get_crt_raw.3
+APIMANS += gnutls_pkcs7_get_crt_count.3
+APIMANS += gnutls_pkcs7_export.3
+APIMANS += gnutls_pkcs7_set_crt_raw.3
+APIMANS += gnutls_pkcs7_set_crt.3
+APIMANS += gnutls_pkcs7_delete_crt.3
+APIMANS += gnutls_pkcs7_get_crl_raw.3
+APIMANS += gnutls_pkcs7_get_crl_count.3
+APIMANS += gnutls_pkcs7_set_crl_raw.3
+APIMANS += gnutls_pkcs7_set_crl.3
+APIMANS += gnutls_pkcs7_delete_crl.3
+APIMANS += gnutls_x509_privkey_init.3
+APIMANS += gnutls_x509_privkey_deinit.3
+APIMANS += gnutls_x509_privkey_cpy.3
+APIMANS += gnutls_x509_privkey_import.3
+APIMANS += gnutls_x509_privkey_import_rsa_raw.3
+APIMANS += gnutls_x509_privkey_import_dsa_raw.3
+APIMANS += gnutls_x509_privkey_get_pk_algorithm.3
+APIMANS += gnutls_x509_privkey_export.3
+APIMANS += gnutls_x509_privkey_export_rsa_raw.3
+APIMANS += gnutls_x509_privkey_export_dsa_raw.3
+APIMANS += gnutls_x509_privkey_generate.3
+APIMANS += gnutls_x509_privkey_get_key_id.3
+APIMANS += gnutls_x509_privkey_sign_data.3
+APIMANS += gnutls_x509_privkey_sign_hash.3
+APIMANS += gnutls_x509_privkey_verify_data.3
+APIMANS += gnutls_x509_privkey_fix.3
+APIMANS += gnutls_x509_privkey_export_pkcs8.3
+APIMANS += gnutls_x509_privkey_import_pkcs8.3
+APIMANS += gnutls_x509_crt_check_hostname.3
+APIMANS += gnutls_x509_crt_check_issuer.3
+APIMANS += gnutls_x509_crt_list_verify.3
+APIMANS += gnutls_x509_crt_verify.3
+APIMANS += gnutls_x509_crl_check_issuer.3
+APIMANS += gnutls_x509_crl_verify.3
+APIMANS += gnutls_x509_crt_init.3
+APIMANS += gnutls_x509_crt_deinit.3
+APIMANS += gnutls_x509_crt_import.3
+APIMANS += gnutls_x509_crt_get_issuer_dn.3
+APIMANS += gnutls_x509_crt_get_issuer_dn_by_oid.3
+APIMANS += gnutls_x509_crt_get_issuer_dn_oid.3
+APIMANS += gnutls_x509_crt_get_dn.3
+APIMANS += gnutls_x509_crt_get_dn_by_oid.3
+APIMANS += gnutls_x509_crt_get_dn_oid.3
+APIMANS += gnutls_x509_crt_get_signature_algorithm.3
+APIMANS += gnutls_x509_crt_get_signature.3
+APIMANS += gnutls_x509_crt_get_version.3
+APIMANS += gnutls_x509_crt_get_activation_time.3
+APIMANS += gnutls_x509_crt_get_expiration_time.3
+APIMANS += gnutls_x509_crt_get_serial.3
+APIMANS += gnutls_x509_crt_get_subject_key_id.3
+APIMANS += gnutls_x509_crt_get_authority_key_id.3
+APIMANS += gnutls_x509_crt_get_pk_algorithm.3
+APIMANS += gnutls_x509_crt_get_subject_alt_name.3
+APIMANS += gnutls_x509_crt_get_subject_alt_name2.3
+APIMANS += gnutls_x509_crt_get_subject_alt_othername_oid.3
+APIMANS += gnutls_x509_crt_get_basic_constraints.3
+APIMANS += gnutls_x509_crt_get_ca_status.3
+APIMANS += gnutls_x509_crt_get_key_usage.3
+APIMANS += gnutls_x509_crt_get_proxy.3
+APIMANS += gnutls_x509_crt_get_extension_by_oid.3
+APIMANS += gnutls_x509_crt_get_extension_oid.3
+APIMANS += gnutls_x509_crt_get_extension_info.3
+APIMANS += gnutls_x509_crt_get_extension_data.3
+APIMANS += gnutls_x509_crt_get_raw_issuer_dn.3
+APIMANS += gnutls_x509_crt_get_raw_dn.3
+APIMANS += gnutls_x509_crt_get_subject.3
+APIMANS += gnutls_x509_crt_get_issuer.3
+APIMANS += gnutls_x509_dn_get_rdn_ava.3
+APIMANS += gnutls_x509_crt_get_fingerprint.3
+APIMANS += gnutls_x509_crt_export.3
+APIMANS += gnutls_x509_crt_get_key_id.3
+APIMANS += gnutls_x509_crt_check_revocation.3
+APIMANS += gnutls_x509_crt_verify_data.3
+APIMANS += gnutls_x509_crt_get_crl_dist_points.3
+APIMANS += gnutls_x509_crt_get_key_purpose_oid.3
+APIMANS += gnutls_x509_crt_get_pk_rsa_raw.3
+APIMANS += gnutls_x509_crt_get_pk_dsa_raw.3
+APIMANS += gnutls_x509_crt_list_import.3
+APIMANS += gnutls_x509_crt_set_dn_by_oid.3
+APIMANS += gnutls_x509_crt_set_issuer_dn_by_oid.3
+APIMANS += gnutls_x509_crt_set_proxy_dn.3
+APIMANS += gnutls_x509_crt_set_version.3
+APIMANS += gnutls_x509_crt_set_key.3
+APIMANS += gnutls_x509_crt_set_crq.3
+APIMANS += gnutls_x509_crt_set_extension_by_oid.3
+APIMANS += gnutls_x509_crt_set_basic_constraints.3
+APIMANS += gnutls_x509_crt_set_ca_status.3
+APIMANS += gnutls_x509_crt_set_key_usage.3
+APIMANS += gnutls_x509_crt_set_subject_alternative_name.3
+APIMANS += gnutls_x509_crt_set_proxy.3
+APIMANS += gnutls_x509_crt_sign2.3
+APIMANS += gnutls_x509_crt_sign.3
+APIMANS += gnutls_x509_crt_set_activation_time.3
+APIMANS += gnutls_x509_crt_set_expiration_time.3
+APIMANS += gnutls_x509_crt_set_serial.3
+APIMANS += gnutls_x509_crt_set_crl_dist_points.3
+APIMANS += gnutls_x509_crt_cpy_crl_dist_points.3
+APIMANS += gnutls_x509_crt_set_subject_key_id.3
+APIMANS += gnutls_x509_crt_set_authority_key_id.3
+APIMANS += gnutls_x509_crt_set_key_purpose_oid.3
+APIMANS += gnutls_openpgp_keyring_init.3
+APIMANS += gnutls_openpgp_keyring_deinit.3
+APIMANS += gnutls_openpgp_keyring_check_id.3
+APIMANS += gnutls_openpgp_keyring_import.3
+APIMANS += gnutls_openpgp_keyring_get_crt_count.3
+APIMANS += gnutls_openpgp_keyring_get_crt.3
+APIMANS += gnutls_openpgp_crt_print.3
+APIMANS += gnutls_openpgp_crt_init.3
+APIMANS += gnutls_openpgp_crt_deinit.3
+APIMANS += gnutls_openpgp_crt_import.3
+APIMANS += gnutls_openpgp_crt_export.3
+APIMANS += gnutls_openpgp_crt_get_fingerprint.3
+APIMANS += gnutls_openpgp_crt_get_name.3
+APIMANS += gnutls_openpgp_crt_get_pk_algorithm.3
+APIMANS += gnutls_openpgp_crt_get_version.3
+APIMANS += gnutls_openpgp_crt_get_creation_time.3
+APIMANS += gnutls_openpgp_crt_get_expiration_time.3
+APIMANS += gnutls_openpgp_crt_get_key_id.3
+APIMANS += gnutls_openpgp_crt_get_revoked_status.3
+APIMANS += gnutls_openpgp_crt_check_hostname.3
+APIMANS += gnutls_openpgp_crt_get_key_usage.3
+APIMANS += gnutls_openpgp_crt_get_subkey_count.3
+APIMANS += gnutls_openpgp_crt_get_subkey_revoked_status.3
+APIMANS += gnutls_openpgp_crt_get_subkey_pk_algorithm.3
+APIMANS += gnutls_openpgp_crt_get_subkey_creation_time.3
+APIMANS += gnutls_openpgp_crt_get_subkey_expiration_time.3
+APIMANS += gnutls_openpgp_crt_get_subkey_id.3
+APIMANS += gnutls_openpgp_crt_get_subkey_idx.3
+APIMANS += gnutls_openpgp_crt_get_subkey_usage.3
+APIMANS += gnutls_openpgp_crt_get_pk_rsa_raw.3
+APIMANS += gnutls_openpgp_crt_get_pk_dsa_raw.3
+APIMANS += gnutls_openpgp_crt_get_subkey_pk_rsa_raw.3
+APIMANS += gnutls_openpgp_crt_get_subkey_pk_dsa_raw.3
+APIMANS += gnutls_openpgp_crt_get_preferred_key_id.3
+APIMANS += gnutls_openpgp_crt_set_preferred_key_id.3
+APIMANS += gnutls_openpgp_crt_get_auth_subkey.3
+APIMANS += gnutls_openpgp_crt_verify_ring.3
+APIMANS += gnutls_openpgp_crt_verify_self.3
+APIMANS += gnutls_openpgp_privkey_init.3
+APIMANS += gnutls_openpgp_privkey_deinit.3
+APIMANS += gnutls_openpgp_privkey_import.3
+APIMANS += gnutls_openpgp_privkey_export.3
+APIMANS += gnutls_openpgp_privkey_get_pk_algorithm.3
+APIMANS += gnutls_openpgp_privkey_get_revoked_status.3
+APIMANS += gnutls_openpgp_privkey_get_fingerprint.3
+APIMANS += gnutls_openpgp_privkey_get_key_id.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_count.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_revoked_status.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_pk_algorithm.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_idx.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_creation_time.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_expiration_time.3
+APIMANS += gnutls_openpgp_privkey_get_subkey_id.3
+APIMANS += gnutls_openpgp_privkey_export_rsa_raw.3
+APIMANS += gnutls_openpgp_privkey_export_dsa_raw.3
+APIMANS += gnutls_openpgp_privkey_export_subkey_rsa_raw.3
+APIMANS += gnutls_openpgp_privkey_export_subkey_dsa_raw.3
+APIMANS += gnutls_openpgp_privkey_get_preferred_key_id.3
+APIMANS += gnutls_openpgp_privkey_set_preferred_key_id.3
-SRPMANS = gnutls_srp_base64_encode.3 gnutls_srp_base64_encode_alloc.3 gnutls_srp_base64_decode.3 gnutls_srp_base64_decode_alloc.3 gnutls_srp_free_client_credentials.3 gnutls_srp_allocate_client_credentials.3 gnutls_srp_set_client_credentials.3 gnutls_srp_free_server_credentials.3 gnutls_srp_allocate_server_credentials.3 gnutls_srp_set_server_credentials_file.3 gnutls_srp_set_server_credentials_function.3 gnutls_srp_set_client_credentials_function.3 gnutls_srp_server_get_username.3 gnutls_srp_verifier.3
+SRPMANS =
+SRPMANS += gnutls_srp_base64_encode.3
+SRPMANS += gnutls_srp_base64_encode_alloc.3
+SRPMANS += gnutls_srp_base64_decode.3
+SRPMANS += gnutls_srp_base64_decode_alloc.3
+SRPMANS += gnutls_srp_free_client_credentials.3
+SRPMANS += gnutls_srp_allocate_client_credentials.3
+SRPMANS += gnutls_srp_set_client_credentials.3
+SRPMANS += gnutls_srp_free_server_credentials.3
+SRPMANS += gnutls_srp_allocate_server_credentials.3
+SRPMANS += gnutls_srp_set_server_credentials_file.3
+SRPMANS += gnutls_srp_set_server_credentials_function.3
+SRPMANS += gnutls_srp_set_client_credentials_function.3
+SRPMANS += gnutls_srp_server_get_username.3
+SRPMANS += gnutls_srp_verifier.3
dist_man_MANS += $(APIMANS)
if ENABLE_SRP
@@ -47,13 +533,15 @@ update-makefile:
SRPMANS=""; \
for i in $$FUNCS; do \
if echo $$i | grep -q _srp_; then \
- SRPMANS="$$SRPMANS $$i.3"; \
+ SRPMANS="$$SRPMANS\nSRPMANS += $$i.3"; \
else \
- MANS="$$MANS $$i.3"; \
+ MANS="$$MANS\nAPIMANS += $$i.3"; \
fi \
done; \
- perl -pi -e "s/^APIMANS =.*/APIMANS =$$MANS/" Makefile.am; \
- perl -pi -e "s/^SRPMANS =.*/SRPMANS =$$SRPMANS/" Makefile.am
+ grep -v -e '^APIMANS += ' -e '^SRPMANS += ' Makefile.am | \
+ perl -p -e "s/^APIMANS =/APIMANS =$$MANS/" | \
+ perl -p -e "s/^SRPMANS =/SRPMANS =$$SRPMANS/" > foo; \
+ mv foo Makefile.am
doit:
@echo -n "Creating man pages for lib/" && \
diff --git a/doc/manpages/certtool.1 b/doc/manpages/certtool.1
index 4f87c60aa6..753db7199d 100644
--- a/doc/manpages/certtool.1
+++ b/doc/manpages/certtool.1
@@ -16,7 +16,7 @@ Shows this help text
.IP "\-v, \-\-version"
Shows the program's version
-.SS Getting information
+.SS Getting information on X.509 certificates
.IP "\-i, \-\-certificate\-info"
Print information on a certificate.
.IP "\-k, \-\-key\-info"
@@ -26,7 +26,15 @@ Print information on a CRL.
.IP "\-\-p12\-info"
Print information on a PKCS #12 structure.
-.SS Generating/verifying certificates/keys
+.SS Getting information on Openpgp certificates
+.IP "\-\-pgp\-\-certificate\-info"
+Print information on an OpenPGP certificate.
+.IP "\-\-pgp\-\-key\-info"
+Print information on an OpenPGP private key.
+.IP "\-\-pgp\-\-ring\-info"
+Print information on a keyring.
+
+.SS Generating/verifying X.509 certificates/keys
.IP "\-c, \-\-generate\-certificate"
Generate a signed certificate.
.IP "\-e, \-\-verify\-chain"
diff --git a/doc/manpages/gnutls-cli.1 b/doc/manpages/gnutls-cli.1
index 1b582fc931..aae7f08ca0 100644
--- a/doc/manpages/gnutls-cli.1
+++ b/doc/manpages/gnutls-cli.1
@@ -26,25 +26,71 @@ is received.
Prints the program's version number.
.SS TLS/SSL control options
-.IP "\-\-ciphers \fIcipher1 cipher2...\fR"
-Ciphers to enable (use \fBgnutls\-cli \-\-list\fR to show the
-supported ciphers).
-.IP "\-\-comp \fIcomp1 comp2...\fR"
-Compression methods to enable (use \fBgnutls\-cli \-\-list\fR to show
-the supported compression methods).
+.IP "\-\-priority \fIPRIORITY STRING\fR"
+TLS algorithms and protocols to enable.
+Unless the first keyword is "NONE" the defaults are:
+.IP
+Protocols: TLS1.1, TLS1.0, and SSL3.0.
+.IP
+Compression: NULL.
+.IP
+Certificate types: X.509, OpenPGP.
+.IP
+You can also use predefined sets of ciphersuites such as:
+.IP
+.B "PERFORMANCE"
+all the "secure" ciphersuites are enabled, limited to 128 bit
+ciphers and sorted by terms of speed performance.
+.IP
+.B "NORMAL"
+option enables all "secure" ciphersuites. The 256-bit ciphers
+are included as a fallback only. The ciphers are sorted by security
+margin.
+.IP
+.B "SECURE128"
+flag enables all "secure" ciphersuites with ciphers up to
+128 bits, sorted by security margin.
+.IP
+.B "SECURE256"
+flag enables all "secure" ciphersuites including the 256 bit
+ciphers, sorted by security margin.
+.IP
+.B "EXPORT"
+all the ciphersuites are enabled, including the
+low-security 40 bit ciphers.
+.IP
+.B "NONE"
+nothing is enabled. This disables even protocols and
+compression methods.
+.IP
+.IP
+Special keywords:
+.IP
+'!' or '-' appended with an algorithm will remove this algorithm.
+.IP
+'+' appended with an algorithm will add this algorithm.
+.IP
+'%COMPAT' will enable compatibility features for a server.
+.IP
+To avoid collisions in order to specify a compression algorithm in
+this string you have to prefix it with "COMP-", protocol versions
+with "VERS-" and certificate types with "CTYPE-". All other
+algorithms don't need a prefix.
+.IP
+.B Examples:
+.IP
+"NORMAL"
+.IP
+"NORMAL:%COMPAT"
+.IP
+"NORMAL:!AES-128-CBC"
+.IP
+"NONE:+VERS-TLS1.0:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"
+
.IP "\-\-crlf"
Send CR LF instead of LF.
-.IP "\-\-ctypes \fIcertType1 certType2...\fR"
-Certificate types to enable (use \fBgnutls\-cli \-\-list\fR to show
-the supported certificate types).
.IP "\-f, \-\-fingerprint"
Send the openpgp fingerprint, instead of the key.
-.IP "\-\-kx \fIkx1 kx2...\fR"
-Key exchange methods to enable (use \fBgnutls\-cli \-\-list\fR to show
-the supported key exchange methods).
-.IP "\-\-macs \fImac1 mac2...\fR"
-MACs (Message Authentication Codes) to enable (use \fBgnutls\-cli
-\-\-list\fR to show the supported MACs).
.IP "\-p, \-\-port \fIinteger\fR"
The port to connect to.
.IP "\-\-protocols \fIprotocol1 protocol2...\fR"
diff --git a/doc/manpages/gnutls-serv.1 b/doc/manpages/gnutls-serv.1
index b2cc143aa4..c4da337734 100644
--- a/doc/manpages/gnutls-serv.1
+++ b/doc/manpages/gnutls-serv.1
@@ -31,27 +31,74 @@ Act as an HTTP Server.
Act as an Echo Server.
.SS TLS/SSL control options
-.IP "\-\-ciphers \fIcipher1 cipher2...\fR"
-Ciphers to enable (use \fBgnutls\-cli \-\-list\fR to show the
-supported ciphers).
-.IP "\-\-comp \fIcomp1 comp2...\fR"
-Compression methods to enable (use \fBgnutls\-cli \-\-list\fR to show
-the supported compression methods).
-.IP "\-\-ctypes \fIcertType1 certType2...\fR"
-Certificate types to enable.
+.IP "\-\-priority \fIPRIORITY STRING\fR"
+TLS algorithms and protocols to enable.
+Unless the first keyword is "NONE" the defaults are:
+.IP
+Protocols: TLS1.1, TLS1.0, and SSL3.0.
+.IP
+Compression: NULL.
+.IP
+Certificate types: X.509, OpenPGP.
+.IP
+You can also use predefined sets of ciphersuites such as:
+.IP
+.B "PERFORMANCE"
+all the "secure" ciphersuites are enabled, limited to 128 bit
+ciphers and sorted by terms of speed performance.
+.IP
+.B "NORMAL"
+option enables all "secure" ciphersuites. The 256-bit ciphers
+are included as a fallback only. The ciphers are sorted by security
+margin.
+.IP
+.B "SECURE128"
+flag enables all "secure" ciphersuites with ciphers up to
+128 bits, sorted by security margin.
+.IP
+.B "SECURE256"
+flag enables all "secure" ciphersuites including the 256 bit
+ciphers, sorted by security margin.
+.IP
+.B "EXPORT"
+all the ciphersuites are enabled, including the
+low-security 40 bit ciphers.
+.IP
+.B "NONE"
+nothing is enabled. This disables even protocols and
+compression methods.
+.IP
+.IP
+Special keywords:
+.IP
+'!' or '-' appended with an algorithm will remove this algorithm.
+.IP
+'+' appended with an algorithm will add this algorithm.
+.IP
+'%COMPAT' will enable compatibility features for a server.
+.IP
+To avoid collisions in order to specify a compression algorithm in
+this string you have to prefix it with "COMP-", protocol versions
+with "VERS-" and certificate types with "CTYPE-". All other
+algorithms don't need a prefix.
+.IP
+.B Examples:
+.IP
+"NORMAL"
+.IP
+"NORMAL:%COMPAT"
+.IP
+"NORMAL:!AES-128-CBC"
+.IP
+"NONE:+VERS-TLS1.0:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"
+
.IP "\-g, \-\-generate"
Generate Diffie Hellman Parameters.
.IP "\-\-kx \fIkx1 kx2...\fR"
Key exchange methods to enable (use \fBgnutls\-cli \-\-list\fR to show
the supported key exchange methods).
-.IP "\-\-macs \fImac1 mac2...\fR"
-MACs (Message Authentication Codes) to enable (use \fBgnutls\-cli
-\-\-list\fR to show the supported MACs).
.IP "\-p, \-\-port \fIinteger\fR"
The port to connect to.
-.IP "\-\-protocols \fIprotocol1 protocol2...\fR"
-Protocols to enable (use \fBgnutls\-cli \-\-list\fR to show the
-supported protocols).
.SS Certificate options
.IP "\-\-pgpcertfile \fIFILE\fR"
diff --git a/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-00.txt b/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-00.txt
new file mode 100644
index 0000000000..c0eb4c19c4
--- /dev/null
+++ b/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-00.txt
@@ -0,0 +1,539 @@
+TLS Working Group Mohamad Badra
+Internet Draft LIMOS Laboratory
+Intended status: Standards Track March 29, 2008
+Expires: September 2008
+
+
+
+ Pre-Shared Key Cipher Suites for Transport Layer Security
+ with SHA-256/384 and AES Galois Counter Mode
+ draft-badra-tls-psk-new-mac-aes-gcm-00.txt
+
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six
+ months and may be updated, replaced, or obsoleted by other documents
+ at any time. It is inappropriate to use Internet-Drafts as
+ reference material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html
+
+ This Internet-Draft will expire on September 29, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ RFC 4279 and RFC 4785 describe pre-shared key cipher suites for
+ Transport Layer Security (TLS). However, all those cipher suites
+ use SHA-1 as their MAC algorithm. This document describes a set of
+ cipher suites for TLS/DTLS which uses stronger digest algorithms
+
+
+
+
+Badra Expires September 29, 2008 [Page 1]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ (i.e. SHA-256 or SHA-384) and another which uses AES in Galois
+ Counter Mode (GCM).
+
+Table of Contents
+
+
+ 1. Introduction...................................................3
+ 1.1. Conventions used in this document.........................3
+ 2. PSK, DHE_PSK and RSA_PSK Key Exchange Algorithms with AES-GCM..3
+ 3. PSK, DHE_PSK and RSA_PSK Key Exchange with SHA-256/384.........4
+ 3.1. PSK Key Exchange Algorithm with SHA-256/384...............4
+ 3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384...........5
+ 3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384...........5
+ 4. TLS Versions...................................................6
+ 5. Security Considerations........................................6
+ 5.1. Counter Reuse with GCM....................................6
+ 5.2. Recommendations for Multiple Encryption Processors........6
+ 6. IANA Considerations............................................7
+ 7. Acknowledgments................................................8
+ 8. References.....................................................8
+ 8.1. Normative References......................................8
+ 8.2. Informative References....................................9
+ Author's Addresses................................................9
+ Intellectual Property Statement..................................10
+ Disclaimer of Validity...........................................10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Badra Expires September 29, 2008 [Page 2]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+1. Introduction
+
+ This document describes the use of AES [AES] in Galois Counter Mode
+ (GCM) [GCM] (AES-GCM) with various pre-shared key (PSK) key exchange
+ mechanisms ([RFC4279] and [RFC4785]) as a ciphersuite for Transport
+ Layer Security (TLS). AES-GCM is not only efficient and secure, but
+ hardware implementations can achieve high speeds with low cost and
+ low latency, because the mode can be pipelined.
+
+ This document also specifies PSK cipher suites for TLS which replace
+ SHA-256 and SHA-384 rather than SHA-1. RFC 4279 [RFC4279] and RFC
+ 4785 [RFC4785] describe pre-shared key (PSK) cipher suites for TLS.
+ However, all of the RFC 4279 and the RFC 4785 suites use HMAC-SHA1
+ as their MAC algorithm. Due to recent analytic work on SHA-1
+ [Wang05], the IETF is gradually moving away from SHA-1 and towards
+ stronger hash algorithms.
+
+ [I-D.ietf-tls-ecc-new-mac] and [I-D.ietf-tls-rsa-aes-gcm] provide
+ support for GCM with other key establishment methods.
+
+1.1. Conventions used in this document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+2. PSK, DHE_PSK and RSA_PSK Key Exchange Algorithms with AES-GCM
+
+ The following eight cipher suites use the new authenticated
+ encryption modes defined in TLS 1.2 with AES in Galois Counter Mode
+ (GCM) [GCM]:
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_258_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+
+ These cipher suites use authenticated encryption with additional
+ data algorithms AEAD_AES_128_GCM and AEAD_AES_256_GCM described in
+ RFC 5116. The "nonce" input to the AEAD algorithm SHALL be 12 bytes
+ long, and is "partially implicit" (see Section 3.2.1 of RFC 5116).
+ Part of the nonce is generated as part of the handshake process and
+ is static for the entire session and part is carried in each packet.
+
+
+Badra Expires September 29, 2008 [Page 3]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ struct {
+ opaque salt[4];
+ opaque explicit_nonce_part[8];
+ } GCMNonce.
+
+ The salt value is either the client_write_IV if the client is
+ sending or the server_write_IV if the server is sending. These IVs
+ SHALL be 4 bytes long. Therefore, for all the algorithms defined in
+ this section, SecurityParameters.fixed_iv_length=4.
+
+ The explicit_nonce_part is chosen by the sender and included in the
+ packet. Each value of the explicit_nonce_part MUST be distinct from
+ all other values, for any fixed key. Failure to meet this
+ uniqueness requirement can significantly degrade security. The
+ explicit_nonce_part is carried in the IV field of the
+ GenericAEADCipher structure. Therefore, for all the algorithms
+ defined in this section, SecurityParameters.record_iv_length=8.
+
+ In the case of TLS the counter MAY be the 64-bit sequence number.
+ In the case of Datagram TLS [RFC4347] the counter MAY be formed from
+ the concatenation of the 16-bit epoch with the 48-bit sequence
+ number.
+
+ The PRF algorithms SHALL be as follows:
+
+ For ciphersuites ending in _SHA256 the hash function is SHA256.
+
+ For ciphersuites ending in _SHA384 the hash function is SHA384.
+
+3. PSK, DHE_PSK and RSA_PSK Key Exchange with SHA-256/384
+
+ The cipher suites described in this section use AES [AES] in CBC
+ [CBC] mode with an HMAC-based MAC.
+
+3.1. PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+
+ The above six cipher suites are the same as the corresponding cipher
+ suites in RFC 4279 and RFC 4785 (TLS_PSK_WITH_AES_128_CBC_SHA,
+ TLS_PSK_WITH_AES_256_CBC_SHA, and TLS_PSK_WITH_NULL_SHA) except for
+
+
+
+Badra Expires September 29, 2008 [Page 4]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ the hash and PRF algorithms, which are SHA-256 and SHA-384 [SHS] as
+ follows.
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_PSK_WITH_NULL_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_NULL_SHA384 HMAC-SHA-384 P_SHA-384
+
+3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+
+ The above six cipher suites are the same as the corresponding cipher
+ suites in RFC 4279 and RFC 4785 (TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA, and TLS_DHE_PSK_WITH_NULL_SHA)
+ except for the hash and PRF algorithms, which are SHA-256 and SHA-
+ 384 [SHS] as follows.
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+
+3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+
+ The above four cipher suites are the same as the corresponding
+ cipher suites in RFC 4279 and RFC 4785
+ (TLS_RSA_PSK_WITH_AES_128_CBC_SHA, TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
+ and TLS_RSA_PSK_WITH_NULL_SHA) except for the hash and PRF
+ algorithms, which are SHA-256 and SHA-384 [SHS] as follows.
+
+
+
+Badra Expires September 29, 2008 [Page 5]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+
+4. TLS Versions
+
+ Because these cipher suites depend on features available only in TLS
+ 1.2 (PRF flexibility and combined authenticated encryption cipher
+ modes), they MUST NOT be negotiated by older versions of TLS.
+ Clients MUST NOT offer these cipher suites if they do not offer TLS
+ 1.2 or later. Servers which select an earlier version of TLS MUST
+ NOT select one of these cipher suites. Because TLS has no way for
+ the client to indicate that it supports TLS 1.2 but not earlier, a
+ non-compliant server might potentially negotiate TLS 1.1 or earlier
+ and select one of the cipher suites in this document. Clients MUST
+ check the TLS version and generate a fatal "illegal_parameter" alert
+ if they detect an incorrect version.
+
+5. Security Considerations
+
+ The security considerations in [I-D.ietf-tls-rfc4346-bis], RFC 4279
+ and RFC 4785 apply to this document as well. The remainder of this
+ section describes security considerations specific to the cipher
+ suites described in this document.
+
+5.1. Counter Reuse with GCM
+
+ AES-GCM is only secure if the counter is never reused. The IV
+ construction algorithm above is designed to ensure that this cannot
+ happen.
+
+5.2. Recommendations for Multiple Encryption Processors
+
+ If multiple cryptographic processors are in use by the sender, then
+ the sender MUST ensure that, for a particular key, each value of the
+ explicit_nonce_part used with that key is distinct. In this case
+ each encryption processor SHOULD include in the explicit_nonce_part
+ a fixed value that is distinct for each processor. The recommended
+ format is
+
+ explicit_nonce_part = FixedDistinct || Variable
+
+ where the FixedDistinct field is distinct for each encryption
+ processor, but is fixed for a given processor, and the Variable
+
+
+Badra Expires September 29, 2008 [Page 6]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ field is distinct for each distinct nonce used by a particular
+ encryption processor. When this method is used, the FixedDistinct
+ fields used by the different processors MUST have the same length.
+
+ In the terms of Figure 2 in [RFC5116], the Salt is the Fixed-Common
+ part of the nonce (it is fixed, and it is common across all
+ encryption processors), the FixedDistinct field exactly corresponds
+ to the Fixed-Distinct field, and the Variable field corresponds to
+ the Counter field, and the explicit part exactly corresponds to the
+
+ explicit_nonce_part.
+
+ For clarity, we provide an example for TLS in which there are two
+ distinct encryption processors, each of which uses a one-byte
+ FixedDistinct field:
+
+ Salt = eedc68dc
+ FixedDistinct = 01 (for the first encryption processor)
+ FixedDistinct = 02 (for the second encryption processor)
+
+ The GCMnonces generated by the first encryption processor, and their
+ corresponding explicit_nonce_parts, are:
+
+ GCMNonce explicit_nonce_part
+ ------------------------ --------------------
+ eedc68dc0100000000000000 0100000000000000
+ eedc68dc0100000000000001 0100000000000001
+ eedc68dc0100000000000002 0100000000000002
+ ...
+
+ The GCMnonces generated by the second encryption processor, and
+ their corresponding explicit_nonce_parts, are
+
+ GCMNonce explicit_nonce_part
+ ------------------------ --------------------
+ eedc68dc0200000000000000 0200000000000000
+ eedc68dc0200000000000001 0200000000000001
+ eedc68dc0200000000000002 0200000000000002
+ ...
+
+6. IANA Considerations
+
+ IANA has assigned the following values for the cipher suites defined
+ in this document:
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_258_GCM_SHA256 = {0xXX,0xXX};
+
+
+Badra Expires September 29, 2008 [Page 7]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+
+7. Acknowledgments
+
+ This draft borrows heavily from [I-D.ietf-tls-ecc-new-mac] and [I-
+ D.ietf-tls-rsa-aes-gcm].
+
+8. References
+
+8.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [I-D.ietf-tls-rfc4346-bis]
+ Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.2", draft-ietf-tls-rfc4346-bis-
+ 10, work in progress, March 2008.
+
+ [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
+ Encryption", RFC 5116, January 2008.
+
+ [RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites
+ for Transport Layer Security (TLS)", RFC 4279, December
+ 2005.
+
+
+
+Badra Expires September 29, 2008 [Page 8]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+ [RFC4785] Blumenthal, U., Goel, P., "Pre-Shared Key (PSK)
+ Ciphersuites with NULL Encryption for Transport Layer
+ Security (TLS)", RFC 4785, January 2007.
+
+ [AES] National Institute of Standards and Technology,
+ "Specification for the Advanced Encryption Standard
+ (AES)", FIPS 197, November 2001.
+
+ [SHS] National Institute of Standards and Technology, "Secure
+ Hash Standard", FIPS 180-2, August 2002.
+
+ [CBC] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation -
+ Methods and Techniques", SP 800-38A, December 2001.
+
+ [GCM] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation:
+ Galois;/Counter Mode (GCM) for Confidentiality and
+ Authentication", SP 800-38D, November 2007.
+
+8.2. Informative References
+
+ [Wang05] Wang, X., Yin, Y., and H. Yu, "Finding Collisions in the
+ Full SHA-1", CRYPTO 2005, August 2005.
+
+ [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
+ Security", RFC 4347, April 2006.
+
+ [I-D.ietf-tls-ecc-new-mac]
+ Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
+ 256/384 and AES Galois Counter Mode", draft-ietf-tls-ecc-
+ new-mac-04 (work in progress), February 2008.
+
+ [I-D.ietf-tls-rsa-aes-gcm]
+ Salowey, J., A. Choudhury, and C. McGrew, "RSA based AES-
+ GCM Cipher Suites for TLS", draft-ietf-tls-rsa-aes-gcm-02
+ (work in progress), February 2008.
+
+Author's Addresses
+
+ Mohamad Badra
+ LIMOS Laboratory - UMR6158, CNRS
+ France
+
+ Email: badra@isima.fr
+
+
+
+
+Badra Expires September 29, 2008 [Page 9]
+
+Internet-Draft ECDHE_PSK Cipher Suites for TLS March 2008
+
+
+Intellectual Property Statement
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed
+ to pertain to the implementation or use of the technology described
+ in this document or the extent to which any license under such
+ rights might or might not be available; nor does it represent that
+ it has made any independent effort to identify any such rights.
+ Information on the procedures with respect to rights in RFC
+ documents can be found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use
+ of such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository
+ at http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+Disclaimer of Validity
+
+ This document and the information contained herein are provided on
+ an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
+ REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE
+ IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+ WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE
+ ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR A PARTICULAR PURPOSE.
+
+Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+Acknowledgment
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+Badra Expires September 29, 2008 [Page 10]
+
diff --git a/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-01.txt b/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-01.txt
new file mode 100644
index 0000000000..d97fe10b77
--- /dev/null
+++ b/doc/protocol/draft-badra-tls-psk-new-mac-aes-gcm-01.txt
@@ -0,0 +1,539 @@
+TLS Working Group Mohamad Badra
+Internet Draft LIMOS Laboratory
+Intended status: Standards Track March 29, 2008
+Expires: September 2008
+
+
+
+ Pre-Shared Key Cipher Suites for Transport Layer Security
+ with SHA-256/384 and AES Galois Counter Mode
+ draft-badra-tls-psk-new-mac-aes-gcm-01.txt
+
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six
+ months and may be updated, replaced, or obsoleted by other documents
+ at any time. It is inappropriate to use Internet-Drafts as
+ reference material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html
+
+ This Internet-Draft will expire on September 29, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ RFC 4279 and RFC 4785 describe pre-shared key cipher suites for
+ Transport Layer Security (TLS). However, all those cipher suites
+ use SHA-1 as their MAC algorithm. This document describes a set of
+ cipher suites for TLS/DTLS which uses stronger digest algorithms
+
+
+
+
+Badra Expires September 29, 2008 [Page 1]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ (i.e. SHA-256 or SHA-384) and another which uses AES in Galois
+ Counter Mode (GCM).
+
+Table of Contents
+
+
+ 1. Introduction...................................................3
+ 1.1. Conventions used in this document.........................3
+ 2. PSK, DHE_PSK and RSA_PSK Key Exchange Algorithms with AES-GCM..3
+ 3. PSK, DHE_PSK and RSA_PSK Key Exchange with SHA-256/384.........4
+ 3.1. PSK Key Exchange Algorithm with SHA-256/384...............4
+ 3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384...........5
+ 3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384...........5
+ 4. TLS Versions...................................................6
+ 5. Security Considerations........................................6
+ 5.1. Counter Reuse with GCM....................................6
+ 5.2. Recommendations for Multiple Encryption Processors........6
+ 6. IANA Considerations............................................7
+ 7. Acknowledgments................................................8
+ 8. References.....................................................8
+ 8.1. Normative References......................................8
+ 8.2. Informative References....................................9
+ Author's Addresses................................................9
+ Intellectual Property Statement..................................10
+ Disclaimer of Validity...........................................10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Badra Expires September 29, 2008 [Page 2]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+1. Introduction
+
+ This document describes the use of AES [AES] in Galois Counter Mode
+ (GCM) [GCM] (AES-GCM) with various pre-shared key (PSK) key exchange
+ mechanisms ([RFC4279] and [RFC4785]) as a ciphersuite for Transport
+ Layer Security (TLS). AES-GCM is not only efficient and secure, but
+ hardware implementations can achieve high speeds with low cost and
+ low latency, because the mode can be pipelined.
+
+ This document also specifies PSK cipher suites for TLS which replace
+ SHA-256 and SHA-384 rather than SHA-1. RFC 4279 [RFC4279] and RFC
+ 4785 [RFC4785] describe pre-shared key (PSK) cipher suites for TLS.
+ However, all of the RFC 4279 and the RFC 4785 suites use HMAC-SHA1
+ as their MAC algorithm. Due to recent analytic work on SHA-1
+ [Wang05], the IETF is gradually moving away from SHA-1 and towards
+ stronger hash algorithms.
+
+ [I-D.ietf-tls-ecc-new-mac] and [I-D.ietf-tls-rsa-aes-gcm] provide
+ support for GCM with other key establishment methods.
+
+1.1. Conventions used in this document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+2. PSK, DHE_PSK and RSA_PSK Key Exchange Algorithms with AES-GCM
+
+ The following eight cipher suites use the new authenticated
+ encryption modes defined in TLS 1.2 with AES in Galois Counter Mode
+ (GCM) [GCM]:
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_258_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+
+ These cipher suites use authenticated encryption with additional
+ data algorithms AEAD_AES_128_GCM and AEAD_AES_256_GCM described in
+ RFC 5116. The "nonce" input to the AEAD algorithm SHALL be 12 bytes
+ long, and is "partially implicit" (see Section 3.2.1 of RFC 5116).
+ Part of the nonce is generated as part of the handshake process and
+ is static for the entire session and part is carried in each packet.
+
+
+Badra Expires September 29, 2008 [Page 3]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ struct {
+ opaque salt[4];
+ opaque explicit_nonce_part[8];
+ } GCMNonce.
+
+ The salt value is either the client_write_IV if the client is
+ sending or the server_write_IV if the server is sending. These IVs
+ SHALL be 4 bytes long. Therefore, for all the algorithms defined in
+ this section, SecurityParameters.fixed_iv_length=4.
+
+ The explicit_nonce_part is chosen by the sender and included in the
+ packet. Each value of the explicit_nonce_part MUST be distinct from
+ all other values, for any fixed key. Failure to meet this
+ uniqueness requirement can significantly degrade security. The
+ explicit_nonce_part is carried in the IV field of the
+ GenericAEADCipher structure. Therefore, for all the algorithms
+ defined in this section, SecurityParameters.record_iv_length=8.
+
+ In the case of TLS the counter MAY be the 64-bit sequence number.
+ In the case of Datagram TLS [RFC4347] the counter MAY be formed from
+ the concatenation of the 16-bit epoch with the 48-bit sequence
+ number.
+
+ The PRF algorithms SHALL be as follows:
+
+ For ciphersuites ending in _SHA256 the hash function is SHA256.
+
+ For ciphersuites ending in _SHA384 the hash function is SHA384.
+
+3. PSK, DHE_PSK and RSA_PSK Key Exchange with SHA-256/384
+
+ The cipher suites described in this section use AES [AES] in CBC
+ [CBC] mode with an HMAC-based MAC.
+
+3.1. PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+
+ The above six cipher suites are the same as the corresponding cipher
+ suites in RFC 4279 and RFC 4785 (TLS_PSK_WITH_AES_128_CBC_SHA,
+ TLS_PSK_WITH_AES_256_CBC_SHA, and TLS_PSK_WITH_NULL_SHA) except for
+
+
+
+Badra Expires September 29, 2008 [Page 4]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ the hash and PRF algorithms, which are SHA-256 and SHA-384 [SHS] as
+ follows.
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_PSK_WITH_NULL_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_PSK_WITH_NULL_SHA384 HMAC-SHA-384 P_SHA-384
+
+3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+
+ The above six cipher suites are the same as the corresponding cipher
+ suites in RFC 4279 and RFC 4785 (TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA, and TLS_DHE_PSK_WITH_NULL_SHA)
+ except for the hash and PRF algorithms, which are SHA-256 and SHA-
+ 384 [SHS] as follows.
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+
+3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384
+
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+
+ The above four cipher suites are the same as the corresponding
+ cipher suites in RFC 4279 and RFC 4785
+ (TLS_RSA_PSK_WITH_AES_128_CBC_SHA, TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
+ and TLS_RSA_PSK_WITH_NULL_SHA) except for the hash and PRF
+ algorithms, which are SHA-256 and SHA-384 [SHS] as follows.
+
+
+
+Badra Expires September 29, 2008 [Page 5]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+ TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 HMAC-SHA-256 P_SHA-256
+ TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA-384
+
+4. TLS Versions
+
+ Because these cipher suites depend on features available only in TLS
+ 1.2 (PRF flexibility and combined authenticated encryption cipher
+ modes), they MUST NOT be negotiated by older versions of TLS.
+ Clients MUST NOT offer these cipher suites if they do not offer TLS
+ 1.2 or later. Servers which select an earlier version of TLS MUST
+ NOT select one of these cipher suites. Because TLS has no way for
+ the client to indicate that it supports TLS 1.2 but not earlier, a
+ non-compliant server might potentially negotiate TLS 1.1 or earlier
+ and select one of the cipher suites in this document. Clients MUST
+ check the TLS version and generate a fatal "illegal_parameter" alert
+ if they detect an incorrect version.
+
+5. Security Considerations
+
+ The security considerations in [I-D.ietf-tls-rfc4346-bis], RFC 4279
+ and RFC 4785 apply to this document as well. The remainder of this
+ section describes security considerations specific to the cipher
+ suites described in this document.
+
+5.1. Counter Reuse with GCM
+
+ AES-GCM is only secure if the counter is never reused. The IV
+ construction algorithm above is designed to ensure that this cannot
+ happen.
+
+5.2. Recommendations for Multiple Encryption Processors
+
+ If multiple cryptographic processors are in use by the sender, then
+ the sender MUST ensure that, for a particular key, each value of the
+ explicit_nonce_part used with that key is distinct. In this case
+ each encryption processor SHOULD include in the explicit_nonce_part
+ a fixed value that is distinct for each processor. The recommended
+ format is
+
+ explicit_nonce_part = FixedDistinct || Variable
+
+ where the FixedDistinct field is distinct for each encryption
+ processor, but is fixed for a given processor, and the Variable
+
+
+Badra Expires September 29, 2008 [Page 6]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ field is distinct for each distinct nonce used by a particular
+ encryption processor. When this method is used, the FixedDistinct
+ fields used by the different processors MUST have the same length.
+
+ In the terms of Figure 2 in [RFC5116], the Salt is the Fixed-Common
+ part of the nonce (it is fixed, and it is common across all
+ encryption processors), the FixedDistinct field exactly corresponds
+ to the Fixed-Distinct field, and the Variable field corresponds to
+ the Counter field, and the explicit part exactly corresponds to the
+
+ explicit_nonce_part.
+
+ For clarity, we provide an example for TLS in which there are two
+ distinct encryption processors, each of which uses a one-byte
+ FixedDistinct field:
+
+ Salt = eedc68dc
+ FixedDistinct = 01 (for the first encryption processor)
+ FixedDistinct = 02 (for the second encryption processor)
+
+ The GCMnonces generated by the first encryption processor, and their
+ corresponding explicit_nonce_parts, are:
+
+ GCMNonce explicit_nonce_part
+ ------------------------ --------------------
+ eedc68dc0100000000000000 0100000000000000
+ eedc68dc0100000000000001 0100000000000001
+ eedc68dc0100000000000002 0100000000000002
+ ...
+
+ The GCMnonces generated by the second encryption processor, and
+ their corresponding explicit_nonce_parts, are
+
+ GCMNonce explicit_nonce_part
+ ------------------------ --------------------
+ eedc68dc0200000000000000 0200000000000000
+ eedc68dc0200000000000001 0200000000000001
+ eedc68dc0200000000000002 0200000000000002
+ ...
+
+6. IANA Considerations
+
+ IANA has assigned the following values for the cipher suites defined
+ in this document:
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_258_GCM_SHA256 = {0xXX,0xXX};
+
+
+Badra Expires September 29, 2008 [Page 7]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA384 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA256 = {0xXX,0xXX};
+ CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0xXX,0xXX};
+
+7. Acknowledgments
+
+ This draft borrows heavily from [I-D.ietf-tls-ecc-new-mac] and [I-
+ D.ietf-tls-rsa-aes-gcm].
+
+8. References
+
+8.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [I-D.ietf-tls-rfc4346-bis]
+ Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.2", draft-ietf-tls-rfc4346-bis-
+ 10, work in progress, March 2008.
+
+ [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
+ Encryption", RFC 5116, January 2008.
+
+ [RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites
+ for Transport Layer Security (TLS)", RFC 4279, December
+ 2005.
+
+
+
+Badra Expires September 29, 2008 [Page 8]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+ [RFC4785] Blumenthal, U., Goel, P., "Pre-Shared Key (PSK)
+ Ciphersuites with NULL Encryption for Transport Layer
+ Security (TLS)", RFC 4785, January 2007.
+
+ [AES] National Institute of Standards and Technology,
+ "Specification for the Advanced Encryption Standard
+ (AES)", FIPS 197, November 2001.
+
+ [SHS] National Institute of Standards and Technology, "Secure
+ Hash Standard", FIPS 180-2, August 2002.
+
+ [CBC] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation -
+ Methods and Techniques", SP 800-38A, December 2001.
+
+ [GCM] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation:
+ Galois;/Counter Mode (GCM) for Confidentiality and
+ Authentication", SP 800-38D, November 2007.
+
+8.2. Informative References
+
+ [Wang05] Wang, X., Yin, Y., and H. Yu, "Finding Collisions in the
+ Full SHA-1", CRYPTO 2005, August 2005.
+
+ [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
+ Security", RFC 4347, April 2006.
+
+ [I-D.ietf-tls-ecc-new-mac]
+ Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
+ 256/384 and AES Galois Counter Mode", draft-ietf-tls-ecc-
+ new-mac-04 (work in progress), February 2008.
+
+ [I-D.ietf-tls-rsa-aes-gcm]
+ Salowey, J., A. Choudhury, and C. McGrew, "RSA based AES-
+ GCM Cipher Suites for TLS", draft-ietf-tls-rsa-aes-gcm-02
+ (work in progress), February 2008.
+
+Author's Addresses
+
+ Mohamad Badra
+ LIMOS Laboratory - UMR6158, CNRS
+ France
+
+ Email: badra@isima.fr
+
+
+
+
+Badra Expires September 29, 2008 [Page 9]
+
+Internet-Draft TLS PSK New MAC and AES-GCM March 2008
+
+
+Intellectual Property Statement
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed
+ to pertain to the implementation or use of the technology described
+ in this document or the extent to which any license under such
+ rights might or might not be available; nor does it represent that
+ it has made any independent effort to identify any such rights.
+ Information on the procedures with respect to rights in RFC
+ documents can be found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use
+ of such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository
+ at http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+Disclaimer of Validity
+
+ This document and the information contained herein are provided on
+ an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
+ REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE
+ IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+ WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE
+ ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR A PARTICULAR PURPOSE.
+
+Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+Acknowledgment
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+Badra Expires September 29, 2008 [Page 10]
+
diff --git a/doc/protocol/draft-ietf-netconf-tls-01.txt b/doc/protocol/draft-ietf-netconf-tls-01.txt
new file mode 100644
index 0000000000..70efb526ba
--- /dev/null
+++ b/doc/protocol/draft-ietf-netconf-tls-01.txt
@@ -0,0 +1,485 @@
+NETCONF Working Group Mohamad Badra
+Internet Draft LIMOS Laboratory
+Intended status: Standards Track February 15, 2008
+Expires: August 2008
+
+
+
+ NETCONF over Transport Layer Security (TLS)
+ draft-ietf-netconf-tls-01.txt
+
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html
+
+ This Internet-Draft will expire on August 15, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ The Network Configuration Protocol (NETCONF) provides mechanisms to
+ install, manipulate, and delete the configuration of network devices.
+ This document describes how to use the Transport Layer Protocol (TLS)
+ to secure NETCONF exchanges.
+
+
+
+
+
+Badra Expires August 15, 2008 [Page 1]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+Table of Contents
+
+
+ 1. Introduction...................................................2
+ 1.1. Conventions used in this document.........................2
+ 2. NETCONF over TLS...............................................3
+ 2.1. Connection Initiation.....................................3
+ 2.2. Connection Closure........................................3
+ 3. Endpoint Authentication and Identification.....................4
+ 3.1. Server Identity...........................................4
+ 3.2. Client Identity...........................................5
+ 3.3. Password-Based Authentication.............................5
+ 4. Cipher Suite Requirements......................................7
+ 5. Security Considerations........................................7
+ 6. IANA Considerations............................................7
+ 7. Acknowledgments................................................7
+ 8. References.....................................................7
+ 8.1. Normative References......................................7
+ Author's Addresses................................................8
+ Intellectual Property Statement...................................8
+ Disclaimer of Validity............................................9
+
+1. Introduction
+
+ The NETCONF protocol [RFC4741] defines a simple mechanism through
+ which a network device can be managed. NETCONF is connection-
+ oriented, requiring a persistent connection between peers. This
+ connection must provide reliable, sequenced data delivery, integrity
+ and confidentiality and peers authentication. This document
+ describes how to use TLS [RFC4346] to secure NETCONF connections.
+
+ Throughout this document, the terms "client" and "server" are used to
+ refer to the two ends of the TLS connection. The client actively
+ opens the TLS connection, and the server passively listens for the
+ incoming TLS connection. The terms "manager" and "agent" are used to
+ refer to the two ends of the NETCONF protocol session. The manager
+ issues NETCONF remote procedure call (RPC) commands, and the agent
+ replies to those commands. When NETCONF is run over TLS using the
+ mapping defined in this document, the client is always the manager,
+ and the server is always the agent.
+
+1.1. Conventions used in this document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in RFC-2119 [RFC2119].
+
+
+
+Badra Expires August 15, 2008 [Page 2]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+2. NETCONF over TLS
+
+ Since TLS is application protocol-independent, NETCONF can operate on
+ top of the TLS protocol transparently. This document defines how
+ NETCONF can be used within a Transport Layer Security (TLS) session.
+
+2.1. Connection Initiation
+
+ The peer acting as the NETCONF manager MUST also act as the TLS
+ client. It MUST connect to the server that passively listens for the
+ incoming TLS connection on the IANA-to-be-assigned TCP port <TBA>.
+ It MUST therefore send the TLS ClientHello to begin the TLS
+ handshake. Once the TLS handshake has been finished, the client and
+ the server MAY then send their NETCONF exchanges. In particular, the
+ client will send complete XML documents to the server containing
+ <rpc> elements, and the server will respond with complete XML
+ documents containing <rpc-reply> elements. The client MAY indicate
+ interest in receiving event notifications from a NETCONF server by
+ creating a subscription to receive event notifications [NETNOT], in
+ which the NETCONF server replies to indicate whether the subscription
+ request was successful and, if it was successful, begins sending the
+ event notifications to the NETCONF client as the events occur within
+ the system. All these elements are encapsulated into TLS records of
+ type "application data". These records are protected using the TLS
+ material keys.
+
+ Current NETCONF messages don't include a message's length. This
+ document uses consequently the same delimiter sequence defined in
+ [RFC4742] and therefore the special character sequence, ]]>]]>, to
+ delimit XML documents.
+
+2.2. Connection Closure
+
+ Either NETCONF peer MAY stop the NETCONF connection at any time and
+ therefore notify the other NETCONF peer that no more data on this
+ channel will be sent and that any data received after a closure
+ request will be ignored. This MAY happen when no data is received
+ from a connection for a long time, where the application decides what
+ "long" means.
+
+ TLS has the ability for secure connection closure using the Alert
+ protocol. When the NETCONF peer processes a closure request of the
+ NETCONF connection, it MUST send a TLS close_notify alert before
+ closing the connection. Any data received after a closure alert is
+ ignored.
+
+
+
+
+Badra Expires August 15, 2008 [Page 3]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+ Unless some other fatal alert has been transmitted, each party is
+ required to send a close_notify alert before closing the write side
+ of the connection. The other party MUST respond with a close_notify
+ alert of its own and close down the connection immediately,
+ discarding any pending writes. It is not required for the initiator
+ of the close to wait for the responding close_notify alert before
+ closing the read side of the connection.
+
+3. Endpoint Authentication and Identification
+
+ NETCONF requires that its transport provide mutual authentication of
+ client and server, so cipher suites that are anonymous or which only
+ authenticate the server to the client MUST NOT be used with NETCONF.
+ This document specifies how to use TLS with endpoint authentication
+ in TLS can be based on either preshared keys [RFC4279] or public key
+ certificates [RFC4346]. Some cipher suites (e.g.
+ TLS_RSA_PSK_WITH_AES_128_CBC_SHA) use both. Section 3.1 describes
+ how the client authenticates the server if public key certificates
+ are provided by the server, section 3.2 describes how the server
+ authenticates the client if public key certificates are provided by
+ the client, and section 3.3 describes how the client and server
+ mutually authenticate one another using a password.
+
+3.1. Server Identity
+
+ During the TLS negotiation, the client MUST carefully examine the
+ certificate presented by the server to determine if it meets their
+ expectations. Particularly, the client MUST check its understanding
+ of the server hostname against the server's identity as presented in
+ the server Certificate message, in order to prevent man-in-the-middle
+ attacks.
+
+ Matching is performed according to these rules [RFC4642]:
+
+ - The client MUST use the server hostname it used to open the
+ connection (or the hostname specified in TLS "server_name"
+ extension [RFC4366]) as the value to compare against the server
+ name as expressed in the server certificate. The client MUST
+ NOT use any form of the server hostname derived from an
+ insecure remote source (e.g., insecure DNS lookup). CNAME
+ canonicalization is not done.
+
+ - If a subjectAltName extension of type dNSName is present in the
+ certificate, it MUST be used as the source of the server's
+ identity.
+
+ - Matching is case-insensitive.
+
+
+Badra Expires August 15, 2008 [Page 4]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+ - A "*" wildcard character MAY be used as the left-most name
+ component in the certificate. For example, *.example.com would
+ match a.example.com, foo.example.com, etc., but would not match
+ example.com.
+
+ - If the certificate contains multiple names (e.g., more than one
+ dNSName field), then a match with any one of the fields is
+ considered acceptable.
+
+ If the match fails, the client MUST either ask for explicit user
+ confirmation or terminate the connection and indicate the server's
+ identity is suspect.
+
+ Additionally, clients MUST verify the binding between the identity of
+ the servers to which they connect and the public keys presented by
+ those servers. Clients SHOULD implement the algorithm in Section 6
+ of [RFC3280] for general certificate validation, but MAY supplement
+ that algorithm with other validation methods that achieve equivalent
+ levels of verification (such as comparing the server certificate
+ against a local store of already-verified certificates and identity
+ bindings).
+
+ If the client has external information as to the expected identity of
+ the server, the hostname check MAY be omitted.
+
+3.2. Client Identity
+
+ Typically, the server has no external knowledge of what the client's
+ identity ought to be and so checks (other than that the client has a
+ certificate chain rooted in an appropriate CA) are not possible. If
+ a server has such knowledge (typically from some source external to
+ NETCONF or TLS) it MUST check the identity as described above.
+
+3.3. Password-Based Authentication
+
+ [RFC4279] supports authentication based on pre-shared keys (PSKs).
+ These pre-shared keys are symmetric keys, shared in advance among the
+ communicating parties.
+
+ The PSK can be generated in many ways and its length is variable.
+ Implementation of this document MAY rely on [RFC4279] to enable
+ password based user authentication. In this case, the password is
+ used to generate the PSK. It is RECOMMENDED that implementations
+ that allow the administrator to manually configure the password also
+ provide functionality for generating a new random password, taking
+ [RFC4086] into account.
+
+
+
+Badra Expires August 15, 2008 [Page 5]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+ This document generates the PSK from the password as follow:
+
+ PSK = SHA-1(SHA-1(password + psk_identity + "Key Pad for Netconf") +
+ psk_identity_hint)
+
+ Where + means concatenation.
+
+ The label "Key Pad for Netconf" is an ASCII string.
+
+ The psk_identity_hint is initially defined in section 5.1 of
+ [RFC4279]. The psk_identity_hint can do double duty and also provide
+ a form of server authentication in the case where the user has the
+ same password on a number of NETCONF servers. If a hint is provided,
+ the psk_identity_hint is encoded in the same way as in [RFC4279] and
+ should be a string representation of the name of the server
+ recognizable to the administrator or his software. In the case where
+ the user types a server name to connect to, it should be that string.
+ If the string the user enters differs from the one returned as
+ psk_identity_hint, the software could display the server's name and
+ ask the user to confirm. For automated scripts, the names could be
+ expected to match. It is highly recommended that implementations set
+ the psk_identity_hint to the DNS name of the NETCONF server (i.e.,
+ the TLS server).
+
+ It is RECOMMENDED that users choose different passwords for the
+ different servers they manage.
+
+ Note 1: The NETCONF over TLS implementation need not store the
+ password in clear text, but rather can store the value of SHA-
+ 1(SHA-1(password + psk_identity + "Key Pad for Netconf") +
+ psk_identity_hint), which could not be used as a password
+ equivalent for applications other than NETCONF. Deriving the PSK
+ from a password is not secure. This construction is used because
+ it is anticipated that people will do it anyway.
+
+ Note 2: [RFC4279] defines some conformance requirements for the
+ PSK, for the PSK identity encoding and for the identity hint. The
+ same requirements apply here as well; in particular on the
+ password. Moreover, the management interface by which the
+ password is provided MUST accept ASCII strings of at least 64
+ octets and MUST NOT add a null terminator before using them as
+ shared secrets. It MUST also accept a HEX encoding of the
+ password. The management interface MAY accept other encodings if
+ the algorithm for translating the encoding to a binary string is
+ specified.
+
+
+
+
+Badra Expires August 15, 2008 [Page 6]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+4. Cipher Suite Requirements
+
+ A compliant implementation of the protocol specified in this document
+ MUST implement the cipher suite TLS_DHE_PSK_WITH_AES_128_CBC_SHA and
+ MAY implement any TLS cipher suite that provides mutual
+ authentication.
+
+5. Security Considerations
+
+ The security considerations described throughout [RFC4346] and
+ [RFC4279] apply here as well.
+
+ As with all schemes involving shared keys and passwords, special care
+ should be taken to protect the shared values and passwords as well as
+ to limit their exposure over time. Alternatively, using certificates
+ would provide better protection.
+
+6. IANA Considerations
+
+ IANA is requested to assign a TCP port number that will be the
+ default port for NETCONF over TLS sessions as defined in this
+ document.
+
+ IANA has assigned port <TBA> for this purpose.
+
+7. Acknowledgments
+
+ A significant amount of the text in this document was lifted from
+ [RFC4642].
+
+ The author would like to acknowledge David Harrington, Miao Fuyou,
+ Eric Rescorla, Juergen Schoenwaelder and the NETCONF mailing list
+ members for their comments on the document. The author appreciates
+ also Bert Wijnen and Dan Romascanu for their efforts on issues
+ resolving discussion, and Charlie Kaufman for the thorough review of
+ this document and for the helpful comments on the password-based
+ authentication.
+
+8. References
+
+8.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+
+
+
+
+Badra Expires August 15, 2008 [Page 7]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+ [RFC3280] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet
+ X.509 Public Key Infrastructure Certificate and Certificate
+ Revocation List (CRL) Profile", RFC 3280, April 2002.
+
+ [RFC4086] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
+ "Randomness Requirements for Security", BCP 106, RFC 4086,
+ June 2005.
+
+ [RFC4279] Eronen, P. and H. Tschofenig., "Pre-Shared Key Ciphersuites
+ for Transport Layer Security (TLS)", RFC 4279, December
+ 2005.
+
+ [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol 1.1", RFC 4346, April 2006.
+
+ [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
+ and T. Wright, "Transport Layer Security (TLS) Extensions",
+ RFC 4366, April 2006.
+
+ [RFC4642] Murchison, K., Vinocur, J., Newman, C., "Using Transport
+ Layer Security (TLS) with Network News Transfer Protocol
+ (NNTP)", RFC 4642, October 2006
+
+ [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741,
+ December 2006.
+
+ [RFC4742] Wasserman, M. and T. Goddard, "Using the NETCONF
+ Configuration Protocol over Secure Shell (SSH)", RFC 4742,
+ December 2006.
+
+ [NETNOT] Chisholm, S. and H. Trevino, "NETCONF Event Notifications",
+ draft-ietf-netconf-notification-11.txt, (work in progress),
+ November 2007.
+
+Author's Addresses
+
+ Mohamad Badra
+ LIMOS Laboratory - UMR6158, CNRS
+ France
+
+ Email: badra@isima.fr
+
+
+Intellectual Property Statement
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+
+
+Badra Expires August 15, 2008 [Page 8]
+
+Internet-Draft NETCONF over TLS February 2008
+
+
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+Disclaimer of Validity
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+Acknowledgment
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+
+
+
+
+
+Badra Expires August 15, 2008 [Page 9]
+
diff --git a/doc/protocol/draft-ietf-tls-ecc-new-mac-05.txt b/doc/protocol/draft-ietf-tls-ecc-new-mac-05.txt
new file mode 100644
index 0000000000..ec549cf758
--- /dev/null
+++ b/doc/protocol/draft-ietf-tls-ecc-new-mac-05.txt
@@ -0,0 +1,448 @@
+
+
+
+Network Working Group E. Rescorla
+Internet-Draft RTFM, Inc.
+Intended status: Informational April 14, 2008
+Expires: October 16, 2008
+
+
+TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter
+ Mode
+ draft-ietf-tls-ecc-new-mac-05.txt
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+ This Internet-Draft will expire on October 16, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ RFC 4492 describes elliptic curve cipher suites for Transport Layer
+ Security (TLS). However, all those cipher suites use SHA-1 as their
+ MAC algorithm. This document describes sixteen new CipherSuites for
+ TLS/DTLS which specify stronger digest algorithms. Eight use HMAC
+ with SHA-256 or SHA-384 and eight use AES in Galois Counter Mode
+ (GCM).
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 1]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
+ 1.1. Conventions Used In This Document . . . . . . . . . . . . . 3
+ 2. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . . 3
+ 2.1. HMAC-based Cipher Suites . . . . . . . . . . . . . . . . . 3
+ 2.2. Galois Counter Mode-based Cipher Suites . . . . . . . . . . 4
+ 3. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
+ 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
+ 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5
+ 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5
+ 6.1. Normative References . . . . . . . . . . . . . . . . . . . 5
+ 6.2. Informative References . . . . . . . . . . . . . . . . . . 6
+ Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 6
+ Intellectual Property and Copyright Statements . . . . . . . . . . 8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 2]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+1. Introduction
+
+ RFC 4492 [RFC4492] describes Elliptic Curve Cryptography (ECC) cipher
+ suites for Transport Layer Security (TLS). However, all of the RFC
+ 4492 suites use HMAC-SHA1 as their MAC algorithm. Due to recent
+ analytic work on SHA-1 [Wang05], the IETF is gradually moving away
+ from SHA-1 and towards stronger hash algorithms. This document
+ specifies TLS ECC cipher suites which use SHA-256 and SHA-384 rather
+ than SHA-1.
+
+ TLS 1.2 [I-D.ietf-tls-rfc4346-bis], adds support for authenticated
+ encryption with additional data (AEAD) cipher modes [RFC5116]. This
+ document also specifies a set of ECC cipher suites using one such
+ mode, Galois Counter Mode (GCM) [GCM]. Another document
+ [I-D.ietf-tls-rsa-aes-gcm], provides support for GCM with other key
+ establishment methods.
+
+1.1. Conventions Used In This Document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+
+2. Cipher Suites
+
+ This document defines 8 new cipher suites to be added to TLS. All
+ use Elliptic Curve Cryptography for key exchange and digital
+ signature, as defined in RFC 4492.
+
+2.1. HMAC-based Cipher Suites
+
+ The first eight cipher suites use AES [AES] in CBC [CBC] mode with an
+ HMAC-based MAC:
+
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+
+ These eight cipher suites are the same as the corresponding cipher
+ suites in RFC 4492 (TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
+
+
+
+Rescorla Expires October 16, 2008 [Page 3]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, and
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA) except for the hash and PRF
+ algorithms, which are SHA-256 and SHA-384 [SHS] as follows.
+
+ Cipher Suite MAC PRF
+ ------------ --- ---
+ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA256
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA384
+ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA256
+ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA384
+ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA256
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA384
+ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 HMAC-SHA-256 P_SHA256
+ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 HMAC-SHA-384 P_SHA384
+
+2.2. Galois Counter Mode-based Cipher Suites
+
+ The second eight cipher suites use the same asymmetric algorithms as
+ those in the previous section but use the new authenticated
+ encryption modes defined in TLS 1.2 with AES in Galois Counter Mode
+ (GCM) [GCM]:
+
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+
+ These cipher suites use authenticated encryption with additional data
+ algorithms AEAD_AES_128_GCM and AEAD_AES_256_GCM described in
+ [RFC5116]. GCM is used as described in [I-D.ietf-tls-rsa-aes-gcm].
+
+
+ Cipher Suite PRF
+ ------------ ---
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 P_SHA256
+ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 P_SHA384
+ TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 P_SHA256
+ TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 P_SHA384
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 P_SHA256
+ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 P_SHA384
+ TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 P_SHA256
+
+
+
+Rescorla Expires October 16, 2008 [Page 4]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+ TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 P_SHA384
+
+
+3. Security Considerations
+
+ The security considerations in RFC 4346, RFC 4492, and
+ [I-D.ietf-tls-rsa-aes-gcm] apply to this document as well. In
+ addition, as described in [I-D.ietf-tls-rsa-aes-gcm], these cipher
+ suites may only be used with TLS 1.2 or greater.
+
+
+4. IANA Considerations
+
+ IANA has assigned the following values for these cipher suites:
+
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = {0xXX,XX};
+ CipherSuite TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = {0xXX,XX};
+
+
+5. Acknowledgements
+
+ This work was supported by the US Department of Defense.
+
+ David McGrew contributed substantual sections of the GCM nonce text
+ as well as providing a review of this document.
+
+
+6. References
+
+6.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 5]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+ [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B.
+ Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites
+ for Transport Layer Security (TLS)", RFC 4492, May 2006.
+
+ [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
+ Encryption", RFC 5116, January 2008.
+
+ [I-D.ietf-tls-rfc4346-bis]
+ Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.2", draft-ietf-tls-rfc4346-bis-10
+ (work in progress), March 2008.
+
+ [AES] National Institute of Standards and Technology,
+ "Specification for the Advanced Encryption Standard
+ (AES)", FIPS 197, November 2001.
+
+ [SHS] National Institute of Standards and Technology, "Secure
+ Hash Standard", FIPS 180-2, August 2002.
+
+ [CBC] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation -
+ Methods and Techniques", SP 800-38A, December 2001.
+
+ [GCM] National Institute of Standards and Technology,
+ "Recommendation for Block Cipher Modes of Operation:
+ Galois;/Counter Mode (GCM) for Confidentiality and
+ Authentication", SP 800-38D, November 2007.
+
+6.2. Informative References
+
+ [Wang05] Wang, X., Yin, Y., and H. Yu, "Finding Collisions in the
+ Full SHA-1", CRYPTO 2005, August 2005.
+
+ [I-D.ietf-tls-rsa-aes-gcm]
+ Salowey, J., Choudhury, A., and D. McGrew, "AES-GCM Cipher
+ Suites for TLS", draft-ietf-tls-rsa-aes-gcm-02 (work in
+ progress), February 2008.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 6]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+Author's Address
+
+ Eric Rescorla
+ RTFM, Inc.
+ 2064 Edgewood Drive
+ Palo Alto 94303
+ USA
+
+ Email: ekr@rtfm.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 7]
+
+Internet-Draft TLS ECC New MAC April 2008
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+Rescorla Expires October 16, 2008 [Page 8]
+
diff --git a/doc/protocol/draft-ietf-tls-ecdhe-psk-01.txt b/doc/protocol/draft-ietf-tls-ecdhe-psk-01.txt
new file mode 100644
index 0000000000..7ce0223fc9
--- /dev/null
+++ b/doc/protocol/draft-ietf-tls-ecdhe-psk-01.txt
@@ -0,0 +1,377 @@
+TLS Working Group Mohamad Badra
+Internet Draft LIMOS Laboratory
+Intended status: Informational April 2, 2008
+Expires: October 2008
+
+
+
+ ECDHE_PSK Ciphersuites for Transport Layer Security (TLS)
+ draft-ietf-tls-ecdhe-psk-01.txt
+
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html
+
+ This Internet-Draft will expire on October 2, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ This document extends RFC 4279, RFC 4492 and RFC 4785, and specifies
+ a set of ciphersuites that use a pre-shared key (PSK) to authenticate
+ an Elliptic Curve Diffie-Hellman exchange (ECDH). These ciphersuites
+ provide Perfect Forward Secrecy (PFS).
+
+
+
+
+
+Badra Expires October 2, 2008 [Page 1]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+Table of Contents
+
+ 1. Introduction...................................................3
+ 1.1. Conventions used in this document.........................3
+ 2. ECDHE_PSK Key Exchange Algorithm...............................3
+ 3. ECDHE_PSK Key Exchange Algorithm with NULL Encryption..........5
+ 4. Security Considerations........................................5
+ 5. IANA Considerations............................................5
+ 6. Acknowledgments................................................5
+ 7. References.....................................................5
+ 7.1. Normative References......................................5
+ Author's Addresses................................................6
+ Intellectual Property Statement...................................6
+ Disclaimer of Validity............................................6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Badra Expires August 2, 2008 [Page 2]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+1. Introduction
+
+ RFC 4279 specifies ciphersuites for supporting TLS using pre-shared
+ symmetric keys and they (a) use only symmetric key operations for
+ authentication, (b) use a Diffie-Hellman exchange authenticated with
+ a pre-shared key, or (c) combines public key authentication of the
+ server with pre-shared key authentication of the client.
+
+ RFC 4785 specifies authentication-only ciphersuites (with no
+ encryption). These ciphersuites are useful when authentication and
+ integrity protection is desired, but confidentiality is not needed or
+ not permitted.
+
+ RFC 4492 defines a set of ECC-based ciphersuites for TLS and
+ describes the use of ECC certificates for client authentication. In
+ particular, it specifies the use of Elliptic Curve Diffie-Hellman
+ (ECDH) key agreement in a TLS handshake and the use of Elliptic Curve
+ Digital Signature Algorithm (ECDSA) as a new authentication
+ mechanism.
+
+ This document specifies a set of ciphersuites that use a PSK to
+ authenticate an ECDH exchange. These ciphersuites provide Perfect
+ Forward Secrecy. One of these ciphersuite provides authentication-
+ only.
+
+ The reader is expected to become familiar with RFC 4279, RFC 4492,
+ and RFC 4785 prior to studying this document.
+
+1.1. Conventions used in this document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+2. ECDHE_PSK Key Exchange Algorithm
+
+ The ciphersuites in this section match the ciphersuites defined in
+ [RFC4279], except that they use an Elliptic Curve Diffie-Hellman
+ exchange [RFC4492] authenticated with a PSK. They are defined as
+ follow:
+
+ CipherSuite Key Exchange Cipher Hash
+
+ TLS_ECDHE_PSK_WITH_RC4_128_SHA ECDHE_PSK RC4_128 SHA
+ TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA ECDHE_PSK 3DES_EDE_CBC SHA
+ TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA ECDHE_PSK AES_128_CBC SHA
+ TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA ECDHE_PSK AES_256_CBC SHA
+
+
+Badra Expires August 2, 2008 [Page 3]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+ These ciphersuites make use of the EC parameter negotiation mechanism
+ defined in RFC 4492. When the ciphersuites defined in this document
+ are used, the 'ec_diffie_hellman_psk' case inside the
+ ServerKeyExchange and ClientKeyExchange structure MUST be used
+ instead of the 'psk' case defined in [RFC4279] (i.e., the
+ ServerKeyExchange and ClientKeyExchange messages include the Diffie-
+ Hellman parameters). The PSK identity and identity hint fields have
+ the same meaning and encoding specified in [RFC4279] (note that the
+ ServerKeyExchange message is always sent, even if no PSK identity
+ hint is provided).
+
+ The format of the ServerKeyExchange and ClientKeyExchange messages is
+ shown below.
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ /* other cases for rsa, diffie_hellman, etc. */
+ case ec_diffie_hellman_psk: /* NEW */
+ opaque psk_identity_hint<0..2^16-1>;
+ ServerECDHParams params;
+ };
+ } ServerKeyExchange;
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ /* other cases for rsa, diffie_hellman, etc. */
+ case ec_diffie_hellman_psk: /* NEW */
+ opaque psk_identity<0..2^16-1>;
+ ClientECDiffieHellmanPublic public;
+ } exchange_keys;
+ } ClientKeyExchange;
+
+ The premaster secret is formed as follows. First, perform an ECDH
+ operation (See section 5.10 of [RFC4492]) to compute the shared
+ secret. Next, concatenate a uint16 containing the length of the
+ shared secret (in octets), the shared secret itself, a uint16
+ containing the length of the PSK (in octets), and the PSK itself.
+
+ This corresponds to the general structure for the premaster secrets
+ (see Note 1 in Section 2 of [RFC4279]), with "other_secret"
+ containing the shared secret:
+
+ struct {
+ opaque other_secret<0..2^16-1>;
+ opaque psk<0..2^16-1>;
+ };
+
+
+
+Badra Expires August 2, 2008 [Page 4]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+3. ECDHE_PSK Key Exchange Algorithm with NULL Encryption
+
+ The ciphersuite in this section matches the ciphersuites defined in
+ section 2, except that we define a suite with null encryption.
+
+ CipherSuite Key Exchange Cipher Hash
+
+ TLS_ECDHE_PSK_WITH_NULL_SHA ECDHE_PSK NULL SHA
+
+4. Security Considerations
+
+ The security considerations described throughout [RFC4279],
+ [RFC4346], [RFC4492], and [RFC4785] apply here as well.
+
+5. IANA Considerations
+
+ This document defines the following new ciphersuites, whose values
+ are to be assigned from the TLS Cipher Suite registry defined in
+ [RFC4346].
+
+ CipherSuite TLS_ECDHE_PSK_WITH_RC4_128_SHA = { 0xXX, 0xXX };
+ CipherSuite TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA = { 0xXX, 0xXX };
+ CipherSuite TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = { 0xXX, 0xXX };
+ CipherSuite TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = { 0xXX, 0xXX };
+ CipherSuite TLS_ECDHE_PSK_WITH_NULL_SHA = { 0xXX, 0xXX };
+
+6. Acknowledgments
+
+ The author would like to thank Bodo Moeller, Simon Josefsson, Uri
+ Blumenthal, Pasi Eronen, Alfred Hoenes, Paul Hoffman, Joseph Salowey,
+ and the TLS mailing list members for their comments on the document.
+
+7. References
+
+7.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites
+ for Transport Layer Security (TLS)", RFC 4279, December
+ 2005.
+
+ [RFC4346] Dierks, T. and E. Rescorla, "The TLS Protocol Version 1.1",
+ RFC 4346, April 2006.
+
+
+
+
+Badra Expires August 2, 2008 [Page 5]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+ [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B.
+ Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites
+ for Transport Layer Security (TLS)", RFC 4492, May 2006.
+
+ [RFC4785] Blumenthal, U. and P. Goel, "Pre-Shared Key (PSK)
+ Ciphersuites with NULL Encryption for Transport Layer
+ Security (TLS)", RFC 4785, January 2007.
+
+Author's Addresses
+
+ Mohamad Badra
+ LIMOS Laboratory - UMR6158, CNRS
+ France
+
+ Email: badra@isima.fr
+
+
+Intellectual Property Statement
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+Disclaimer of Validity
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+
+
+Badra Expires August 2, 2008 [Page 6]
+
+Internet-Draft ECDHE_PSK Ciphersuites for TLS April 2008
+
+
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+Acknowledgment
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Badra Expires August 2, 2008 [Page 7]
+
diff --git a/doc/protocol/draft-ietf-tls-rfc4346-bis-10.txt b/doc/protocol/draft-ietf-tls-rfc4346-bis-10.txt
new file mode 100644
index 0000000000..8911c2549b
--- /dev/null
+++ b/doc/protocol/draft-ietf-tls-rfc4346-bis-10.txt
@@ -0,0 +1,5660 @@
+
+
+
+
+
+
+INTERNET-DRAFT Tim Dierks
+Obsoletes (if approved): RFC 3268, 4346, 4366 Independent
+Updates (if approved): RFC 4492 Eric Rescorla
+Intended status: Proposed Standard Network Resonance, Inc.
+<draft-ietf-tls-rfc4346-bis-10.txt> March 2008 (Expires September 2008)
+
+
+ The Transport Layer Security (TLS) Protocol
+ Version 1.2
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ This document specifies Version 1.2 of the Transport Layer Security
+ (TLS) protocol. The TLS protocol provides communications security
+ over the Internet. The protocol allows client/server applications to
+ communicate in a way that is designed to prevent eavesdropping,
+ tampering, or message forgery.
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 1]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Table of Contents
+
+ 1. Introduction 4
+ 1.1. Requirements Terminology 5
+ 1.2. Major Differences from TLS 1.1 5
+ 2. Goals 6
+ 3. Goals of This Document 7
+ 4. Presentation Language 7
+ 4.1. Basic Block Size 7
+ 4.2. Miscellaneous 7
+ 4.3. Vectors 8
+ 4.4. Numbers 9
+ 4.5. Enumerateds 9
+ 4.6. Constructed Types 10
+ 4.6.1. Variants 10
+ 4.7. Cryptographic Attributes 11
+ 4.8. Constants 13
+ 5. HMAC and the Pseudorandom Function 14
+ 6. The TLS Record Protocol 15
+ 6.1. Connection States 16
+ 6.2. Record layer 18
+ 6.2.1. Fragmentation 19
+ 6.2.2. Record Compression and Decompression 20
+ 6.2.3. Record Payload Protection 21
+ 6.2.3.1. Null or Standard Stream Cipher 21
+ 6.2.3.2. CBC Block Cipher 22
+ 6.2.3.3. AEAD ciphers 24
+ 6.3. Key Calculation 25
+ 7. The TLS Handshaking Protocols 26
+ 7.1. Change Cipher Spec Protocol 27
+ 7.2. Alert Protocol 27
+ 7.2.1. Closure Alerts 28
+ 7.2.2. Error Alerts 29
+ 7.3. Handshake Protocol Overview 33
+ 7.4. Handshake Protocol 37
+ 7.4.1. Hello Messages 38
+ 7.4.1.1. Hello Request 38
+ 7.4.1.2. Client Hello 39
+ 7.4.1.3. Server Hello 42
+ 7.4.1.4 Hello Extensions 43
+ 7.4.1.4.1 Signature Algorithms 45
+ 7.4.2. Server Certificate 46
+ 7.4.3. Server Key Exchange Message 49
+ 7.4.4. Certificate Request 51
+ 7.4.5 Server Hello Done 53
+ 7.4.6. Client Certificate 53
+ 7.4.7. Client Key Exchange Message 55
+ 7.4.7.1. RSA Encrypted Premaster Secret Message 56
+
+
+
+Dierks & Rescorla Standards Track [Page 2]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ 7.4.7.2. Client Diffie-Hellman Public Value 58
+ 7.4.8. Certificate verify 59
+ 7.4.9. Finished 60
+ 8. Cryptographic Computations 62
+ 8.1. Computing the Master Secret 62
+ 8.1.1. RSA 62
+ 8.1.2. Diffie-Hellman 62
+ 9. Mandatory Cipher Suites 63
+ 10. Application Data Protocol 63
+ 11. Security Considerations 63
+ 12. IANA Considerations 63
+ A. Protocol Data Structures and Constant Values 65
+ A.1. Record Layer 65
+ A.2. Change Cipher Specs Message 66
+ A.3. Alert Messages 66
+ A.4. Handshake Protocol 67
+ A.4.1. Hello Messages 67
+ A.4.2. Server Authentication and Key Exchange Messages 69
+ A.4.3. Client Authentication and Key Exchange Messages 70
+ A.4.4. Handshake Finalization Message 71
+ A.5. The Cipher Suite 71
+ A.6. The Security Parameters 73
+ A.7. Changes to RFC 4492 74
+ B. Glossary 74
+ C. Cipher Suite Definitions 79
+ D. Implementation Notes 81
+ D.1 Random Number Generation and Seeding 81
+ D.2 Certificates and Authentication 81
+ D.3 Cipher Suites 81
+ D.4 Implementation Pitfalls 81
+ E. Backward Compatibility 84
+ E.1 Compatibility with TLS 1.0/1.1 and SSL 3.0 84
+ E.2 Compatibility with SSL 2.0 85
+ E.3. Avoiding Man-in-the-Middle Version Rollback 87
+ F. Security Analysis 88
+ F.1. Handshake Protocol 88
+ F.1.1. Authentication and Key Exchange 88
+ F.1.1.1. Anonymous Key Exchange 88
+ F.1.1.2. RSA Key Exchange and Authentication 89
+ F.1.1.3. Diffie-Hellman Key Exchange with Authentication 89
+ F.1.2. Version Rollback Attacks 90
+ F.1.3. Detecting Attacks Against the Handshake Protocol 91
+ F.1.4. Resuming Sessions 91
+ F.2. Protecting Application Data 91
+ F.3. Explicit IVs 92
+ F.4. Security of Composite Cipher Modes 92
+ F.5 Denial of Service 93
+ F.6 Final Notes 93
+
+
+
+Dierks & Rescorla Standards Track [Page 3]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+1. Introduction
+
+ The primary goal of the TLS Protocol is to provide privacy and data
+ integrity between two communicating applications. The protocol is
+ composed of two layers: the TLS Record Protocol and the TLS Handshake
+ Protocol. At the lowest level, layered on top of some reliable
+ transport protocol (e.g., TCP[TCP]), is the TLS Record Protocol. The
+ TLS Record Protocol provides connection security that has two basic
+ properties:
+
+ - The connection is private. Symmetric cryptography is used for
+ data encryption (e.g., AES [AES], RC4 [SCH] etc.). The keys for
+ this symmetric encryption are generated uniquely for each
+ connection and are based on a secret negotiated by another
+ protocol (such as the TLS Handshake Protocol). The Record Protocol
+ can also be used without encryption.
+
+ - The connection is reliable. Message transport includes a message
+ integrity check using a keyed MAC. Secure hash functions (e.g.,
+ SHA-1, etc.) are used for MAC computations. The Record Protocol
+ can operate without a MAC, but is generally only used in this mode
+ while another protocol is using the Record Protocol as a transport
+ for negotiating security parameters.
+
+ The TLS Record Protocol is used for encapsulation of various higher-
+ level protocols. One such encapsulated protocol, the TLS Handshake
+ Protocol, allows the server and client to authenticate each other and
+ to negotiate an encryption algorithm and cryptographic keys before
+ the application protocol transmits or receives its first byte of
+ data. The TLS Handshake Protocol provides connection security that
+ has three basic properties:
+
+ - The peer's identity can be authenticated using asymmetric, or
+ public key, cryptography (e.g., RSA [RSA], DSA [DSS], etc.). This
+ authentication can be made optional, but is generally required for
+ at least one of the peers.
+
+ - The negotiation of a shared secret is secure: the negotiated
+ secret is unavailable to eavesdroppers, and for any authenticated
+ connection the secret cannot be obtained, even by an attacker who
+ can place himself in the middle of the connection.
+
+ - The negotiation is reliable: no attacker can modify the
+ negotiation communication without being detected by the parties to
+ the communication.
+
+ One advantage of TLS is that it is application protocol independent.
+ Higher-level protocols can layer on top of the TLS Protocol
+
+
+
+Dierks & Rescorla Standards Track [Page 4]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ transparently. The TLS standard, however, does not specify how
+ protocols add security with TLS; the decisions on how to initiate TLS
+ handshaking and how to interpret the authentication certificates
+ exchanged are left to the judgment of the designers and implementors
+ of protocols that run on top of TLS.
+
+1.1. Requirements Terminology
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in RFC 2119 [REQ].
+
+1.2. Major Differences from TLS 1.1
+
+ This document is a revision of the TLS 1.1 [TLS1.1] protocol which
+ contains improved flexibility, particularly for negotiation of
+ cryptographic algorithms. The major changes are:
+
+ - The MD5/SHA-1 combination in the pseudorandom function (PRF) has
+ been replaced with cipher suite specified PRFs. All cipher suites
+ in this document use P_SHA256.
+
+ - The MD5/SHA-1 combination in the digitally-signed element has been
+ replaced with a single hash. Signed elements now include a field
+ that explicitly specifies the hash algorithm used.
+
+ - Substantial cleanup to the client's and server's ability to
+ specify which hash and signature algorithms they will accept. Note
+ that this also relaxes some of the constraints on signature and
+ hash algorithms from previous versions of TLS.
+
+ - Addition of support for authenticated encryption with additional
+ data modes.
+
+ - TLS Extensions definition and AES Cipher Suites were merged in
+ from external [TLSEXT] and [TLSAES].
+
+ - Tighter checking of EncryptedPreMasterSecret version numbers.
+
+ - Tightened up a number of requirements.
+
+ - Verify_data length now depends on the cipher suite (default is
+ still 12).
+
+ - Cleaned up description of Bleichenbacher/Klima attack defenses.
+
+ - Alerts MUST now be sent in many cases.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 5]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ - After a certificate_request, if no certificates are available,
+ clients now MUST send an empty certificate list.
+
+ - TLS_RSA_WITH_AES_128_CBC_SHA is now the mandatory to implement
+ cipher suite.
+
+ - Added HMAC-SHA256 cipher suites
+
+ - Removed IDEA and DES cipher suites. They are now deprecated and
+ will be documented in a separate document.
+
+ - Support for the SSLv2 backward-compatible hello is now a MAY, not
+ a SHOULD, with sending it a SHOULD NOT. Support will probably
+ become a SHOULD NOT in the future.
+
+ - Added limited "fall-through" to the presentation language to allow
+ multiple case arms to have the same encoding.
+
+ - Added an Implementation Pitfalls sections
+
+ - The usual clarifications and editorial work.
+
+2. Goals
+
+ The goals of TLS Protocol, in order of their priority, are as
+ follows:
+
+ 1. Cryptographic security: TLS should be used to establish a secure
+ connection between two parties.
+
+ 2. Interoperability: Independent programmers should be able to
+ develop applications utilizing TLS that can successfully exchange
+ cryptographic parameters without knowledge of one another's code.
+
+ 3. Extensibility: TLS seeks to provide a framework into which new
+ public key and bulk encryption methods can be incorporated as
+ necessary. This will also accomplish two sub-goals: preventing the
+ need to create a new protocol (and risking the introduction of
+ possible new weaknesses) and avoiding the need to implement an
+ entire new security library.
+
+ 4. Relative efficiency: Cryptographic operations tend to be highly
+ CPU intensive, particularly public key operations. For this
+ reason, the TLS protocol has incorporated an optional session
+ caching scheme to reduce the number of connections that need to be
+ established from scratch. Additionally, care has been taken to
+ reduce network activity.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 6]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+3. Goals of This Document
+
+ This document and the TLS protocol itself are based on the SSL 3.0
+ Protocol Specification as published by Netscape. The differences
+ between this protocol and SSL 3.0 are not dramatic, but they are
+ significant enough that the various versions of TLS and SSL 3.0 do
+ not interoperate (although each protocol incorporates a mechanism by
+ which an implementation can back down to prior versions). This
+ document is intended primarily for readers who will be implementing
+ the protocol and for those doing cryptographic analysis of it. The
+ specification has been written with this in mind, and it is intended
+ to reflect the needs of those two groups. For that reason, many of
+ the algorithm-dependent data structures and rules are included in the
+ body of the text (as opposed to in an appendix), providing easier
+ access to them.
+
+ This document is not intended to supply any details of service
+ definition or of interface definition, although it does cover select
+ areas of policy as they are required for the maintenance of solid
+ security.
+
+
+4. Presentation Language
+
+ This document deals with the formatting of data in an external
+ representation. The following very basic and somewhat casually
+ defined presentation syntax will be used. The syntax draws from
+ several sources in its structure. Although it resembles the
+ programming language "C" in its syntax and XDR [XDR] in both its
+ syntax and intent, it would be risky to draw too many parallels. The
+ purpose of this presentation language is to document TLS only; it has
+ no general application beyond that particular goal.
+
+4.1. Basic Block Size
+
+ The representation of all data items is explicitly specified. The
+ basic data block size is one byte (i.e., 8 bits). Multiple byte data
+ items are concatenations of bytes, from left to right, from top to
+ bottom. From the bytestream, a multi-byte item (a numeric in the
+ example) is formed (using C notation) by:
+
+ value = (byte[0] << 8*(n-1)) | (byte[1] << 8*(n-2)) |
+ ... | byte[n-1];
+
+ This byte ordering for multi-byte values is the commonplace network
+ byte order or big endian format.
+
+4.2. Miscellaneous
+
+
+
+Dierks & Rescorla Standards Track [Page 7]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Comments begin with "/*" and end with "*/".
+
+ Optional components are denoted by enclosing them in "[[ ]]" double
+ brackets.
+
+ Single-byte entities containing uninterpreted data are of type
+ opaque.
+
+4.3. Vectors
+
+ A vector (single dimensioned array) is a stream of homogeneous data
+ elements. The size of the vector may be specified at documentation
+ time or left unspecified until runtime. In either case, the length
+ declares the number of bytes, not the number of elements, in the
+ vector. The syntax for specifying a new type, T', that is a fixed-
+ length vector of type T is
+
+ T T'[n];
+
+ Here, T' occupies n bytes in the data stream, where n is a multiple
+ of the size of T. The length of the vector is not included in the
+ encoded stream.
+
+ In the following example, Datum is defined to be three consecutive
+ bytes that the protocol does not interpret, while Data is three
+ consecutive Datum, consuming a total of nine bytes.
+
+ opaque Datum[3]; /* three uninterpreted bytes */
+ Datum Data[9]; /* 3 consecutive 3 byte vectors */
+
+ Variable-length vectors are defined by specifying a subrange of legal
+ lengths, inclusively, using the notation <floor..ceiling>. When
+ these are encoded, the actual length precedes the vector's contents
+ in the byte stream. The length will be in the form of a number
+ consuming as many bytes as required to hold the vector's specified
+ maximum (ceiling) length. A variable-length vector with an actual
+ length field of zero is referred to as an empty vector.
+
+ T T'<floor..ceiling>;
+
+ In the following example, mandatory is a vector that must contain
+ between 300 and 400 bytes of type opaque. It can never be empty. The
+ actual length field consumes two bytes, a uint16, sufficient to
+ represent the value 400 (see Section 4.4). On the other hand, longer
+ can represent up to 800 bytes of data, or 400 uint16 elements, and it
+ may be empty. Its encoding will include a two-byte actual length
+ field prepended to the vector. The length of an encoded vector must
+ be an even multiple of the length of a single element (for example, a
+
+
+
+Dierks & Rescorla Standards Track [Page 8]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ 17-byte vector of uint16 would be illegal).
+
+ opaque mandatory<300..400>;
+ /* length field is 2 bytes, cannot be empty */
+ uint16 longer<0..800>;
+ /* zero to 400 16-bit unsigned integers */
+
+4.4. Numbers
+
+ The basic numeric data type is an unsigned byte (uint8). All larger
+ numeric data types are formed from fixed-length series of bytes
+ concatenated as described in Section 4.1 and are also unsigned. The
+ following numeric types are predefined.
+
+ uint8 uint16[2];
+ uint8 uint24[3];
+ uint8 uint32[4];
+ uint8 uint64[8];
+
+ All values, here and elsewhere in the specification, are stored in
+ "network" or "big-endian" order; the uint32 represented by the hex
+ bytes 01 02 03 04 is equivalent to the decimal value 16909060.
+
+ Note that in some cases (e.g., DH parameters) it is necessary to
+ represent integers as opaque vectors. In such cases, they are
+ represented as unsigned integers (i.e., leading zero octets are not
+ required even if the most significant bit is set).
+
+4.5. Enumerateds
+
+ An additional sparse data type is available called enum. A field of
+ type enum can only assume the values declared in the definition.
+ Each definition is a different type. Only enumerateds of the same
+ type may be assigned or compared. Every element of an enumerated must
+ be assigned a value, as demonstrated in the following example. Since
+ the elements of the enumerated are not ordered, they can be assigned
+ any unique value, in any order.
+
+ enum { e1(v1), e2(v2), ... , en(vn) [[, (n)]] } Te;
+
+ Enumerateds occupy as much space in the byte stream as would its
+ maximal defined ordinal value. The following definition would cause
+ one byte to be used to carry fields of type Color.
+
+ enum { red(3), blue(5), white(7) } Color;
+
+ One may optionally specify a value without its associated tag to
+ force the width definition without defining a superfluous element.
+
+
+
+Dierks & Rescorla Standards Track [Page 9]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ In the following example, Taste will consume two bytes in the data
+ stream but can only assume the values 1, 2, or 4.
+
+ enum { sweet(1), sour(2), bitter(4), (32000) } Taste;
+
+ The names of the elements of an enumeration are scoped within the
+ defined type. In the first example, a fully qualified reference to
+ the second element of the enumeration would be Color.blue. Such
+ qualification is not required if the target of the assignment is well
+ specified.
+
+ Color color = Color.blue; /* overspecified, legal */
+ Color color = blue; /* correct, type implicit */
+
+ For enumerateds that are never converted to external representation,
+ the numerical information may be omitted.
+
+ enum { low, medium, high } Amount;
+
+4.6. Constructed Types
+
+ Structure types may be constructed from primitive types for
+ convenience. Each specification declares a new, unique type. The
+ syntax for definition is much like that of C.
+
+ struct {
+ T1 f1;
+ T2 f2;
+ ...
+ Tn fn;
+ } [[T]];
+
+ The fields within a structure may be qualified using the type's name,
+ with a syntax much like that available for enumerateds. For example,
+ T.f2 refers to the second field of the previous declaration.
+ Structure definitions may be embedded.
+
+4.6.1. Variants
+
+ Defined structures may have variants based on some knowledge that is
+ available within the environment. The selector must be an enumerated
+ type that defines the possible variants the structure defines. There
+ must be a case arm for every element of the enumeration declared in
+ the select. Case arms have limited fall-through: if two case arms
+ follow in immediate succession with no fields in between, then they
+ both contain the same fields. Thus, in the example below, "orange"
+ and "banana" both contain V2. Note that this is a new piece of syntax
+ in TLS 1.2.
+
+
+
+Dierks & Rescorla Standards Track [Page 10]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ The body of the variant structure may be given a label for reference.
+ The mechanism by which the variant is selected at runtime is not
+ prescribed by the presentation language.
+
+ struct {
+ T1 f1;
+ T2 f2;
+ ....
+ Tn fn;
+ select (E) {
+ case e1: Te1;
+ case e2: Te2;
+ case e3: case e4: Te3;
+ ....
+ case en: Ten;
+ } [[fv]];
+ } [[Tv]];
+
+ For example:
+
+ enum { apple, orange, banana } VariantTag;
+
+ struct {
+ uint16 number;
+ opaque string<0..10>; /* variable length */
+ } V1;
+
+ struct {
+ uint32 number;
+ opaque string[10]; /* fixed length */
+ } V2;
+
+ struct {
+ select (VariantTag) { /* value of selector is implicit */
+ case apple:
+ V1; /* VariantBody, tag = apple */
+ case orange:
+ case banana:
+ V2; /* VariantBody, tag = orange or banana */
+ } variant_body; /* optional label on variant */
+ } VariantRecord;
+
+
+4.7. Cryptographic Attributes
+
+ The five cryptographic operations digital signing, stream cipher
+ encryption, block cipher encryption, authenticated encryption with
+ additional data (AEAD) encryption and public key encryption are
+
+
+
+Dierks & Rescorla Standards Track [Page 11]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ designated digitally-signed, stream-ciphered, block-ciphered, aead-
+ ciphered, and public-key-encrypted, respectively. A field's
+ cryptographic processing is specified by prepending an appropriate
+ key word designation before the field's type specification.
+ Cryptographic keys are implied by the current session state (see
+ Section 6.1).
+
+ A digitally-signed element is encoded as a struct DigitallySigned:
+
+ struct {
+ SignatureAndHashAlgorithm algorithm;
+ opaque signature<0..2^16-1>;
+ } DigitallySigned;
+
+ The algorithm field specifies the algorithm used (see Section
+ 7.4.1.4.1 for the definition of this field.) Note that the
+ introduction of the algorithm field is a change from previous
+ versions. The signature is a digital signature using those
+ algorithms over the contents of the element. The contents themselves
+ do not appear on the wire but are simply calculated. The length of
+ the signature is specified by the signing algorithm and key.
+
+ In RSA signing, the opaque vector contains the signature generated
+ using the RSASSA-PKCS1-v1_5 signature scheme defined in [PKCS1]. As
+ discussed in [PKCS1], the DigestInfo MUST be DER [X680] [X690]
+ encoded and for hash algorithms without parameters (which include
+ SHA-1) the DigestInfo.AlgorithmIdentifier.parameters field MUST be
+ NULL but implementations MUST accept both without parameters and with
+ NULL parameters. Note that earlier versions of TLS used a different
+ RSA signature scheme which did not include a DigestInfo encoding.
+
+ In DSA, the 20 bytes of the SHA-1 hash are run directly through the
+ Digital Signing Algorithm with no additional hashing. This produces
+ two values, r and s. The DSA signature is an opaque vector, as above,
+ the contents of which are the DER encoding of:
+
+ Dss-Sig-Value ::= SEQUENCE {
+ r INTEGER,
+ s INTEGER
+ }
+
+ Note: In current terminology, DSA refers to the Digital Signature
+ Algorithm and DSS refers to the NIST standard. In the original
+ SSL and TLS specs, "DSS" was used universally. This document
+ uses "DSA" to refer to the algorithm, "DSS" to refer to the
+ standard, and uses "DSS" in the code point definitions for
+ historical continuity.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 12]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ In stream cipher encryption, the plaintext is exclusive-ORed with an
+ identical amount of output generated from a cryptographically secure
+ keyed pseudorandom number generator.
+
+ In block cipher encryption, every block of plaintext encrypts to a
+ block of ciphertext. All block cipher encryption is done in CBC
+ (Cipher Block Chaining) mode, and all items that are block-ciphered
+ will be an exact multiple of the cipher block length.
+
+ In AEAD encryption, the plaintext is simultaneously encrypted and
+ integrity protected. The input may be of any length and aead-ciphered
+ output is generally larger than the input in order to accomodate the
+ integrity check value.
+
+ In public key encryption, a public key algorithm is used to encrypt
+ data in such a way that it can be decrypted only with the matching
+ private key. A public-key-encrypted element is encoded as an opaque
+ vector <0..2^16-1>, where the length is specified by the encryption
+ algorithm and key.
+
+ RSA encryption is done using the RSAES-PKCS1-v1_5 encryption scheme
+ defined in [PKCS1].
+
+ In the following example
+
+ stream-ciphered struct {
+ uint8 field1;
+ uint8 field2;
+ digitally-signed opaque {
+ uint8 field3<0..255>;
+ uint8 field4;
+ };
+ } UserType;
+
+
+ The contents of the inner struct (field3 and field4) are used as
+ input for the signature/hash algorithm, and then the entire structure
+ is encrypted with a stream cipher. The length of this structure, in
+ bytes, would be equal to two bytes for field1 and field2, plus two
+ bytes for the signature and hash algorithm, plus two bytes for the
+ length of the signature, plus the length of the output of the signing
+ algorithm. This is known because the algorithm and key used for the
+ signing are known prior to encoding or decoding this structure.
+
+4.8. Constants
+
+ Typed constants can be defined for purposes of specification by
+ declaring a symbol of the desired type and assigning values to it.
+
+
+
+Dierks & Rescorla Standards Track [Page 13]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Under-specified types (opaque, variable length vectors, and
+ structures that contain opaque) cannot be assigned values. No fields
+ of a multi-element structure or vector may be elided.
+
+ For example:
+
+ struct {
+ uint8 f1;
+ uint8 f2;
+ } Example1;
+
+ Example1 ex1 = {1, 4}; /* assigns f1 = 1, f2 = 4 */
+
+
+5. HMAC and the Pseudorandom Function
+
+ The TLS record layer uses a keyed Message Authentication Code (MAC)
+ to protect message integrity. The cipher suites defined in this
+ document use a construction known as HMAC, described in [HMAC], which
+ is based on a hash function. Other cipher suites MAY define their own
+ MAC constructions, if needed.
+
+ In addition, a construction is required to do expansion of secrets
+ into blocks of data for the purposes of key generation or validation.
+ This pseudo-random function (PRF) takes as input a secret, a seed,
+ and an identifying label and produces an output of arbitrary length.
+
+ In this section, we define one PRF, based on HMAC. This PRF with the
+ SHA-256 hash function is used for all cipher suites defined in this
+ document and in TLS documents published prior to this document when
+ TLS 1.2 is negotiated. New cipher suites MUST explicitly specify a
+ PRF and in general SHOULD use the TLS PRF with SHA-256 or a stronger
+ standard hash function.
+
+ First, we define a data expansion function, P_hash(secret, data) that
+ uses a single hash function to expand a secret and seed into an
+ arbitrary quantity of output:
+
+ P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
+ HMAC_hash(secret, A(2) + seed) +
+ HMAC_hash(secret, A(3) + seed) + ...
+
+ Where + indicates concatenation.
+
+ A() is defined as:
+
+ A(0) = seed
+ A(i) = HMAC_hash(secret, A(i-1))
+
+
+
+Dierks & Rescorla Standards Track [Page 14]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ P_hash can be iterated as many times as is necessary to produce the
+ required quantity of data. For example, if P_SHA256 is being used to
+ create 80 bytes of data, it will have to be iterated three times
+ (through A(3)), creating 96 bytes of output data; the last 16 bytes
+ of the final iteration will then be discarded, leaving 80 bytes of
+ output data.
+
+ TLS's PRF is created by applying P_hash to the secret as:
+
+ PRF(secret, label, seed) = P_<hash>(secret, label + seed)
+
+ The label is an ASCII string. It should be included in the exact form
+ it is given without a length byte or trailing null character. For
+ example, the label "slithy toves" would be processed by hashing the
+ following bytes:
+
+ 73 6C 69 74 68 79 20 74 6F 76 65 73
+
+
+6. The TLS Record Protocol
+
+ The TLS Record Protocol is a layered protocol. At each layer,
+ messages may include fields for length, description, and content.
+ The Record Protocol takes messages to be transmitted, fragments the
+ data into manageable blocks, optionally compresses the data, applies
+ a MAC, encrypts, and transmits the result. Received data is
+ decrypted, verified, decompressed, reassembled, and then delivered to
+ higher-level clients.
+
+ Four protocols that use the record protocol are described in this
+ document: the handshake protocol, the alert protocol, the change
+ cipher spec protocol, and the application data protocol. In order to
+ allow extension of the TLS protocol, additional record content types
+ can be supported by the record protocol. New record content type
+ values are assigned by IANA in the TLS Content Type Registry as
+ described in Section 12.
+
+ Implementations MUST NOT send record types not defined in this
+ document unless negotiated by some extension. If a TLS
+ implementation receives an unexpected record type, it MUST send an
+ unexpected_message alert.
+
+ Any protocol designed for use over TLS must be carefully designed to
+ deal with all possible attacks against it. As a practical matter,
+ this means that the protocol designer must be aware of what security
+ properties TLS does and does not provide and cannot safely rely on
+ the latter.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 15]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Note in particular that type and length of a record are not protected
+ by encryption. If this information is itself sensitive, application
+ designers may wish to take steps (padding, cover traffic) to minimize
+ information leakage.
+
+6.1. Connection States
+
+ A TLS connection state is the operating environment of the TLS Record
+ Protocol. It specifies a compression algorithm, an encryption
+ algorithm, and a MAC algorithm. In addition, the parameters for these
+ algorithms are known: the MAC key and the bulk encryption keys for
+ the connection in both the read and the write directions. Logically,
+ there are always four connection states outstanding: the current read
+ and write states, and the pending read and write states. All records
+ are processed under the current read and write states. The security
+ parameters for the pending states can be set by the TLS Handshake
+ Protocol, and the ChangeCipherSpec can selectively make either of the
+ pending states current, in which case the appropriate current state
+ is disposed of and replaced with the pending state; the pending state
+ is then reinitialized to an empty state. It is illegal to make a
+ state that has not been initialized with security parameters a
+ current state. The initial current state always specifies that no
+ encryption, compression, or MAC will be used.
+
+ The security parameters for a TLS Connection read and write state are
+ set by providing the following values:
+
+ connection end
+ Whether this entity is considered the "client" or the "server" in
+ this connection.
+
+ PRF algorithm
+ An algorithm used to generate keys from the master secret (see
+ Sections 5 and 6.3).
+
+ bulk encryption algorithm
+ An algorithm to be used for bulk encryption. This specification
+ includes the key size of this algorithm, whether it is a block,
+ stream, or AEAD cipher, the block size of the cipher (if
+ appropriate), and the lengths of explicit and implicit
+ initialization vectors (or nonces).
+
+ MAC algorithm
+ An algorithm to be used for message authentication. This
+ specification includes the size of the value returned by the MAC
+ algorithm.
+
+ compression algorithm
+
+
+
+Dierks & Rescorla Standards Track [Page 16]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ An algorithm to be used for data compression. This specification
+ must include all information the algorithm requires to do
+ compression.
+
+ master secret
+ A 48-byte secret shared between the two peers in the connection.
+
+ client random
+ A 32-byte value provided by the client.
+
+ server random
+ A 32-byte value provided by the server.
+
+ These parameters are defined in the presentation language as:
+
+ enum { server, client } ConnectionEnd;
+
+ enum { tls_prf_sha256 } PRFAlgorithm;
+
+ enum { null, rc4, 3des, aes }
+ BulkCipherAlgorithm;
+
+ enum { stream, block, aead } CipherType;
+
+ enum { null, hmac_md5, hmac_sha1, hmac_sha256,
+ hmac_sha384, hmac_sha512} MACAlgorithm;
+
+ enum { null(0), (255) } CompressionMethod;
+
+ /* The algorithms specified in CompressionMethod, PRFAlgorithm
+ BulkCipherAlgorithm, and MACAlgorithm may be added to. */
+
+ struct {
+ ConnectionEnd entity;
+ PRFAlgorithm prf_algorithm;
+ BulkCipherAlgorithm bulk_cipher_algorithm;
+ CipherType cipher_type;
+ uint8 enc_key_length;
+ uint8 block_length;
+ uint8 fixed_iv_length;
+ uint8 record_iv_length;
+ MACAlgorithm mac_algorithm;
+ uint8 mac_length;
+ uint8 mac_key_length;
+ CompressionMethod compression_algorithm;
+ opaque master_secret[48];
+ opaque client_random[32];
+ opaque server_random[32];
+
+
+
+Dierks & Rescorla Standards Track [Page 17]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ } SecurityParameters;
+
+ The record layer will use the security parameters to generate the
+ following six items (some of which are not required by all ciphers,
+ and are thus empty):
+
+ client write MAC key
+ server write MAC key
+ client write encryption key
+ server write encryption key
+ client write IV
+ server write IV
+
+ The client write parameters are used by the server when receiving and
+ processing records and vice-versa. The algorithm used for generating
+ these items from the security parameters is described in Section 6.3.
+
+ Once the security parameters have been set and the keys have been
+ generated, the connection states can be instantiated by making them
+ the current states. These current states MUST be updated for each
+ record processed. Each connection state includes the following
+ elements:
+
+ compression state
+ The current state of the compression algorithm.
+
+ cipher state
+ The current state of the encryption algorithm. This will consist
+ of the scheduled key for that connection. For stream ciphers, this
+ will also contain whatever state information is necessary to allow
+ the stream to continue to encrypt or decrypt data.
+
+ MAC key
+ The MAC key for this connection, as generated above.
+
+ sequence number
+ Each connection state contains a sequence number, which is
+ maintained separately for read and write states. The sequence
+ number MUST be set to zero whenever a connection state is made the
+ active state. Sequence numbers are of type uint64 and may not
+ exceed 2^64-1. Sequence numbers do not wrap. If a TLS
+ implementation would need to wrap a sequence number, it must
+ renegotiate instead. A sequence number is incremented after each
+ record: specifically, the first record transmitted under a
+ particular connection state MUST use sequence number 0.
+
+6.2. Record layer
+
+
+
+
+Dierks & Rescorla Standards Track [Page 18]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ The TLS Record Layer receives uninterpreted data from higher layers
+ in non-empty blocks of arbitrary size.
+
+6.2.1. Fragmentation
+
+ The record layer fragments information blocks into TLSPlaintext
+ records carrying data in chunks of 2^14 bytes or less. Client message
+ boundaries are not preserved in the record layer (i.e., multiple
+ client messages of the same ContentType MAY be coalesced into a
+ single TLSPlaintext record, or a single message MAY be fragmented
+ across several records).
+
+ struct {
+ uint8 major;
+ uint8 minor;
+ } ProtocolVersion;
+
+ enum {
+ change_cipher_spec(20), alert(21), handshake(22),
+ application_data(23), (255)
+ } ContentType;
+
+ struct {
+ ContentType type;
+ ProtocolVersion version;
+ uint16 length;
+ opaque fragment[TLSPlaintext.length];
+ } TLSPlaintext;
+
+ type
+ The higher-level protocol used to process the enclosed fragment.
+
+ version
+ The version of the protocol being employed. This document
+ describes TLS Version 1.2, which uses the version { 3, 3 }. The
+ version value 3.3 is historical, deriving from the use of {3, 1}
+ for TLS 1.0. (See Appendix A.1). Note that a client that supports
+ multiple versions of TLS may not know what version will be
+ employed before it receives the ServerHello. See Appendix E for
+ discussion about what record layer version number should be
+ employed for ClientHello.
+
+ length
+ The length (in bytes) of the following TLSPlaintext.fragment. The
+ length MUST NOT exceed 2^14.
+
+ fragment
+ The application data. This data is transparent and treated as an
+
+
+
+Dierks & Rescorla Standards Track [Page 19]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ independent block to be dealt with by the higher-level protocol
+ specified by the type field.
+
+ Implementations MUST NOT send zero-length fragments of Handshake,
+ Alert, or ChangeCipherSpec content types. Zero-length fragments of
+ Application data MAY be sent as they are potentially useful as a
+ traffic analysis countermeasure.
+
+ Note: Data of different TLS Record layer content types MAY be
+ interleaved. Application data is generally of lower precedence for
+ transmission than other content types. However, records MUST be
+ delivered to the network in the same order as they are protected by
+ the record layer. Recipients MUST receive and process interleaved
+ application layer traffic during handshakes subsequent to the first
+ one on a connection.
+
+6.2.2. Record Compression and Decompression
+
+ All records are compressed using the compression algorithm defined in
+ the current session state. There is always an active compression
+ algorithm; however, initially it is defined as
+ CompressionMethod.null. The compression algorithm translates a
+ TLSPlaintext structure into a TLSCompressed structure. Compression
+ functions are initialized with default state information whenever a
+ connection state is made active. [RFC3749] describes compression
+ algorithms for TLS.
+
+ Compression must be lossless and may not increase the content length
+ by more than 1024 bytes. If the decompression function encounters a
+ TLSCompressed.fragment that would decompress to a length in excess of
+ 2^14 bytes, it MUST report a fatal decompression failure error.
+
+ struct {
+ ContentType type; /* same as TLSPlaintext.type */
+ ProtocolVersion version;/* same as TLSPlaintext.version */
+ uint16 length;
+ opaque fragment[TLSCompressed.length];
+ } TLSCompressed;
+
+ length
+ The length (in bytes) of the following TLSCompressed.fragment.
+ The length MUST NOT exceed 2^14 + 1024.
+
+ fragment
+ The compressed form of TLSPlaintext.fragment.
+
+ Note: A CompressionMethod.null operation is an identity operation; no
+ fields are altered.
+
+
+
+Dierks & Rescorla Standards Track [Page 20]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Implementation note: Decompression functions are responsible for
+ ensuring that messages cannot cause internal buffer overflows.
+
+6.2.3. Record Payload Protection
+
+ The encryption and MAC functions translate a TLSCompressed structure
+ into a TLSCiphertext. The decryption functions reverse the process.
+ The MAC of the record also includes a sequence number so that
+ missing, extra, or repeated messages are detectable.
+
+ struct {
+ ContentType type;
+ ProtocolVersion version;
+ uint16 length;
+ select (SecurityParameters.cipher_type) {
+ case stream: GenericStreamCipher;
+ case block: GenericBlockCipher;
+ case aead: GenericAEADCipher;
+ } fragment;
+ } TLSCiphertext;
+
+ type
+ The type field is identical to TLSCompressed.type.
+
+ version
+ The version field is identical to TLSCompressed.version.
+
+ length
+ The length (in bytes) of the following TLSCiphertext.fragment.
+ The length MUST NOT exceed 2^14 + 2048.
+
+ fragment
+ The encrypted form of TLSCompressed.fragment, with the MAC.
+
+6.2.3.1. Null or Standard Stream Cipher
+
+ Stream ciphers (including BulkCipherAlgorithm.null, see Appendix A.6)
+ convert TLSCompressed.fragment structures to and from stream
+ TLSCiphertext.fragment structures.
+
+ stream-ciphered struct {
+ opaque content[TLSCompressed.length];
+ opaque MAC[SecurityParameters.mac_length];
+ } GenericStreamCipher;
+
+ The MAC is generated as:
+
+ MAC(MAC_write_key, seq_num +
+
+
+
+Dierks & Rescorla Standards Track [Page 21]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ TLSCompressed.type +
+ TLSCompressed.version +
+ TLSCompressed.length +
+ TLSCompressed.fragment);
+
+ where "+" denotes concatenation.
+
+ seq_num
+ The sequence number for this record.
+
+ MAC
+ The MAC algorithm specified by SecurityParameters.mac_algorithm.
+
+ Note that the MAC is computed before encryption. The stream cipher
+ encrypts the entire block, including the MAC. For stream ciphers that
+ do not use a synchronization vector (such as RC4), the stream cipher
+ state from the end of one record is simply used on the subsequent
+ packet. If the cipher suite is TLS_NULL_WITH_NULL_NULL, encryption
+ consists of the identity operation (i.e., the data is not encrypted,
+ and the MAC size is zero, implying that no MAC is used). For both
+ null and stream ciphers, TLSCiphertext.length is TLSCompressed.length
+ plus SecurityParameters.mac_length.
+
+6.2.3.2. CBC Block Cipher
+
+ For block ciphers (such as 3DES, or AES), the encryption and MAC
+ functions convert TLSCompressed.fragment structures to and from block
+ TLSCiphertext.fragment structures.
+
+ struct {
+ opaque IV[SecurityParameters.record_iv_length];
+ block-ciphered struct {
+ opaque content[TLSCompressed.length];
+ opaque MAC[SecurityParameters.mac_length];
+ uint8 padding[GenericBlockCipher.padding_length];
+ uint8 padding_length;
+ };
+ } GenericBlockCipher;
+
+ The MAC is generated as described in Section 6.2.3.1.
+
+ IV
+ The Initialization Vector (IV) SHOULD be chosen at random, and
+ MUST be unpredictable. Note that in versions of TLS prior to 1.1,
+ there was no IV field, and the last ciphertext block of the
+ previous record (the "CBC residue") was used as the IV. This was
+ changed to prevent the attacks described in [CBCATT]. For block
+ ciphers, the IV length is of length
+
+
+
+Dierks & Rescorla Standards Track [Page 22]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ SecurityParameters.record_iv_length which is equal to the
+ SecurityParameters.block_size.
+
+ padding
+ Padding that is added to force the length of the plaintext to be
+ an integral multiple of the block cipher's block length. The
+ padding MAY be any length up to 255 bytes, as long as it results
+ in the TLSCiphertext.length being an integral multiple of the
+ block length. Lengths longer than necessary might be desirable to
+ frustrate attacks on a protocol that are based on analysis of the
+ lengths of exchanged messages. Each uint8 in the padding data
+ vector MUST be filled with the padding length value. The receiver
+ MUST check this padding and MUST use the bad_record_mac alert to
+ indicate padding errors.
+
+ padding_length
+ The padding length MUST be such that the total size of the
+ GenericBlockCipher structure is a multiple of the cipher's block
+ length. Legal values range from zero to 255, inclusive. This
+ length specifies the length of the padding field exclusive of the
+ padding_length field itself.
+
+ The encrypted data length (TLSCiphertext.length) is one more than the
+ sum of SecurityParameters.block_length, TLSCompressed.length,
+ SecurityParameters.mac_length, and padding_length.
+
+ Example: If the block length is 8 bytes, the content length
+ (TLSCompressed.length) is 61 bytes, and the MAC length is 20 bytes,
+ then the length before padding is 82 bytes (this does not include the
+ IV. Thus, the padding length modulo 8 must be equal to 6 in order to
+ make the total length an even multiple of 8 bytes (the block length).
+ The padding length can be 6, 14, 22, and so on, through 254. If the
+ padding length were the minimum necessary, 6, the padding would be 6
+ bytes, each containing the value 6. Thus, the last 8 octets of the
+ GenericBlockCipher before block encryption would be xx 06 06 06 06 06
+ 06 06, where xx is the last octet of the MAC.
+
+ Note: With block ciphers in CBC mode (Cipher Block Chaining), it is
+ critical that the entire plaintext of the record be known before any
+ ciphertext is transmitted. Otherwise, it is possible for the attacker
+ to mount the attack described in [CBCATT].
+
+ Implementation Note: Canvel et al. [CBCTIME] have demonstrated a
+ timing attack on CBC padding based on the time required to compute
+ the MAC. In order to defend against this attack, implementations MUST
+ ensure that record processing time is essentially the same whether or
+ not the padding is correct. In general, the best way to do this is
+ to compute the MAC even if the padding is incorrect, and only then
+
+
+
+Dierks & Rescorla Standards Track [Page 23]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ reject the packet. For instance, if the pad appears to be incorrect,
+ the implementation might assume a zero-length pad and then compute
+ the MAC. This leaves a small timing channel, since MAC performance
+ depends to some extent on the size of the data fragment, but it is
+ not believed to be large enough to be exploitable, due to the large
+ block size of existing MACs and the small size of the timing signal.
+
+6.2.3.3. AEAD ciphers
+
+ For AEAD [AEAD] ciphers (such as [CCM] or [GCM]) the AEAD function
+ converts TLSCompressed.fragment structures to and from AEAD
+ TLSCiphertext.fragment structures.
+
+ struct {
+ opaque nonce_explicit[SecurityParameters.record_iv_length];
+ aead-ciphered struct {
+ opaque content[TLSCompressed.length];
+ };
+ } GenericAEADCipher;
+
+ AEAD ciphers take as input a single key, a nonce, a plaintext, and
+ "additional data" to be included in the authentication check, as
+ described in Section 2.1 of [AEAD]. The key is either the
+ client_write_key or the server_write_key. No MAC key is used.
+
+ Each AEAD cipher suite MUST specify how the nonce supplied to the
+ AEAD operation is constructed, and what is the length of the
+ GenericAEADCipher.nonce_explicit part. In many cases, it is
+ appropriate to use the partially implicit nonce technique described
+ in Section 3.2.1 of [AEAD]; with record_iv_length being the length of
+ the explicit part. In this case, the implicit part SHOULD be derived
+ from key_block as client_write_iv and server_write_iv (as described
+ in Section 6.3), and the explicit part is included in
+ GenericAEAEDCipher.nonce_explicit.
+
+ The plaintext is the TLSCompressed.fragment.
+
+ The additional authenticated data, which we denote as
+ additional_data, is defined as follows:
+
+ additional_data = seq_num + TLSCompressed.type +
+ TLSCompressed.version + TLSCompressed.length;
+
+ Where "+" denotes concatenation.
+
+ The aead_output consists of the ciphertext output by the AEAD
+ encryption operation. The length will generally be larger than
+ TLSCompressed.length, but by an amount that varies with the AEAD
+
+
+
+Dierks & Rescorla Standards Track [Page 24]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ cipher. Since the ciphers might incorporate padding, the amount of
+ overhead could vary with different TLSCompressed.length values. Each
+ AEAD cipher MUST NOT produce an expansion of greater than 1024 bytes.
+ Symbolically,
+
+ AEADEncrypted = AEAD-Encrypt(key, nonce, plaintext,
+ additional_data)
+
+ In order to decrypt and verify, the cipher takes as input the key,
+ nonce, the "additional_data", and the AEADEncrypted value. The output
+ is either the plaintext or an error indicating that the decryption
+ failed. There is no separate integrity check. I.e.,
+
+ TLSCompressed.fragment = AEAD-Decrypt(write_key, nonce,
+ AEADEncrypted,
+ additional_data)
+
+
+ If the decryption fails, a fatal bad_record_mac alert MUST be
+ generated.
+
+6.3. Key Calculation
+
+ The Record Protocol requires an algorithm to generate keys required
+ by the current connection state (see Appendix A.6) from the security
+ parameters provided by the handshake protocol.
+
+ The master secret is expanded into a sequence of secure bytes, which
+ is then split to a client write MAC key, a server write MAC key, a
+ client write encryption key, and a server write encryption key. Each
+ of these is generated from the byte sequence in that order. Unused
+ values are empty. Some AEAD ciphers may additionally require a
+ client write IV and a server write IV (see Section 6.2.3.3).
+
+ When keys and MAC keys are generated, the master secret is used as an
+ entropy source.
+
+ To generate the key material, compute
+
+ key_block = PRF(SecurityParameters.master_secret,
+ "key expansion",
+ SecurityParameters.server_random +
+ SecurityParameters.client_random);
+
+ until enough output has been generated. Then the key_block is
+ partitioned as follows:
+
+ client_write_MAC_key[SecurityParameters.mac_key_length]
+
+
+
+Dierks & Rescorla Standards Track [Page 25]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ server_write_MAC_key[SecurityParameters.mac_key_length]
+ client_write_key[SecurityParameters.enc_key_length]
+ server_write_key[SecurityParameters.enc_key_length]
+ client_write_IV[SecurityParameters.fixed_iv_length]
+ server_write_IV[SecurityParameters.fixed_iv_length]
+
+ Currently, the client_write_IV and server_write_IV are only generated
+ for implicit nonce techniques as described in Section 3.2.1 of
+ [AEAD].
+
+ Implementation note: The currently defined cipher suite which
+ requires the most material is AES_256_CBC_SHA256. It requires 2 x 32
+ byte keys and 2 x 32 byte MAC keys, for a total 128 bytes of key
+ material.
+
+7. The TLS Handshaking Protocols
+
+ TLS has three subprotocols that are used to allow peers to agree upon
+ security parameters for the record layer, to authenticate themselves,
+ to instantiate negotiated security parameters, and to report error
+ conditions to each other.
+
+ The Handshake Protocol is responsible for negotiating a session,
+ which consists of the following items:
+
+ session identifier
+ An arbitrary byte sequence chosen by the server to identify an
+ active or resumable session state.
+
+ peer certificate
+ X509v3 [PKIX] certificate of the peer. This element of the state
+ may be null.
+
+ compression method
+ The algorithm used to compress data prior to encryption.
+
+ cipher spec
+ Specifies the pseudorandom function (PRF) used to generate keying
+ material, the bulk data encryption algorithm (such as null, AES,
+ etc.) and a MAC algorithm (such as HMAC-SHA1). It also defines
+ cryptographic attributes such as the mac_length. (See Appendix A.6
+ for formal definition.)
+
+ master secret
+ 48-byte secret shared between the client and server.
+
+ is resumable
+ A flag indicating whether the session can be used to initiate new
+
+
+
+Dierks & Rescorla Standards Track [Page 26]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ connections.
+
+ These items are then used to create security parameters for use by
+ the Record Layer when protecting application data. Many connections
+ can be instantiated using the same session through the resumption
+ feature of the TLS Handshake Protocol.
+
+7.1. Change Cipher Spec Protocol
+
+ The change cipher spec protocol exists to signal transitions in
+ ciphering strategies. The protocol consists of a single message,
+ which is encrypted and compressed under the current (not the pending)
+ connection state. The message consists of a single byte of value 1.
+
+ struct {
+ enum { change_cipher_spec(1), (255) } type;
+ } ChangeCipherSpec;
+
+ The ChangeCipherSpec message is sent by both the client and the
+ server to notify the receiving party that subsequent records will be
+ protected under the newly negotiated CipherSpec and keys. Reception
+ of this message causes the receiver to instruct the Record Layer to
+ immediately copy the read pending state into the read current state.
+ Immediately after sending this message, the sender MUST instruct the
+ record layer to make the write pending state the write active state.
+ (See Section 6.1.) The change cipher spec message is sent during the
+ handshake after the security parameters have been agreed upon, but
+ before the verifying finished message is sent.
+
+ Note: If a rehandshake occurs while data is flowing on a connection,
+ the communicating parties may continue to send data using the old
+ CipherSpec. However, once the ChangeCipherSpec has been sent, the new
+ CipherSpec MUST be used. The first side to send the ChangeCipherSpec
+ does not know that the other side has finished computing the new
+ keying material (e.g., if it has to perform a time consuming public
+ key operation). Thus, a small window of time, during which the
+ recipient must buffer the data, MAY exist. In practice, with modern
+ machines this interval is likely to be fairly short.
+
+7.2. Alert Protocol
+
+ One of the content types supported by the TLS Record layer is the
+ alert type. Alert messages convey the severity of the message
+ (warning or fatal) and a description of the alert. Alert messages
+ with a level of fatal result in the immediate termination of the
+ connection. In this case, other connections corresponding to the
+ session may continue, but the session identifier MUST be invalidated,
+ preventing the failed session from being used to establish new
+
+
+
+Dierks & Rescorla Standards Track [Page 27]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ connections. Like other messages, alert messages are encrypted and
+ compressed, as specified by the current connection state.
+
+ enum { warning(1), fatal(2), (255) } AlertLevel;
+
+ enum {
+ close_notify(0),
+ unexpected_message(10),
+ bad_record_mac(20),
+ decryption_failed_RESERVED(21),
+ record_overflow(22),
+ decompression_failure(30),
+ handshake_failure(40),
+ no_certificate_RESERVED(41),
+ bad_certificate(42),
+ unsupported_certificate(43),
+ certificate_revoked(44),
+ certificate_expired(45),
+ certificate_unknown(46),
+ illegal_parameter(47),
+ unknown_ca(48),
+ access_denied(49),
+ decode_error(50),
+ decrypt_error(51),
+ export_restriction_RESERVED(60),
+ protocol_version(70),
+ insufficient_security(71),
+ internal_error(80),
+ user_canceled(90),
+ no_renegotiation(100),
+ unsupported_extension(110),
+ (255)
+ } AlertDescription;
+
+ struct {
+ AlertLevel level;
+ AlertDescription description;
+ } Alert;
+
+7.2.1. Closure Alerts
+
+ The client and the server must share knowledge that the connection is
+ ending in order to avoid a truncation attack. Either party may
+ initiate the exchange of closing messages.
+
+ close_notify
+ This message notifies the recipient that the sender will not send
+ any more messages on this connection. Note that as of TLS 1.1,
+
+
+
+Dierks & Rescorla Standards Track [Page 28]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ failure to properly close a connection no longer requires that a
+ session not be resumed. This is a change from TLS 1.0 to conform
+ with widespread implementation practice.
+
+ Either party may initiate a close by sending a close_notify alert.
+ Any data received after a closure alert is ignored.
+
+ Unless some other fatal alert has been transmitted, each party is
+ required to send a close_notify alert before closing the write side
+ of the connection. The other party MUST respond with a close_notify
+ alert of its own and close down the connection immediately,
+ discarding any pending writes. It is not required for the initiator
+ of the close to wait for the responding close_notify alert before
+ closing the read side of the connection.
+
+ If the application protocol using TLS provides that any data may be
+ carried over the underlying transport after the TLS connection is
+ closed, the TLS implementation must receive the responding
+ close_notify alert before indicating to the application layer that
+ the TLS connection has ended. If the application protocol will not
+ transfer any additional data, but will only close the underlying
+ transport connection, then the implementation MAY choose to close the
+ transport without waiting for the responding close_notify. No part of
+ this standard should be taken to dictate the manner in which a usage
+ profile for TLS manages its data transport, including when
+ connections are opened or closed.
+
+ Note: It is assumed that closing a connection reliably delivers
+ pending data before destroying the transport.
+
+7.2.2. Error Alerts
+
+ Error handling in the TLS Handshake protocol is very simple. When an
+ error is detected, the detecting party sends a message to the other
+ party. Upon transmission or receipt of a fatal alert message, both
+ parties immediately close the connection. Servers and clients MUST
+ forget any session-identifiers, keys, and secrets associated with a
+ failed connection. Thus, any connection terminated with a fatal alert
+ MUST NOT be resumed.
+
+ Whenever an implementation encounters a condition which is defined as
+ a fatal alert, it MUST send the appropriate alert prior to closing
+ the connection. For all errors where an alert level is not explicitly
+ specified, the sending party MAY determine at its discretion whether
+ to treat this as a fatal error or not. If the implementation chooses
+ to send an alert but intends to close the connection immediately
+ afterwards, it MUST send that alert at the fatal alert level.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 29]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ If an alert with a level of warning is sent and received, generally
+ the connection can continue normally. If the receiving party decides
+ not to proceed with the connection (e.g., after having received a
+ no_renegotiation alert that it is not willing to accept), it SHOULD
+ send a fatal alert to terminate the connection. Given this, the
+ sending party cannot, in general, know how the receiving party will
+ behave. Therefore, warning alerts are not very useful when the
+ sending party wants to continue the connection, and thus are
+ sometimes omitted. For example, if a peer decides to accept an
+ expired certificate (perhaps after confirming this with the user) and
+ wants to continue the connection, it would not generally send a
+ certificate_expired alert.
+
+ The following error alerts are defined:
+
+ unexpected_message
+ An inappropriate message was received. This alert is always fatal
+ and should never be observed in communication between proper
+ implementations.
+
+ bad_record_mac
+ This alert is returned if a record is received with an incorrect
+ MAC. This alert also MUST be returned if an alert is sent because
+ a TLSCiphertext decrypted in an invalid way: either it wasn't an
+ even multiple of the block length, or its padding values, when
+ checked, weren't correct. This message is always fatal and should
+ never be observed in communication between proper implementations
+ (except when messages were corrupted in the network).
+
+ decryption_failed_RESERVED
+ This alert was used in some earlier versions of TLS, and may have
+ permitted certain attacks against the CBC mode [CBCATT]. It MUST
+ NOT be sent by compliant implementations.
+
+ record_overflow
+ A TLSCiphertext record was received that had a length more than
+ 2^14+2048 bytes, or a record decrypted to a TLSCompressed record
+ with more than 2^14+1024 bytes. This message is always fatal and
+ should never be observed in communication between proper
+ implementations (except when messages were corrupted in the
+ network).
+
+ decompression_failure
+ The decompression function received improper input (e.g., data
+ that would expand to excessive length). This message is always
+ fatal and should never be observed in communication between proper
+ implementations.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 30]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ handshake_failure
+ Reception of a handshake_failure alert message indicates that the
+ sender was unable to negotiate an acceptable set of security
+ parameters given the options available. This is a fatal error.
+
+ no_certificate_RESERVED
+ This alert was used in SSLv3 but not any version of TLS. It MUST
+ NOT be sent by compliant implementations.
+
+ bad_certificate
+ A certificate was corrupt, contained signatures that did not
+ verify correctly, etc.
+
+ unsupported_certificate
+ A certificate was of an unsupported type.
+
+ certificate_revoked
+ A certificate was revoked by its signer.
+
+ certificate_expired
+ A certificate has expired or is not currently valid.
+
+ certificate_unknown
+ Some other (unspecified) issue arose in processing the
+ certificate, rendering it unacceptable.
+
+ illegal_parameter
+ A field in the handshake was out of range or inconsistent with
+ other fields. This message is always fatal.
+
+ unknown_ca
+ A valid certificate chain or partial chain was received, but the
+ certificate was not accepted because the CA certificate could not
+ be located or couldn't be matched with a known, trusted CA. This
+ message is always fatal.
+
+ access_denied
+ A valid certificate was received, but when access control was
+ applied, the sender decided not to proceed with negotiation. This
+ message is always fatal.
+
+ decode_error
+ A message could not be decoded because some field was out of the
+ specified range or the length of the message was incorrect. This
+ message is always fatal and should never be observed in
+ communication between proper implementations (except when messages
+ were corrupted in the network).
+
+
+
+
+Dierks & Rescorla Standards Track [Page 31]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ decrypt_error
+ A handshake cryptographic operation failed, including being unable
+ to correctly verify a signature or validate a finished message.
+ This message is always fatal.
+
+ export_restriction_RESERVED
+ This alert was used in some earlier versions of TLS. It MUST NOT
+ be sent by compliant implementations.
+
+ protocol_version
+ The protocol version the client has attempted to negotiate is
+ recognized but not supported. (For example, old protocol versions
+ might be avoided for security reasons). This message is always
+ fatal.
+
+ insufficient_security
+ Returned instead of handshake_failure when a negotiation has
+ failed specifically because the server requires ciphers more
+ secure than those supported by the client. This message is always
+ fatal.
+
+ internal_error
+ An internal error unrelated to the peer or the correctness of the
+ protocol (such as a memory allocation failure) makes it impossible
+ to continue. This message is always fatal.
+
+ user_canceled
+ This handshake is being canceled for some reason unrelated to a
+ protocol failure. If the user cancels an operation after the
+ handshake is complete, just closing the connection by sending a
+ close_notify is more appropriate. This alert should be followed by
+ a close_notify. This message is generally a warning.
+
+ no_renegotiation
+ Sent by the client in response to a hello request or by the server
+ in response to a client hello after initial handshaking. Either
+ of these would normally lead to renegotiation; when that is not
+ appropriate, the recipient should respond with this alert. At
+ that point, the original requester can decide whether to proceed
+ with the connection. One case where this would be appropriate is
+ where a server has spawned a process to satisfy a request; the
+ process might receive security parameters (key length,
+ authentication, etc.) at startup and it might be difficult to
+ communicate changes to these parameters after that point. This
+ message is always a warning.
+
+ unsupported_extension
+ sent by clients that receive an extended server hello containing
+
+
+
+Dierks & Rescorla Standards Track [Page 32]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ an extension that they did not put in the corresponding client
+ hello. This message is always fatal.
+
+ New Alert values are assigned by IANA as described in Section 12.
+
+7.3. Handshake Protocol Overview
+
+ The cryptographic parameters of the session state are produced by the
+ TLS Handshake Protocol, which operates on top of the TLS Record
+ Layer. When a TLS client and server first start communicating, they
+ agree on a protocol version, select cryptographic algorithms,
+ optionally authenticate each other, and use public-key encryption
+ techniques to generate shared secrets.
+
+ The TLS Handshake Protocol involves the following steps:
+
+ - Exchange hello messages to agree on algorithms, exchange random
+ values, and check for session resumption.
+
+ - Exchange the necessary cryptographic parameters to allow the
+ client and server to agree on a premaster secret.
+
+ - Exchange certificates and cryptographic information to allow the
+ client and server to authenticate themselves.
+
+ - Generate a master secret from the premaster secret and exchanged
+ random values.
+
+ - Provide security parameters to the record layer.
+
+ - Allow the client and server to verify that their peer has
+ calculated the same security parameters and that the handshake
+ occurred without tampering by an attacker.
+
+ Note that higher layers should not be overly reliant on whether TLS
+ always negotiates the strongest possible connection between two
+ peers. There are a number of ways in which a man in the middle
+ attacker can attempt to make two entities drop down to the least
+ secure method they support. The protocol has been designed to
+ minimize this risk, but there are still attacks available: for
+ example, an attacker could block access to the port a secure service
+ runs on, or attempt to get the peers to negotiate an unauthenticated
+ connection. The fundamental rule is that higher levels must be
+ cognizant of what their security requirements are and never transmit
+ information over a channel less secure than what they require. The
+ TLS protocol is secure in that any cipher suite offers its promised
+ level of security: if you negotiate 3DES with a 1024 bit RSA key
+ exchange with a host whose certificate you have verified, you can
+
+
+
+Dierks & Rescorla Standards Track [Page 33]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ expect to be that secure.
+
+ These goals are achieved by the handshake protocol, which can be
+ summarized as follows: The client sends a client hello message to
+ which the server must respond with a server hello message, or else a
+ fatal error will occur and the connection will fail. The client hello
+ and server hello are used to establish security enhancement
+ capabilities between client and server. The client hello and server
+ hello establish the following attributes: Protocol Version, Session
+ ID, Cipher Suite, and Compression Method. Additionally, two random
+ values are generated and exchanged: ClientHello.random and
+ ServerHello.random.
+
+ The actual key exchange uses up to four messages: the server
+ Certificate, the ServerKeyExchange, the client Certificate, and the
+ ClientKeyExchange. New key exchange methods can be created by
+ specifying a format for these messages and by defining the use of the
+ messages to allow the client and server to agree upon a shared
+ secret. This secret MUST be quite long; currently defined key
+ exchange methods exchange secrets that range from 46 bytes upwards.
+
+ Following the hello messages, the server will send its certificate in
+ a Certificate message if it is to be authenticated. Additionally, a
+ ServerKeyExchange message may be sent, if it is required (e.g., if
+ the server has no certificate, or if its certificate is for signing
+ only). If the server is authenticated, it may request a certificate
+ from the client, if that is appropriate to the cipher suite selected.
+ Next, the server will send the ServerHelloDone message, indicating
+ that the hello-message phase of the handshake is complete. The server
+ will then wait for a client response. If the server has sent a
+ CertificateRequest message, the client MUST send the Certificate
+ message. The ClientKeyExchange message is now sent, and the content
+ of that message will depend on the public key algorithm selected
+ between the client hello and the server hello. If the client has sent
+ a certificate with signing ability, a digitally-signed
+ CertificateVerify message is sent to explicitly verify possession of
+ the private key in the certificate.
+
+ At this point, a ChangeCipherSpec message is sent by the client, and
+ the client copies the pending Cipher Spec into the current Cipher
+ Spec. The client then immediately sends the Finished message under
+ the new algorithms, keys, and secrets. In response, the server will
+ send its own ChangeCipherSpec message, transfer the pending to the
+ current Cipher Spec, and send its Finished message under the new
+ Cipher Spec. At this point, the handshake is complete, and the client
+ and server may begin to exchange application layer data. (See flow
+ chart below.) Application data MUST NOT be sent prior to the
+ completion of the first handshake (before a cipher suite other than
+
+
+
+Dierks & Rescorla Standards Track [Page 34]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ TLS_NULL_WITH_NULL_NULL is established).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 35]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Client Server
+
+ ClientHello -------->
+ ServerHello
+ Certificate*
+ ServerKeyExchange*
+ CertificateRequest*
+ <-------- ServerHelloDone
+ Certificate*
+ ClientKeyExchange
+ CertificateVerify*
+ [ChangeCipherSpec]
+ Finished -------->
+ [ChangeCipherSpec]
+ <-------- Finished
+ Application Data <-------> Application Data
+
+ Fig. 1. Message flow for a full handshake
+
+ * Indicates optional or situation-dependent messages that are not
+ always sent.
+
+ Note: To help avoid pipeline stalls, ChangeCipherSpec is an
+ independent TLS Protocol content type, and is not actually a TLS
+ handshake message.
+
+ When the client and server decide to resume a previous session or
+ duplicate an existing session (instead of negotiating new security
+ parameters), the message flow is as follows:
+
+ The client sends a ClientHello using the Session ID of the session to
+ be resumed. The server then checks its session cache for a match. If
+ a match is found, and the server is willing to re-establish the
+ connection under the specified session state, it will send a
+ ServerHello with the same Session ID value. At this point, both
+ client and server MUST send ChangeCipherSpec messages and proceed
+ directly to Finished messages. Once the re-establishment is complete,
+ the client and server MAY begin to exchange application layer data.
+ (See flow chart below.) If a Session ID match is not found, the
+ server generates a new session ID and the TLS client and server
+ perform a full handshake.
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 36]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Client Server
+
+ ClientHello -------->
+ ServerHello
+ [ChangeCipherSpec]
+ <-------- Finished
+ [ChangeCipherSpec]
+ Finished -------->
+ Application Data <-------> Application Data
+
+ Fig. 2. Message flow for an abbreviated handshake
+
+ The contents and significance of each message will be presented in
+ detail in the following sections.
+
+7.4. Handshake Protocol
+
+ The TLS Handshake Protocol is one of the defined higher-level clients
+ of the TLS Record Protocol. This protocol is used to negotiate the
+ secure attributes of a session. Handshake messages are supplied to
+ the TLS Record Layer, where they are encapsulated within one or more
+ TLSPlaintext structures, which are processed and transmitted as
+ specified by the current active session state.
+
+ enum {
+ hello_request(0), client_hello(1), server_hello(2),
+ certificate(11), server_key_exchange (12),
+ certificate_request(13), server_hello_done(14),
+ certificate_verify(15), client_key_exchange(16),
+ finished(20), (255)
+ } HandshakeType;
+
+ struct {
+ HandshakeType msg_type; /* handshake type */
+ uint24 length; /* bytes in message */
+ select (HandshakeType) {
+ case hello_request: HelloRequest;
+ case client_hello: ClientHello;
+ case server_hello: ServerHello;
+ case certificate: Certificate;
+ case server_key_exchange: ServerKeyExchange;
+ case certificate_request: CertificateRequest;
+ case server_hello_done: ServerHelloDone;
+ case certificate_verify: CertificateVerify;
+ case client_key_exchange: ClientKeyExchange;
+ case finished: Finished;
+ } body;
+ } Handshake;
+
+
+
+Dierks & Rescorla Standards Track [Page 37]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ The handshake protocol messages are presented below in the order they
+ MUST be sent; sending handshake messages in an unexpected order
+ results in a fatal error. Unneeded handshake messages can be omitted,
+ however. Note one exception to the ordering: the Certificate message
+ is used twice in the handshake (from server to client, then from
+ client to server), but described only in its first position. The one
+ message that is not bound by these ordering rules is the HelloRequest
+ message, which can be sent at any time, but which SHOULD be ignored
+ by the client if it arrives in the middle of a handshake.
+
+ New Handshake message types are assigned by IANA as described in
+ Section 12.
+
+7.4.1. Hello Messages
+
+ The hello phase messages are used to exchange security enhancement
+ capabilities between the client and server. When a new session
+ begins, the Record Layer's connection state encryption, hash, and
+ compression algorithms are initialized to null. The current
+ connection state is used for renegotiation messages.
+
+7.4.1.1. Hello Request
+
+ When this message will be sent:
+
+ The HelloRequest message MAY be sent by the server at any time.
+
+ Meaning of this message:
+
+ HelloRequest is a simple notification that the client should begin
+ the negotiation process anew. In response, the client should a
+ ClientHello message when convenient. This message is not intended
+ to establish which side is the client or server but merely to
+ initiate a new negotiation. Servers SHOULD NOT send a HelloRequest
+ immediately upon the client's initial connection. It is the
+ client's job to send a ClientHello at that time.
+
+ This message will be ignored by the client if the client is
+ currently negotiating a session. This message MAY be ignored by
+ the client if it does not wish to renegotiate a session, or the
+ client may, if it wishes, respond with a no_renegotiation alert.
+ Since handshake messages are intended to have transmission
+ precedence over application data, it is expected that the
+ negotiation will begin before no more than a few records are
+ received from the client. If the server sends a HelloRequest but
+ does not receive a ClientHello in response, it may close the
+ connection with a fatal alert.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 38]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ After sending a HelloRequest, servers SHOULD NOT repeat the
+ request until the subsequent handshake negotiation is complete.
+
+ Structure of this message:
+
+ struct { } HelloRequest;
+
+ This message MUST NOT be included in the message hashes that are
+ maintained throughout the handshake and used in the finished messages
+ and the certificate verify message.
+
+7.4.1.2. Client Hello
+
+ When this message will be sent:
+
+ When a client first connects to a server it is required to send
+ the ClientHello as its first message. The client can also send a
+ ClientHello in response to a HelloRequest or on its own initiative
+ in order to renegotiate the security parameters in an existing
+ connection.
+
+ Structure of this message:
+
+ The ClientHello message includes a random structure, which is used
+ later in the protocol.
+
+ struct {
+ uint32 gmt_unix_time;
+ opaque random_bytes[28];
+ } Random;
+
+ gmt_unix_time
+ The current time and date in standard UNIX 32-bit format
+ (seconds since the midnight starting Jan 1, 1970, UTC, ignoring
+ leap seconds) according to the sender's internal clock. Clocks
+ are not required to be set correctly by the basic TLS Protocol;
+ higher-level or application protocols may define additional
+ requirements. Note that, for historical reasons, the data
+ element is named using GMT, the predecessor of the current
+ worldwide time base, UTC.
+
+ random_bytes
+ 28 bytes generated by a secure random number generator.
+
+ The ClientHello message includes a variable-length session
+ identifier. If not empty, the value identifies a session between the
+ same client and server whose security parameters the client wishes to
+ reuse. The session identifier MAY be from an earlier connection, this
+
+
+
+Dierks & Rescorla Standards Track [Page 39]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ connection, or from another currently active connection. The second
+ option is useful if the client only wishes to update the random
+ structures and derived values of a connection, and the third option
+ makes it possible to establish several independent secure connections
+ without repeating the full handshake protocol. These independent
+ connections may occur sequentially or simultaneously; a SessionID
+ becomes valid when the handshake negotiating it completes with the
+ exchange of Finished messages and persists until it is removed due to
+ aging or because a fatal error was encountered on a connection
+ associated with the session. The actual contents of the SessionID are
+ defined by the server.
+
+ opaque SessionID<0..32>;
+
+ Warning: Because the SessionID is transmitted without encryption or
+ immediate MAC protection, servers MUST NOT place confidential
+ information in session identifiers or let the contents of fake
+ session identifiers cause any breach of security. (Note that the
+ content of the handshake as a whole, including the SessionID, is
+ protected by the Finished messages exchanged at the end of the
+ handshake.)
+
+ The cipher suite list, passed from the client to the server in the
+ ClientHello message, contains the combinations of cryptographic
+ algorithms supported by the client in order of the client's
+ preference (favorite choice first). Each cipher suite defines a key
+ exchange algorithm, a bulk encryption algorithm (including secret key
+ length), a MAC algorithm, and a PRF. The server will select a cipher
+ suite or, if no acceptable choices are presented, return a handshake
+ failure alert and close the connection. If the list contains cipher
+ suites the server does not recognize, support, or wish to use, the
+ server MUST ignore those cipher suites, and process the remaining
+ ones as usual.
+
+ uint8 CipherSuite[2]; /* Cryptographic suite selector */
+
+ The ClientHello includes a list of compression algorithms supported
+ by the client, ordered according to the client's preference.
+
+ enum { null(0), (255) } CompressionMethod;
+
+ struct {
+ ProtocolVersion client_version;
+ Random random;
+ SessionID session_id;
+ CipherSuite cipher_suites<2..2^16-2>;
+ CompressionMethod compression_methods<1..2^8-1>;
+ select (extensions_present) {
+
+
+
+Dierks & Rescorla Standards Track [Page 40]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ case false:
+ struct {};
+ case true:
+ Extension extensions<0..2^16-1>;
+ };
+ } ClientHello;
+
+ TLS allows extensions to follow the compression_methods field in an
+ extensions block. The presence of extensions can be detected by
+ determining whether there are bytes following the compression_methods
+ at the end of the ClientHello. Note that this method of detecting
+ optional data differs from the normal TLS method of having a
+ variable-length field but is used for compatibility with TLS before
+ extensions were defined.
+
+ client_version
+ The version of the TLS protocol by which the client wishes to
+ communicate during this session. This SHOULD be the latest
+ (highest valued) version supported by the client. For this version
+ of the specification, the version will be 3.3 (See Appendix E for
+ details about backward compatibility).
+
+ random
+ A client-generated random structure.
+
+ session_id
+ The ID of a session the client wishes to use for this connection.
+ This field is empty if no session_id is available, or if the
+ client wishes to generate new security parameters.
+
+ cipher_suites
+ This is a list of the cryptographic options supported by the
+ client, with the client's first preference first. If the
+ session_id field is not empty (implying a session resumption
+ request), this vector MUST include at least the cipher_suite from
+ that session. Values are defined in Appendix A.5.
+
+ compression_methods
+ This is a list of the compression methods supported by the client,
+ sorted by client preference. If the session_id field is not empty
+ (implying a session resumption request), it MUST include the
+ compression_method from that session. This vector MUST contain,
+ and all implementations MUST support, CompressionMethod.null.
+ Thus, a client and server will always be able to agree on a
+ compression method.
+
+ extensions
+ Clients MAY request extended functionality from servers by sending
+
+
+
+Dierks & Rescorla Standards Track [Page 41]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ data in the extensions field. The actual "Extension" format is
+ defined in Section 7.4.1.4.
+
+ In the event that a client requests additional functionality using
+ extensions, and this functionality is not supplied by the server, the
+ client MAY abort the handshake. A server MUST accept client hello
+ messages both with and without the extensions field, and (as for all
+ other messages) MUST check that the amount of data in the message
+ precisely matches one of these formats; if not, then it MUST send a
+ fatal "decode_error" alert.
+
+ After sending the client hello message, the client waits for a
+ ServerHello message. Any other handshake message returned by the
+ server except for a HelloRequest is treated as a fatal error.
+
+7.4.1.3. Server Hello
+
+ When this message will be sent:
+
+ The server will send this message in response to a ClientHello
+ message when it was able to find an acceptable set of algorithms.
+ If it cannot find such a match, it will respond with a handshake
+ failure alert.
+
+ Structure of this message:
+
+ struct {
+ ProtocolVersion server_version;
+ Random random;
+ SessionID session_id;
+ CipherSuite cipher_suite;
+ CompressionMethod compression_method;
+ select (extensions_present) {
+ case false:
+ struct {};
+ case true:
+ Extension extensions<0..2^16-1>;
+ };
+ } ServerHello;
+
+ The presence of extensions can be detected by determining whether
+ there are bytes following the compression_method field at the end of
+ the ServerHello.
+
+ server_version
+ This field will contain the lower of that suggested by the client
+ in the client hello and the highest supported by the server. For
+ this version of the specification, the version is 3.3. (See
+
+
+
+Dierks & Rescorla Standards Track [Page 42]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Appendix E for details about backward compatibility.)
+
+ random
+ This structure is generated by the server and MUST be
+ independently generated from the ClientHello.random.
+
+ session_id
+ This is the identity of the session corresponding to this
+ connection. If the ClientHello.session_id was non-empty, the
+ server will look in its session cache for a match. If a match is
+ found and the server is willing to establish the new connection
+ using the specified session state, the server will respond with
+ the same value as was supplied by the client. This indicates a
+ resumed session and dictates that the parties must proceed
+ directly to the finished messages. Otherwise this field will
+ contain a different value identifying the new session. The server
+ may return an empty session_id to indicate that the session will
+ not be cached and therefore cannot be resumed. If a session is
+ resumed, it must be resumed using the same cipher suite it was
+ originally negotiated with. Note that there is no requirement that
+ the server resume any session even if it had formerly provided a
+ session_id. Clients MUST be prepared to do a full negotiation --
+ including negotiating new cipher suites -- during any handshake.
+
+ cipher_suite
+ The single cipher suite selected by the server from the list in
+ ClientHello.cipher_suites. For resumed sessions, this field is the
+ value from the state of the session being resumed.
+
+ compression_method
+ The single compression algorithm selected by the server from the
+ list in ClientHello.compression_methods. For resumed sessions this
+ field is the value from the resumed session state.
+
+ extensions
+ A list of extensions. Note that only extensions offered by the
+ client can appear in the server's list.
+
+7.4.1.4 Hello Extensions
+
+ The extension format is:
+
+ struct {
+ ExtensionType extension_type;
+ opaque extension_data<0..2^16-1>;
+ } Extension;
+
+ enum {
+
+
+
+Dierks & Rescorla Standards Track [Page 43]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ signature_algorithms(TBD-BY-IANA), (65535)
+ } ExtensionType;
+
+ Here:
+
+ - "extension_type" identifies the particular extension type.
+
+ - "extension_data" contains information specific to the particular
+ extension type.
+
+ The initial set of extensions is defined in a companion document
+ [TLSEXT]. The list of extension types is maintained by IANA as
+ described in Section 12.
+
+ There are subtle (and not so subtle) interactions that may occur in
+ this protocol between new features and existing features which may
+ result in a significant reduction in overall security. The following
+ considerations should be taken into account when designing new
+ extensions:
+
+ - Some cases where a server does not agree to an extension are error
+ conditions, and some simply a refusal to support a particular
+ feature. In general error alerts should be used for the former,
+ and a field in the server extension response for the latter.
+
+ - Extensions should as far as possible be designed to prevent any
+ attack that forces use (or non-use) of a particular feature by
+ manipulation of handshake messages. This principle should be
+ followed regardless of whether the feature is believed to cause a
+ security problem.
+
+ Often the fact that the extension fields are included in the
+ inputs to the Finished message hashes will be sufficient, but
+ extreme care is needed when the extension changes the meaning of
+ messages sent in the handshake phase. Designers and implementors
+ should be aware of the fact that until the handshake has been
+ authenticated, active attackers can modify messages and insert,
+ remove, or replace extensions.
+
+ - It would be technically possible to use extensions to change major
+ aspects of the design of TLS; for example the design of cipher
+ suite negotiation. This is not recommended; it would be more
+ appropriate to define a new version of TLS - particularly since
+ the TLS handshake algorithms have specific protection against
+ version rollback attacks based on the version number, and the
+ possibility of version rollback should be a significant
+ consideration in any major design change.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 44]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+7.4.1.4.1 Signature Algorithms
+
+ The client uses the "signature_algorithms" extension to indicate to
+ the server which signature/hash algorithm pairs may be used in
+ digital signatures. The "extension_data" field of this extension
+ contains a "supported_signature_algorithms" value.
+
+ enum {
+ none(0), md5(1), sha1(2), sha224(3), sha256(4), sha384(5),
+ sha512(6), (255)
+ } HashAlgorithm;
+
+ enum { anonymous(0), rsa(1), dsa(2), ecdsa(3), (255) }
+ SignatureAlgorithm;
+
+ struct {
+ HashAlgorithm hash;
+ SignatureAlgorithm signature;
+ } SignatureAndHashAlgorithm;
+
+ SignatureAndHashAlgorithm
+ supported_signature_algorithms<2..2^16-2>;
+
+ Each SignatureAndHashAlgorithm value lists a single hash/signature
+ pair which the client is willing to verify. The values are indicated
+ in descending order of preference.
+
+ Note: Because not all signature algorithms and hash algorithms may be
+ accepted by an implementation (e.g., DSA with SHA-1, but not
+ SHA-256), algorithms here are listed in pairs.
+
+ hash
+ This field indicates the hash algorithm which may be used. The
+ values indicate support for unhashed data, MD5 [MD5], SHA-1,
+ SHA-224, SHA-256, SHA-384, and SHA-512 [SHS] respectively. The
+ "none" value is provided for future extensibility, in case of a
+ signature algorithm which does not require hashing before signing.
+
+ signature
+ This field indicates the signature algorithm which may be used.
+ The values indicate anonymous signatures, RSASSA-PKCS1-v1_5
+ [PKCS1] and DSA [DSS], and ECDSA [ECDSA], respectively. The
+ "anonymous" value is meaningless in this context but used in
+ Section 7.4.3. It MUST NOT appear in this extension.
+
+ The semantics of this extension are somewhat complicated because the
+ cipher suite indicates permissible signature algorithms but not hash
+ algorithms. Sections 7.4.2 and 7.4.3 describe the appropriate rules.
+
+
+
+Dierks & Rescorla Standards Track [Page 45]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ If the client supports only the default hash and signature algorithms
+ (listed in this section), it MAY omit the signature_algorithms
+ extension. If the client does not support the default algorithms, or
+ supports other hash and signature algorithms (and it is willing to
+ use them for verifying messages sent by the server, i.e., server
+ certificates and server key exchange), it MUST send the
+ signature_algorithms extension, listing the algorithms it is willing
+ to accept.
+
+ If the client does not send the signature_algorithms extension, the
+ server MUST assume the following:
+
+ - If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
+ DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had sent
+ the value {sha1,rsa}.
+
+ - If the negotiated key exchange algorithm is one of (DHE_DSS,
+ DH_DSS), behave as if the client had sent the value {sha1,dsa}.
+
+ - If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
+ ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}.
+
+ Note: this is a change from TLS 1.1 where there are no explicit rules
+ but as a practical matter one can assume that the peer supports MD5
+ and SHA-1.
+
+ Note: this extension is not meaningful for TLS versions prior to 1.2.
+ Clients MUST NOT offer it if they are offering prior versions.
+ However, even if clients do offer it, the rules specified in [TLSEXT]
+ require servers to ignore extensions they do not understand.
+
+ Servers MUST NOT send this extension. TLS servers MUST support
+ receiving this extension.
+
+
+7.4.2. Server Certificate
+
+ When this message will be sent:
+
+ The server MUST send a Certificate message whenever the agreed-
+ upon key exchange method uses certificates for authentication
+ (this includes all key exchange methods defined in this document
+ except DH_anon). This message will always immediately follow the
+ server hello message.
+
+ Meaning of this message:
+
+ This message conveys the server's certificate chain to the client.
+
+
+
+Dierks & Rescorla Standards Track [Page 46]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ The certificate MUST be appropriate for the negotiated cipher
+ suite's key exchange algorithm, and any negotiated extensions.
+
+ Structure of this message:
+
+ opaque ASN.1Cert<1..2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+ certificate_list
+ This is a sequence (chain) of certificates. The sender's
+ certificate MUST come first in the list. Each following
+ certificate MUST directly certify the one preceding it. Because
+ certificate validation requires that root keys be distributed
+ independently, the self-signed certificate that specifies the root
+ certificate authority MAY be omitted from the chain, under the
+ assumption that the remote end must already possess it in order to
+ validate it in any case.
+
+ The same message type and structure will be used for the client's
+ response to a certificate request message. Note that a client MAY
+ send no certificates if it does not have an appropriate certificate
+ to send in response to the server's authentication request.
+
+ Note: PKCS #7 [PKCS7] is not used as the format for the certificate
+ vector because PKCS #6 [PKCS6] extended certificates are not used.
+ Also, PKCS #7 defines a SET rather than a SEQUENCE, making the task
+ of parsing the list more difficult.
+
+ The following rules apply to the certificates sent by the server:
+
+ - The certificate type MUST be X.509v3, unless explicitly negotiated
+ otherwise (e.g., [TLSPGP]).
+
+ - The end entity certificate's public key (and associated
+ restrictions) MUST be compatible with the selected key exchange
+ algorithm.
+
+ Key Exchange Alg. Certificate Key Type
+
+ RSA RSA public key; the certificate MUST
+ RSA_PSK allow the key to be used for encryption
+ (the keyEncipherment bit MUST be set
+ if the key usage extension is present).
+ Note: RSA_PSK is defined in [TLSPSK].
+
+
+
+
+Dierks & Rescorla Standards Track [Page 47]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ DHE_RSA RSA public key; the certificate MUST
+ ECDHE_RSA allow the key to be used for signing
+ (the digitalSignature bit MUST be set
+ if the key usage extension is present)
+ with the signature scheme and hash
+ algorithm that will be employed in the
+ server key exchange message.
+ Note: ECDHE_RSA is defined in [TLSECC].
+
+ DHE_DSS DSA public key; the certificate MUST
+ allow the key to be used for signing with
+ the hash algorithm that will be employed
+ in the server key exchange message.
+
+ DH_DSS Diffie-Hellman public key; the
+ DH_RSA keyAgreement bit MUST be set if the
+ key usage extension is present.
+
+ ECDH_ECDSA ECDH-capable public key; the public key
+ ECDH_RSA MUST use a curve and point format supported
+ by the client, as described in [TLSECC].
+
+ ECDHE_ECDSA ECDSA-capable public key; the certificate
+ MUST allow the key to be used for signing
+ with the hash algorithm that will be
+ employed in the server key exchange
+ message. The public key MUST use a curve
+ and point format supported by the client,
+ as described in [TLSECC].
+
+ - The "server_name" and "trusted_ca_keys" extensions [TLSEXT] are
+ used to guide certificate selection.
+
+ If the client provided a "signature_algorithms" extension, then all
+ certificates provided by the server MUST be signed by a
+ hash/signature algorithm pair that appears in that extension. Note
+ that this implies that a certificate containing a key for one
+ signature algorithm MAY be signed using a different signature
+ algorithm (for instance, an RSA key signed with a DSA key.) This is a
+ departure from TLS 1.1, which required that the algorithms be the
+ same. Note that this also implies that the DH_DSS, DH_RSA,
+ ECDH_ECDSA, and ECDH_RSA key exchange algorithms do not restrict the
+ algorithm used to sign the certificate. Fixed DH certificates MAY be
+ signed with any hash/signature algorithm pair appearing in the
+ extension. The names DH_DSS, DH_RSA, ECDH_ECDSA, and ECDH_RSA are
+ historical.
+
+ If the server has multiple certificates, it chooses one of them based
+
+
+
+Dierks & Rescorla Standards Track [Page 48]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ on the above-mentioned criteria (in addition to other criteria, such
+ as transport layer endpoint, local configuration and preferences,
+ etc.). If the server has a single certificate it SHOULD attempt to
+ validate that it meets these criteria.
+
+ Note that there are certificates that use algorithms and/or algorithm
+ combinations that cannot be currently used with TLS. For example, a
+ certificate with RSASSA-PSS signature key (id-RSASSA-PSS OID in
+ SubjectPublicKeyInfo) cannot be used because TLS defines no
+ corresponding signature algorithm.
+
+ As cipher suites that specify new key exchange methods are specified
+ for the TLS Protocol, they will the imply certificate format and the
+ required encoded keying information.
+
+7.4.3. Server Key Exchange Message
+
+ When this message will be sent:
+
+ This message will be sent immediately after the server Certificate
+ message (or the ServerHello message, if this is an anonymous
+ negotiation).
+
+ The ServerKeyExchange message is sent by the server only when the
+ server Certificate message (if sent) does not contain enough data
+ to allow the client to exchange a premaster secret. This is true
+ for the following key exchange methods:
+
+ DHE_DSS
+ DHE_RSA
+ DH_anon
+
+ It is not legal to send the ServerKeyExchange message for the
+ following key exchange methods:
+
+ RSA
+ DH_DSS
+ DH_RSA
+
+ Other key exchange algorithms, such as those defined in
+ [TLSECC], MUST specify whether the ServerKeyExchange message is
+ sent or not; and if the message is sent, its contents.
+
+ Meaning of this message:
+
+ This message conveys cryptographic information to allow the client
+ to communicate the premaster secret: a Diffie-Hellman public key
+ with which the client can complete a key exchange (with the result
+
+
+
+Dierks & Rescorla Standards Track [Page 49]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ being the premaster secret) or a public key for some other
+ algorithm.
+
+ Structure of this message:
+
+ enum { dhe_dss, dhe_rsa, dh_anon, rsa, dh_dss, dh_rsa
+ /* may be extended, e.g. for ECDH -- see [TLSECC] */
+ } KeyExchangeAlgorithm;
+
+ struct {
+ opaque dh_p<1..2^16-1>;
+ opaque dh_g<1..2^16-1>;
+ opaque dh_Ys<1..2^16-1>;
+ } ServerDHParams; /* Ephemeral DH parameters */
+
+ dh_p
+ The prime modulus used for the Diffie-Hellman operation.
+
+ dh_g
+ The generator used for the Diffie-Hellman operation.
+
+ dh_Ys
+ The server's Diffie-Hellman public value (g^X mod p).
+
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ case dh_anon:
+ ServerDHParams params;
+ case dhe_dss:
+ case dhe_rsa:
+ ServerDHParams params;
+ digitally-signed struct {
+ opaque client_random[32];
+ opaque server_random[32];
+ ServerDHParams params;
+ } signed_params;
+ case rsa:
+ case dh_dss:
+ case dh_rsa:
+ struct {} ;
+ /* message is omitted for rsa, dh_dss, and dh_rsa */
+ /* may be extended, e.g. for ECDH -- see [TLSECC] */
+ };
+ } ServerKeyExchange;
+
+ params
+ The server's key exchange parameters.
+
+
+
+Dierks & Rescorla Standards Track [Page 50]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ signed_params
+ For non-anonymous key exchanges, a signature over the
+ server's key exchange parameters.
+
+ If the client has offered the "signature_algorithms" extension, the
+ signature algorithm and hash algorithm MUST be a pair listed in that
+ extension. Note that there is a possibility for inconsistencies here.
+ For instance, the client might offer DHE_DSS key exchange but omit
+ any DSA pairs from its "signature_algorithms" extension. In order to
+ negotiate correctly, the server MUST check any candidate cipher
+ suites against the "signature_algorithms" extension before selecting
+ them. This is somewhat inelegant but is a compromise designed to
+ minimize changes to the original cipher suite design.
+
+ In addition, the hash and signature algorithms MUST be compatible
+ with the key in the server's end-entity certificate. RSA keys MAY be
+ used with any permitted hash algorithm, subject to restrictions in
+ the certificate, if any.
+
+ Because DSA signatures do not contain any secure indication of hash
+ algorithm, there is a risk of hash substitution if multiple hashes
+ may be used with any key. Currently, DSA [DSS] may only be used with
+ SHA-1. Future revisions of DSS [DSS-3] are expected to allow the use
+ of other digest algorithms with DSA, as well as guidance as to which
+ digest algorithms should be used with each key size. In addition,
+ future revisions of [PKIX] may specify mechanisms for certificates to
+ indicate which digest algorithms are to be used with DSA.
+
+ As additional cipher suites are defined for TLS that include new key
+ exchange algorithms, the server key exchange message will be sent if
+ and only if the certificate type associated with the key exchange
+ algorithm does not provide enough information for the client to
+ exchange a premaster secret.
+
+7.4.4. Certificate Request
+
+ When this message will be sent:
+
+ A non-anonymous server can optionally request a certificate from
+ the client, if appropriate for the selected cipher suite. This
+ message, if sent, will immediately follow the ServerKeyExchange
+ message (if it is sent; otherwise, the server's Certificate
+ message).
+
+ Structure of this message:
+
+ enum {
+ rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
+
+
+
+Dierks & Rescorla Standards Track [Page 51]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ rsa_ephemeral_dh_RESERVED(5), dss_ephemeral_dh_RESERVED(6),
+ fortezza_dms_RESERVED(20), (255)
+ } ClientCertificateType;
+
+ opaque DistinguishedName<1..2^16-1>;
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ SignatureAndHashAlgorithm
+ supported_signature_algorithms<2^16-1>;
+ DistinguishedName certificate_authorities<0..2^16-1>;
+ } CertificateRequest;
+
+ certificate_types
+ A list of the types of certificate types which the client may
+ offer.
+
+ rsa_sign a certificate containing an RSA key
+ dss_sign a certificate containing a DSA key
+ rsa_fixed_dh a certificate containing a static DH key.
+ dss_fixed_dh a certificate containing a static DH key
+
+ supported_signature_algorithms
+ A list of the hash/signature algorithm pairs that the server is
+ able to verify, listed in descending order of preference.
+
+ certificate_authorities
+ A list of the distinguished names [X501] of acceptable
+ certificate_authorities, represented in DER-encoded format. These
+ distinguished names may specify a desired distinguished name for a
+ root CA or for a subordinate CA; thus, this message can be used
+ both to describe known roots and a desired authorization space. If
+ the certificate_authorities list is empty then the client MAY send
+ any certificate of the appropriate ClientCertificateType, unless
+ there is some external arrangement to the contrary.
+
+ The interaction of the certificate_types and
+ supported_signature_algorithms fields is somewhat complicated.
+ certificate_types has been present in TLS since SSLv3, but was
+ somewhat underspecified. Much of its functionality is superseded by
+ supported_signature_algorithms. The following rules apply:
+
+ - Any certificates provided by the client MUST be signed using a
+ hash/signature algorithm pair found in
+ supported_signature_algorithms.
+
+ - The end-entity certificate provided by the client MUST contain a
+ key which is compatible with certificate_types. If the key is a
+
+
+
+Dierks & Rescorla Standards Track [Page 52]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ signature key, it MUST be usable with some hash/signature
+ algorithm pair in supported_signature_algorithms.
+
+ - For historical reasons, the names of some client certificate types
+ include the algorithm used to sign the certificate. For example,
+ in earlier versions of TLS, rsa_fixed_dh meant a certificate
+ signed with RSA and containing a static DH key. In TLS 1.2, this
+ functionality has been obsoleted by the
+ supported_signature_algorithms, and the certificate type no longer
+ restricts the algorithm used to sign the certificate. For
+ example, if the server sends dss_fixed_dh certificate type and
+ {{sha1, dsa}, {sha1, rsa}} signature types, the client MAY reply
+ with a certificate containing a static DH key, signed with RSA-
+ SHA1.
+
+ New ClientCertificateType values are assigned by IANA as described in
+ Section 12.
+
+ Note: Values listed as RESERVED may not be used. They were used in
+ SSLv3.
+
+ Note: It is a fatal handshake_failure alert for an anonymous server
+ to request client authentication.
+
+7.4.5 Server Hello Done
+
+ When this message will be sent:
+
+ The ServerHelloDone message is sent by the server to indicate the
+ end of the ServerHello and associated messages. After sending this
+ message, the server will wait for a client response.
+
+ Meaning of this message:
+
+ This message means that the server is done sending messages to
+ support the key exchange, and the client can proceed with its
+ phase of the key exchange.
+
+ Upon receipt of the ServerHelloDone message, the client SHOULD
+ verify that the server provided a valid certificate, if required,
+ and check that the server hello parameters are acceptable.
+
+ Structure of this message:
+
+ struct { } ServerHelloDone;
+
+7.4.6. Client Certificate
+
+
+
+
+Dierks & Rescorla Standards Track [Page 53]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ When this message will be sent:
+
+ This is the first message the client can send after receiving a
+ server hello done message. This message is only sent if the server
+ requests a certificate. If no suitable certificate is available,
+ the client MUST send a certificate message containing no
+ certificates. That is, the certificate_list structure has a length
+ of zero. If the client does not send any certificates, the server
+ MAY at its discretion either continue the handshake without client
+ authentication, or respond with a fatal handshake_failure alert.
+ Also, if some aspect of the certificate chain was unacceptable
+ (e.g., it was not signed by a known, trusted CA), the server MAY
+ at its discretion either continue the handshake (considering the
+ client unauthenticated) or send a fatal alert.
+
+ Client certificates are sent using the Certificate structure
+ defined in Section 7.4.2.
+
+ Meaning of this message:
+
+ This message conveys the client's certificate chain to the server;
+ the server will use it when verifying the CertificateVerify
+ message (when the client authentication is based on signing) or
+ calculating the premaster secret (for non-ephemeral Diffie-
+ Hellman). The certificate MUST be appropriate for the negotiated
+ cipher suite's key exchange algorithm, and any negotiated
+ extensions.
+
+ In particular:
+
+ - The certificate type MUST be X.509v3, unless explicitly negotiated
+ otherwise (e.g. [TLSPGP]).
+
+ - The end-entity certificate's public key (and associated
+ restrictions) has to be compatible with the certificate types
+ listed in CertificateRequest:
+
+ Client Cert. Type Certificate Key Type
+
+ rsa_sign RSA public key; the certificate MUST allow
+ the key to be used for signing with the
+ signature scheme and hash algorithm that
+ will be employed in the certificate verify
+ message.
+
+ dss_sign DSA public key; the certificate MUST allow
+ the key to be used for signing with the
+ hash algorithm that will be employed in
+
+
+
+Dierks & Rescorla Standards Track [Page 54]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ the certificate verify message.
+
+ ecdsa_sign ECDSA-capable public key; the certificate
+ MUST allow the key to be used for signing
+ with the hash algorithm that will be
+ employed in the certificate verify
+ message; the public key MUST use a
+ curve and point format supported by the
+ server.
+
+ rsa_fixed_dh Diffie-Hellman public key; MUST use
+ dss_fixed_dh the same parameters as server's key.
+
+ rsa_fixed_ecdh ECDH-capable public key; MUST use the
+ ecdsa_fixed_ecdh same curve as the server's key, and
+ MUST use a point format supported by
+ the server.
+
+ - If the certificate_authorities list in the certificate request
+ message was non-empty, one of the certificates in the certificate
+ chain SHOULD be issued by one of the listed CAs.
+
+ - The certificates MUST be signed using an acceptable hash/
+ signature algorithm pair, as described in Section 7.4.4. Note that
+ this relaxes the constraints on certificate signing algorithms
+ found in prior versions of TLS.
+
+ Note that as with the server certificate, there are certificates that
+ use algorithms/algorithm combinations that cannot be currently used
+ with TLS.
+
+7.4.7. Client Key Exchange Message
+
+ When this message will be sent:
+
+ This message is always sent by the client. It MUST immediately
+ follow the client certificate message, if it is sent. Otherwise it
+ MUST be the first message sent by the client after it receives the
+ server hello done message.
+
+ Meaning of this message:
+
+ With this message, the premaster secret is set, either through
+ direct transmission of the RSA-encrypted secret, or by the
+ transmission of Diffie-Hellman parameters that will allow each
+ side to agree upon the same premaster secret.
+
+ When the client is using an ephemeral Diffie-Hellman exponent,
+
+
+
+Dierks & Rescorla Standards Track [Page 55]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ then this message contains the client's Diffie-Hellman public
+ value. If the client is sending a certificate containing a static
+ DH exponent (i.e., it is doing fixed_dh client authentication)
+ then this message MUST be sent but MUST be empty.
+
+
+ Structure of this message:
+
+ The choice of messages depends on which key exchange method has
+ been selected. See Section 7.4.3 for the KeyExchangeAlgorithm
+ definition.
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ case rsa:
+ EncryptedPreMasterSecret;
+ case dhe_dss:
+ case dhe_rsa:
+ case dh_dss:
+ case dh_rsa:
+ case dh_anon:
+ ClientDiffieHellmanPublic;
+ } exchange_keys;
+ } ClientKeyExchange;
+
+7.4.7.1. RSA Encrypted Premaster Secret Message
+
+ Meaning of this message:
+
+ If RSA is being used for key agreement and authentication, the
+ client generates a 48-byte premaster secret, encrypts it using the
+ public key from the server's certificate and sends the result in
+ an encrypted premaster secret message. This structure is a variant
+ of the ClientKeyExchange message and is not a message in itself.
+
+ Structure of this message:
+
+ struct {
+ ProtocolVersion client_version;
+ opaque random[46];
+ } PreMasterSecret;
+
+ client_version
+ The latest (newest) version supported by the client. This is
+ used to detect version roll-back attacks.
+
+ random
+ 46 securely-generated random bytes.
+
+
+
+Dierks & Rescorla Standards Track [Page 56]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ struct {
+ public-key-encrypted PreMasterSecret pre_master_secret;
+ } EncryptedPreMasterSecret;
+
+ pre_master_secret
+ This random value is generated by the client and is used to
+ generate the master secret, as specified in Section 8.1.
+
+ Note: The version number in the PreMasterSecret is the version
+ offered by the client in the ClientHello.client_version, not the
+ version negotiated for the connection. This feature is designed to
+ prevent rollback attacks. Unfortunately, some old implementations
+ use the negotiated version instead and therefore checking the version
+ number may lead to failure to interoperate with such incorrect client
+ implementations.
+
+ Client implementations MUST always send the correct version number in
+ PreMasterSecret. If ClientHello.client_version is TLS 1.1 or higher,
+ server implementations MUST check the version number as described in
+ the note below. If the version number is TLS 1.0 or earlier, server
+ implementations SHOULD check the version number, but MAY have a
+ configuration option to disable the check. Note that if the check
+ fails, the PreMasterSecret SHOULD be randomized as described below.
+
+ Note: Attacks discovered by Bleichenbacher [BLEI] and Klima et al.
+ [KPR03] can be used to attack a TLS server that reveals whether a
+ particular message, when decrypted, is properly PKCS#1 formatted,
+ contains a valid PreMasterSecret structure, or has the correct
+ version number.
+
+ The best way to avoid these vulnerabilities is to treat incorrectly
+ formatted messages in a manner indistinguishable from correctly
+ formatted RSA blocks. In other words:
+
+ 1. Generate a string R of 46 random bytes
+
+ 2. Decrypt the message to recover the plaintext M
+
+ 3. If the PKCS#1 padding is not correct, or the length of
+ message M is not exactly 48 bytes:
+ premaster secret = ClientHello.client_version || R
+ else If ClientHello.client_version <= TLS 1.0, and
+ version number check is explicitly disabled:
+ premaster secret = M
+ else:
+ premaster secret = ClientHello.client_version || M[2..47]
+
+ Note that explicitly constructing the premaster_secret with the
+
+
+
+Dierks & Rescorla Standards Track [Page 57]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ ClientHello.client_version produces an invalid master_secret if the
+ client has sent the wrong version in the original premaster_secret.
+
+ In any case, a TLS server MUST NOT generate an alert if processing an
+ RSA-encrypted premaster secret message fails, or the version number
+ is not as expected. Instead, it MUST continue the handshake with a
+ randomly generated premaster secret. It may be useful to log the
+ real cause of failure for troubleshooting purposes; however, care
+ must be taken to avoid leaking the information to an attacker
+ (through, e.g., timing, log files, or other channels.)
+
+ The RSAES-OAEP encryption scheme defined in [PKCS1] is more secure
+ against the Bleichenbacher attack. However, for maximal compatibility
+ with earlier versions of TLS, this specification uses the RSAES-
+ PKCS1-v1_5 scheme. No variants of the Bleichenbacher attack are known
+ to exist provided that the above recommendations are followed.
+
+ Implementation Note: Public-key-encrypted data is represented as an
+ opaque vector <0..2^16-1> (see Section 4.7). Thus, the RSA-encrypted
+ PreMasterSecret in a ClientKeyExchange is preceded by two length
+ bytes. These bytes are redundant in the case of RSA because the
+ EncryptedPreMasterSecret is the only data in the ClientKeyExchange
+ and its length can therefore be unambiguously determined. The SSLv3
+ specification was not clear about the encoding of public-key-
+ encrypted data, and therefore many SSLv3 implementations do not
+ include the length bytes, encoding the RSA encrypted data directly in
+ the ClientKeyExchange message.
+
+ This specification requires correct encoding of the
+ EncryptedPreMasterSecret complete with length bytes. The resulting
+ PDU is incompatible with many SSLv3 implementations. Implementors
+ upgrading from SSLv3 MUST modify their implementations to generate
+ and accept the correct encoding. Implementors who wish to be
+ compatible with both SSLv3 and TLS should make their implementation's
+ behavior dependent on the protocol version.
+
+ Implementation Note: It is now known that remote timing-based attacks
+ on TLS are possible, at least when the client and server are on the
+ same LAN. Accordingly, implementations that use static RSA keys MUST
+ use RSA blinding or some other anti-timing technique, as described in
+ [TIMING].
+
+
+7.4.7.2. Client Diffie-Hellman Public Value
+
+ Meaning of this message:
+
+ This structure conveys the client's Diffie-Hellman public value
+
+
+
+Dierks & Rescorla Standards Track [Page 58]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ (Yc) if it was not already included in the client's certificate.
+ The encoding used for Yc is determined by the enumerated
+ PublicValueEncoding. This structure is a variant of the client key
+ exchange message, and not a message in itself.
+
+ Structure of this message:
+
+ enum { implicit, explicit } PublicValueEncoding;
+
+ implicit
+ If the client has sent a certificate which contains a suitable
+ Diffie-Hellman key (for fixed_dh client authentication) then Yc
+ is implicit and does not need to be sent again. In this case,
+ the client key exchange message will be sent, but it MUST be
+ empty.
+
+ explicit
+ Yc needs to be sent.
+
+ struct {
+ select (PublicValueEncoding) {
+ case implicit: struct { };
+ case explicit: opaque dh_Yc<1..2^16-1>;
+ } dh_public;
+ } ClientDiffieHellmanPublic;
+
+ dh_Yc
+ The client's Diffie-Hellman public value (Yc).
+
+7.4.8. Certificate verify
+
+ When this message will be sent:
+
+ This message is used to provide explicit verification of a client
+ certificate. This message is only sent following a client
+ certificate that has signing capability (i.e. all certificates
+ except those containing fixed Diffie-Hellman parameters). When
+ sent, it MUST immediately follow the client key exchange message.
+
+ Structure of this message:
+
+ struct {
+ digitally-signed struct {
+ opaque handshake_messages[handshake_messages_length];
+ }
+ } CertificateVerify;
+
+ Here handshake_messages refers to all handshake messages sent or
+
+
+
+Dierks & Rescorla Standards Track [Page 59]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ received starting at client hello up to but not including this
+ message, including the type and length fields of the handshake
+ messages. This is the concatenation of all the Handshake
+ structures as defined in 7.4 exchanged thus far. Note that this
+ requires both sides to either buffer the messages or compute
+ running hashes for all potential hash algorithms up to the time of
+ the CertificateVerify computation. Servers can minimize this
+ computation cost by offering a restricted set of digest algorithms
+ in the CertificateRequest message.
+
+ The hash and signature algorithms used in the signature MUST be
+ one of those present in the supported_signature_algorithms field
+ of the CertificateRequest message. In addition, the hash and
+ signature algorithms MUST be compatible with the key in the
+ client's end-entity certificate. RSA keys MAY be used with any
+ permitted hash algorithm, subject to restrictions in the
+ certificate, if any.
+
+ Because DSA signatures do not contain any secure indication of
+ hash algorithm, there is a risk of hash substitution if multiple
+ hashes may be used with any key. Currently, DSA [DSS] may only be
+ used with SHA-1. Future revisions of DSS [DSS-3] are expected to
+ allow the use of other digest algorithms with DSA, as well as
+ guidance as to which digest algorithms should be used with each
+ key size. In addition, future revisions of [PKIX] may specify
+ mechanisms for certificates to indicate which digest algorithms
+ are to be used with DSA.
+
+
+7.4.9. Finished
+
+ When this message will be sent:
+
+ A Finished message is always sent immediately after a change
+ cipher spec message to verify that the key exchange and
+ authentication processes were successful. It is essential that a
+ change cipher spec message be received between the other handshake
+ messages and the Finished message.
+
+ Meaning of this message:
+
+ The finished message is the first one protected with the just
+ negotiated algorithms, keys, and secrets. Recipients of finished
+ messages MUST verify that the contents are correct. Once a side
+ has sent its Finished message and received and validated the
+ Finished message from its peer, it may begin to send and receive
+ application data over the connection.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 60]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Structure of this message:
+
+ struct {
+ opaque verify_data[verify_data_length];
+ } Finished;
+
+ verify_data
+ PRF(master_secret, finished_label, Hash(handshake_messages))
+ [0..verify_data_length-1];
+
+ finished_label
+ For Finished messages sent by the client, the string "client
+ finished". For Finished messages sent by the server, the string
+ "server finished".
+
+ Hash denotes a Hash of the handshake messages. For the PRF defined
+ in Section 5, the Hash MUST be the Hash used as the basis for the
+ PRF. Any cipher suite which defines a different PRF MUST also
+ define the Hash to use in the Finished computation.
+
+ In previous versions of TLS, the verify_data was always 12 octets
+ long. In the current version of TLS, it depends on the cipher
+ suite. Any cipher suite which does not explicitly specify
+ verify_data_length has a verify_data_length equal to 12. This
+ includes all existing cipher suites. Note that this
+ representation has the same encoding as with previous versions.
+ Future cipher suites MAY specify other lengths but such length
+ MUST be at least 12 bytes.
+
+ handshake_messages
+ All of the data from all messages in this handshake (not
+ including any HelloRequest messages) up to but not including
+ this message. This is only data visible at the handshake layer
+ and does not include record layer headers. This is the
+ concatenation of all the Handshake structures as defined in
+ 7.4, exchanged thus far.
+
+ It is a fatal error if a finished message is not preceded by a
+ ChangeCipherSpec message at the appropriate point in the handshake.
+
+ The value handshake_messages includes all handshake messages starting
+ at ClientHello up to, but not including, this Finished message. This
+ may be different from handshake_messages in Section 7.4.8 because it
+ would include the CertificateVerify message (if sent). Also, the
+ handshake_messages for the Finished message sent by the client will
+ be different from that for the Finished message sent by the server,
+ because the one that is sent second will include the prior one.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 61]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Note: ChangeCipherSpec messages, alerts, and any other record types
+ are not handshake messages and are not included in the hash
+ computations. Also, HelloRequest messages are omitted from handshake
+ hashes.
+
+8. Cryptographic Computations
+
+ In order to begin connection protection, the TLS Record Protocol
+ requires specification of a suite of algorithms, a master secret, and
+ the client and server random values. The authentication, encryption,
+ and MAC algorithms are determined by the cipher_suite selected by the
+ server and revealed in the server hello message. The compression
+ algorithm is negotiated in the hello messages, and the random values
+ are exchanged in the hello messages. All that remains is to calculate
+ the master secret.
+
+8.1. Computing the Master Secret
+
+ For all key exchange methods, the same algorithm is used to convert
+ the pre_master_secret into the master_secret. The pre_master_secret
+ should be deleted from memory once the master_secret has been
+ computed.
+
+ master_secret = PRF(pre_master_secret, "master secret",
+ ClientHello.random + ServerHello.random)
+ [0..47];
+
+ The master secret is always exactly 48 bytes in length. The length of
+ the premaster secret will vary depending on key exchange method.
+
+8.1.1. RSA
+
+ When RSA is used for server authentication and key exchange, a
+ 48-byte pre_master_secret is generated by the client, encrypted under
+ the server's public key, and sent to the server. The server uses its
+ private key to decrypt the pre_master_secret. Both parties then
+ convert the pre_master_secret into the master_secret, as specified
+ above.
+
+8.1.2. Diffie-Hellman
+
+ A conventional Diffie-Hellman computation is performed. The
+ negotiated key (Z) is used as the pre_master_secret, and is converted
+ into the master_secret, as specified above. Leading bytes of Z that
+ contain all zero bits are stripped before it is used as the
+ pre_master_secret.
+
+ Note: Diffie-Hellman parameters are specified by the server and may
+
+
+
+Dierks & Rescorla Standards Track [Page 62]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ be either ephemeral or contained within the server's certificate.
+
+9. Mandatory Cipher Suites
+
+ In the absence of an application profile standard specifying
+ otherwise, a TLS compliant application MUST implement the cipher
+ suite TLS_RSA_WITH_AES_128_CBC_SHA (see Appendix A.5 for the
+ definition).
+
+10. Application Data Protocol
+
+ Application data messages are carried by the Record Layer and are
+ fragmented, compressed, and encrypted based on the current connection
+ state. The messages are treated as transparent data to the record
+ layer.
+
+11. Security Considerations
+
+ Security issues are discussed throughout this memo, especially in
+ Appendices D, E, and F.
+
+12. IANA Considerations
+
+ This document uses several registries that were originally created in
+ [TLS1.1]. IANA is requested to update (has updated) these to
+ reference this document. The registries and their allocation policies
+ (unchanged from [TLS1.1]) are listed below.
+
+ - TLS ClientCertificateType Identifiers Registry: Future values in
+ the range 0-63 (decimal) inclusive are assigned via Standards
+ Action [RFC2434]. Values in the range 64-223 (decimal) inclusive
+ are assigned Specification Required [RFC2434]. Values from 224-255
+ (decimal) inclusive are reserved for Private Use [RFC2434].
+
+ - TLS Cipher Suite Registry: Future values with the first byte in
+ the range 0-191 (decimal) inclusive are assigned via Standards
+ Action [RFC2434]. Values with the first byte in the range 192-254
+ (decimal) are assigned via Specification Required [RFC2434].
+ Values with the first byte 255 (decimal) are reserved for Private
+ Use [RFC2434].
+
+ - This document defines several new HMAC-SHA256 based cipher suites,
+ whose values (in Appendix A.5) are to be (have been) allocated
+ from the TLS Cipher Suite registry.
+
+ - TLS ContentType Registry: Future values are allocated via
+ Standards Action [RFC2434].
+
+
+
+
+Dierks & Rescorla Standards Track [Page 63]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ - TLS Alert Registry: Future values are allocated via Standards
+ Action [RFC2434].
+
+ - TLS HandshakeType Registry: Future values are allocated via
+ Standards Action [RFC2434].
+
+ This document also uses a registry originally created in [RFC4366].
+ IANA is requested to update (has updated) it to reference this
+ document. The registry and its allocation policy (unchanged from
+ [RFC4366]) is listed below:
+
+ - TLS ExtensionType Registry: Future values are allocated via IETF
+ Consensus [RFC2434]. IANA is requested to update this registry to
+ include the signature_algorithms extension and fill in the
+ appropriate value in Section 7.4.1.4.
+
+ In addition, this document defines two new registries to be
+ maintained by IANA:
+
+ - TLS SignatureAlgorithm Registry: The registry will be initially
+ populated with the values described in Section 7.4.1.4.1. Future
+ values in the range 0-63 (decimal) inclusive are assigned via
+ Standards Action [RFC2434]. Values in the range 64-223 (decimal)
+ inclusive are assigned via Specification Required [RFC2434].
+ Values from 224-255 (decimal) inclusive are reserved for Private
+ Use [RFC2434].
+
+ - TLS HashAlgorithm Registry: The registry will be initially
+ populated with the values described in Section 7.4.1.4.1. Future
+ values in the range 0-63 (decimal) inclusive are assigned via
+ Standards Action [RFC2434]. Values in the range 64-223 (decimal)
+ inclusive are assigned via Specification Required [RFC2434].
+ Values from 224-255 (decimal) inclusive are reserved for Private
+ Use [RFC2434].
+
+ This document also uses the TLS Compression Method Identifiers
+ Registry, defined in [RFC3749]. IANA is requested to allocate
+ value 0 for the "null" compression method.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 64]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Appendix A. Protocol Data Structures and Constant Values
+
+ This section describes protocol types and constants.
+
+A.1. Record Layer
+
+ struct {
+ uint8 major;
+ uint8 minor;
+ } ProtocolVersion;
+
+ ProtocolVersion version = { 3, 3 }; /* TLS v1.2*/
+
+ enum {
+ change_cipher_spec(20), alert(21), handshake(22),
+ application_data(23), (255)
+ } ContentType;
+
+ struct {
+ ContentType type;
+ ProtocolVersion version;
+ uint16 length;
+ opaque fragment[TLSPlaintext.length];
+ } TLSPlaintext;
+
+ struct {
+ ContentType type;
+ ProtocolVersion version;
+ uint16 length;
+ opaque fragment[TLSCompressed.length];
+ } TLSCompressed;
+
+ struct {
+ ContentType type;
+ ProtocolVersion version;
+ uint16 length;
+ select (SecurityParameters.cipher_type) {
+ case stream: GenericStreamCipher;
+ case block: GenericBlockCipher;
+ case aead: GenericAEADCipher;
+ } fragment;
+ } TLSCiphertext;
+
+ stream-ciphered struct {
+ opaque content[TLSCompressed.length];
+ opaque MAC[SecurityParameters.mac_length];
+ } GenericStreamCipher;
+
+
+
+
+Dierks & Rescorla Standards Track [Page 65]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ struct {
+ opaque IV[SecurityParameters.record_iv_length];
+ block-ciphered struct {
+ opaque content[TLSCompressed.length];
+ opaque MAC[SecurityParameters.mac_length];
+ uint8 padding[GenericBlockCipher.padding_length];
+ uint8 padding_length;
+ };
+ } GenericBlockCipher;
+
+ struct {
+ opaque nonce_explicit[SecurityParameters.record_iv_length];
+ aead-ciphered struct {
+ opaque content[TLSCompressed.length];
+ };
+ } GenericAEADCipher;
+A.2. Change Cipher Specs Message
+
+ struct {
+ enum { change_cipher_spec(1), (255) } type;
+ } ChangeCipherSpec;
+
+A.3. Alert Messages
+
+ enum { warning(1), fatal(2), (255) } AlertLevel;
+
+ enum {
+ close_notify(0),
+ unexpected_message(10),
+ bad_record_mac(20),
+ decryption_failed_RESERVED(21),
+ record_overflow(22),
+ decompression_failure(30),
+ handshake_failure(40),
+ no_certificate_RESERVED(41),
+ bad_certificate(42),
+ unsupported_certificate(43),
+ certificate_revoked(44),
+ certificate_expired(45),
+ certificate_unknown(46),
+ illegal_parameter(47),
+ unknown_ca(48),
+ access_denied(49),
+ decode_error(50),
+ decrypt_error(51),
+ export_restriction_RESERVED(60),
+ protocol_version(70),
+ insufficient_security(71),
+
+
+
+Dierks & Rescorla Standards Track [Page 66]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ internal_error(80),
+ user_canceled(90),
+ no_renegotiation(100),
+ unsupported_extension(110), /* new */
+ (255)
+ } AlertDescription;
+
+ struct {
+ AlertLevel level;
+ AlertDescription description;
+ } Alert;
+
+A.4. Handshake Protocol
+
+ enum {
+ hello_request(0), client_hello(1), server_hello(2),
+ certificate(11), server_key_exchange (12),
+ certificate_request(13), server_hello_done(14),
+ certificate_verify(15), client_key_exchange(16),
+ finished(20)
+ (255)
+ } HandshakeType;
+
+ struct {
+ HandshakeType msg_type;
+ uint24 length;
+ select (HandshakeType) {
+ case hello_request: HelloRequest;
+ case client_hello: ClientHello;
+ case server_hello: ServerHello;
+ case certificate: Certificate;
+ case server_key_exchange: ServerKeyExchange;
+ case certificate_request: CertificateRequest;
+ case server_hello_done: ServerHelloDone;
+ case certificate_verify: CertificateVerify;
+ case client_key_exchange: ClientKeyExchange;
+ case finished: Finished;
+ } body;
+ } Handshake;
+
+A.4.1. Hello Messages
+
+ struct { } HelloRequest;
+
+ struct {
+ uint32 gmt_unix_time;
+ opaque random_bytes[28];
+ } Random;
+
+
+
+Dierks & Rescorla Standards Track [Page 67]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ opaque SessionID<0..32>;
+
+ uint8 CipherSuite[2];
+
+ enum { null(0), (255) } CompressionMethod;
+
+ struct {
+ ProtocolVersion client_version;
+ Random random;
+ SessionID session_id;
+ CipherSuite cipher_suites<2..2^16-2>;
+ CompressionMethod compression_methods<1..2^8-1>;
+ select (extensions_present) {
+ case false:
+ struct {};
+ case true:
+ Extension extensions<0..2^16-1>;
+ };
+ } ClientHello;
+
+ struct {
+ ProtocolVersion server_version;
+ Random random;
+ SessionID session_id;
+ CipherSuite cipher_suite;
+ CompressionMethod compression_method;
+ select (extensions_present) {
+ case false:
+ struct {};
+ case true:
+ Extension extensions<0..2^16-1>;
+ };
+ } ServerHello;
+
+ struct {
+ ExtensionType extension_type;
+ opaque extension_data<0..2^16-1>;
+ } Extension;
+
+ enum {
+ signature_algorithms(TBD-BY-IANA), (65535)
+ } ExtensionType;
+
+ enum{
+ none(0), md5(1), sha1(2), sha224(3), sha256(4), sha384(5),
+ sha512(6), (255)
+ } HashAlgorithm;
+
+
+
+
+Dierks & Rescorla Standards Track [Page 68]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ enum {
+ anonymous(0), rsa(1), dsa(2), ecdsa(3), (255)
+ } SignatureAlgorithm;
+
+ struct {
+ HashAlgorithm hash;
+ SignatureAlgorithm signature;
+ } SignatureAndHashAlgorithm;
+
+ SignatureAndHashAlgorithm
+ supported_signature_algorithms<2..2^16-1>;
+
+A.4.2. Server Authentication and Key Exchange Messages
+
+ opaque ASN.1Cert<2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+ enum { dhe_dss, dhe_rsa, dh_anon, rsa,dh_dss, dh_rsa
+ /* may be extended, e.g. for ECDH -- see [TLSECC] */
+ } KeyExchangeAlgorithm;
+
+ struct {
+ opaque dh_p<1..2^16-1>;
+ opaque dh_g<1..2^16-1>;
+ opaque dh_Ys<1..2^16-1>;
+ } ServerDHParams; /* Ephemeral DH parameters */
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ case dh_anon:
+ ServerDHParams params;
+ case dhe_dss:
+ case dhe_rsa:
+ ServerDHParams params;
+ digitally-signed struct {
+ opaque client_random[32];
+ opaque server_random[32];
+ ServerDHParams params;
+ } signed_params;
+ case rsa:
+ case dh_dss:
+ case dh_rsa:
+ struct {} ;
+ /* message is omitted for rsa, dh_dss, and dh_rsa */
+ /* may be extended, e.g. for ECDH -- see [TLSECC] */
+
+
+
+Dierks & Rescorla Standards Track [Page 69]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ } ServerKeyExchange;
+
+
+ enum {
+ rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
+ rsa_ephemeral_dh_RESERVED(5), dss_ephemeral_dh_RESERVED(6),
+ fortezza_dms_RESERVED(20),
+ (255)
+ } ClientCertificateType;
+
+ opaque DistinguishedName<1..2^16-1>;
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ DistinguishedName certificate_authorities<0..2^16-1>;
+ } CertificateRequest;
+
+ struct { } ServerHelloDone;
+
+A.4.3. Client Authentication and Key Exchange Messages
+
+ struct {
+ select (KeyExchangeAlgorithm) {
+ case rsa:
+ EncryptedPreMasterSecret;
+ case dhe_dss:
+ case dhe_rsa:
+ case dh_dss:
+ case dh_rsa:
+ case dh_anon:
+ ClientDiffieHellmanPublic;
+ } exchange_keys;
+ } ClientKeyExchange;
+
+ struct {
+ ProtocolVersion client_version;
+ opaque random[46];
+ } PreMasterSecret;
+
+ struct {
+ public-key-encrypted PreMasterSecret pre_master_secret;
+ } EncryptedPreMasterSecret;
+
+ enum { implicit, explicit } PublicValueEncoding;
+
+ struct {
+ select (PublicValueEncoding) {
+ case implicit: struct {};
+
+
+
+Dierks & Rescorla Standards Track [Page 70]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ case explicit: opaque DH_Yc<1..2^16-1>;
+ } dh_public;
+ } ClientDiffieHellmanPublic;
+
+ struct {
+ digitally-signed struct {
+ opaque handshake_messages[handshake_messages_length];
+ }
+ } CertificateVerify;
+
+A.4.4. Handshake Finalization Message
+
+ struct {
+ opaque verify_data[verify_data_length];
+ } Finished;
+
+A.5. The Cipher Suite
+
+ The following values define the cipher suite codes used in the client
+ hello and server hello messages.
+
+ A cipher suite defines a cipher specification supported in TLS
+ Version 1.2.
+
+ TLS_NULL_WITH_NULL_NULL is specified and is the initial state of a
+ TLS connection during the first handshake on that channel, but MUST
+ NOT be negotiated, as it provides no more protection than an
+ unsecured connection.
+
+ CipherSuite TLS_NULL_WITH_NULL_NULL = { 0x00,0x00 };
+
+ The following CipherSuite definitions require that the server provide
+ an RSA certificate that can be used for key exchange. The server may
+ request any signature-capable certificate in the certificate request
+ message.
+
+ CipherSuite TLS_RSA_WITH_NULL_MD5 = { 0x00,0x01 };
+ CipherSuite TLS_RSA_WITH_NULL_SHA = { 0x00,0x02 };
+ CipherSuite TLS_RSA_WITH_NULL_SHA256 = { 0x00,TBD1 };
+ CipherSuite TLS_RSA_WITH_RC4_128_MD5 = { 0x00,0x04 };
+ CipherSuite TLS_RSA_WITH_RC4_128_SHA = { 0x00,0x05 };
+ CipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0A };
+ CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x2F };
+ CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x35 };
+ CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,TBD2 };
+ CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,TBD3 };
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 71]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ The following cipher suite definitions are used for server-
+ authenticated (and optionally client-authenticated) Diffie-Hellman.
+ DH denotes cipher suites in which the server's certificate contains
+ the Diffie-Hellman parameters signed by the certificate authority
+ (CA). DHE denotes ephemeral Diffie-Hellman, where the Diffie-Hellman
+ parameters are signed by a signature-capable certificate, which has
+ been signed by the CA. The signing algorithm used by the server is
+ specified after the DHE component of the CipherSuite name. The server
+ can request any signature-capable certificate from the client for
+ client authentication or it may request a Diffie-Hellman certificate.
+ Any Diffie-Hellman certificate provided by the client must use the
+ parameters (group and generator) described by the server.
+
+
+ CipherSuite TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0D };
+ CipherSuite TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x10 };
+ CipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x13 };
+ CipherSuite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x16 };
+ CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA = { 0x00,0x30 };
+ CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x31 };
+ CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = { 0x00,0x32 };
+ CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = { 0x00,0x33 };
+ CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA = { 0x00,0x36 };
+ CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x37 };
+ CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = { 0x00,0x38 };
+ CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = { 0x00,0x39 };
+ CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = { 0x00,TBD4 };
+ CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,TBD5 };
+ CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = { 0x00,TBD6 };
+ CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = { 0x00,TBD7 };
+ CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = { 0x00,TBD8 };
+ CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,TBD9 };
+ CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = { 0x00,TBDA };
+ CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = { 0x00,TBDB };
+
+ The following cipher suites are used for completely anonymous Diffie-
+ Hellman communications in which neither party is authenticated. Note
+ that this mode is vulnerable to man-in-the-middle attacks. Using
+ this mode therefore is of limited use: These cipher suites MUST NOT
+ be used by TLS 1.2 implementations unless the application layer has
+ specifically requested to allow anonymous key exchange. (Anonymous
+ key exchange may sometimes be acceptable, for example, to support
+ opportunistic encryption when no set-up for authentication is in
+ place, or when TLS is used as part of more complex security protocols
+ that have other means to ensure authentication.)
+
+ CipherSuite TLS_DH_anon_WITH_RC4_128_MD5 = { 0x00,0x18 };
+ CipherSuite TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = { 0x00,0x1B };
+
+
+
+Dierks & Rescorla Standards Track [Page 72]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA = { 0x00,0x34 };
+ CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA = { 0x00,0x3A };
+ CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA256 = { 0x00,TBDC};
+ CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA256 = { 0x00,TBDD};
+
+ Note that using non-anonymous key exchange without actually verifying
+ the key exchange is essentially equivalent to anonymous key exchange,
+ and the same precautions apply. While non-anonymous key exchange
+ will generally involve a higher computational and communicational
+ cost than anonymous key exchange, it may be in the interest of
+ interoperability not to disable non-anonymous key exchange when the
+ application layer is allowing anonymous key exchange.
+
+ New cipher suite values are assigned by IANA as described in Section
+ 12.
+
+ Note: The cipher suite values { 0x00, 0x1C } and { 0x00, 0x1D } are
+ reserved to avoid collision with Fortezza-based cipher suites in SSL
+ 3.
+
+A.6. The Security Parameters
+
+ These security parameters are determined by the TLS Handshake
+ Protocol and provided as parameters to the TLS Record Layer in order
+ to initialize a connection state. SecurityParameters includes:
+
+ enum { null(0), (255) } CompressionMethod;
+
+ enum { server, client } ConnectionEnd;
+
+ enum { tls_prf_sha256 } PRFAlgorithm;
+
+ enum { null, rc4, 3des, aes }
+ BulkCipherAlgorithm;
+
+ enum { stream, block, aead } CipherType;
+
+ enum { null, hmac_md5, hmac_sha1, hmac_sha256, hmac_sha384,
+ hmac_sha512} MACAlgorithm;
+
+ /* The algorithms specified in CompressionMethod, PRFAlgorithm
+ BulkCipherAlgorithm, and MACAlgorithm may be added to. */
+
+ struct {
+ ConnectionEnd entity;
+ PRFAlgorithm prf_algorithm;
+ BulkCipherAlgorithm bulk_cipher_algorithm;
+ CipherType cipher_type;
+
+
+
+Dierks & Rescorla Standards Track [Page 73]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ uint8 enc_key_length;
+ uint8 block_length;
+ uint8 fixed_iv_length;
+ uint8 record_iv_length;
+ MACAlgorithm mac_algorithm;
+ uint8 mac_length;
+ uint8 mac_key_length;
+ CompressionMethod compression_algorithm;
+ opaque master_secret[48];
+ opaque client_random[32];
+ opaque server_random[32];
+ } SecurityParameters;
+
+A.7. Changes to RFC 4492
+
+ RFC 4492 [TLSECC] adds Elliptic Curve cipher suites to TLS. This
+ document changes some of the structures used in that document. This
+ section details the required changes for implementors of both RFC
+ 4492 and TLS 1.2. Implementors of TLS 1.2 who are not implementing
+ RFC 4492 do not need to read this section.
+
+ This document adds a "signature_algorithm" field to the digitally-
+ signed element in order to identify the signature and digest
+ algorithms used to create a signature. This change applies to digital
+ signatures formed using ECDSA as well, thus allowing ECDSA signatures
+ to be used with digest algorithms other than SHA-1, provided such use
+ is compatible with the certificate and any restrictions imposed by
+ future revisions of [PKIX].
+
+ As described in Sections 7.4.2 and 7.4.6, the restrictions on the
+ signature algorithms used to sign certificates are no longer tied to
+ the cipher suite (when used by the server) or the
+ ClientCertificateType (when used by the client). Thus, the
+ restrictions on the algorithm used to sign certificates specified in
+ Sections 2 and 3 of RFC 4492 are also relaxed. As in this document
+ the restrictions on the keys in the end-entity certificate remain.
+
+Appendix B. Glossary
+
+ Advanced Encryption Standard (AES)
+ AES [AES] is a widely used symmetric encryption algorithm. AES is
+ a block cipher with a 128, 192, or 256 bit keys and a 16 byte
+ block size. TLS currently only supports the 128 and 256 bit key
+ sizes.
+
+ application protocol
+ An application protocol is a protocol that normally layers
+ directly on top of the transport layer (e.g., TCP/IP). Examples
+
+
+
+Dierks & Rescorla Standards Track [Page 74]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ include HTTP, TELNET, FTP, and SMTP.
+
+ asymmetric cipher
+ See public key cryptography.
+
+ authenticated encryption with additional data (AEAD)
+ A symmetric encryption algorithm that simultaneously provides
+ confidentiality and message integrity.
+
+ authentication
+ Authentication is the ability of one entity to determine the
+ identity of another entity.
+
+ block cipher
+ A block cipher is an algorithm that operates on plaintext in
+ groups of bits, called blocks. 64 bits was, and 128 bits, is a
+ common block size.
+
+ bulk cipher
+ A symmetric encryption algorithm used to encrypt large quantities
+ of data.
+
+ cipher block chaining (CBC)
+ CBC is a mode in which every plaintext block encrypted with a
+ block cipher is first exclusive-ORed with the previous ciphertext
+ block (or, in the case of the first block, with the initialization
+ vector). For decryption, every block is first decrypted, then
+ exclusive-ORed with the previous ciphertext block (or IV).
+
+ certificate
+ As part of the X.509 protocol (a.k.a. ISO Authentication
+ framework), certificates are assigned by a trusted Certificate
+ Authority and provide a strong binding between a party's identity
+ or some other attributes and its public key.
+
+ client
+ The application entity that initiates a TLS connection to a
+ server. This may or may not imply that the client initiated the
+ underlying transport connection. The primary operational
+ difference between the server and client is that the server is
+ generally authenticated, while the client is only optionally
+ authenticated.
+
+ client write key
+ The key used to encrypt data written by the client.
+
+ client write MAC key
+ The secret data used to authenticate data written by the client.
+
+
+
+Dierks & Rescorla Standards Track [Page 75]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ connection
+ A connection is a transport (in the OSI layering model definition)
+ that provides a suitable type of service. For TLS, such
+ connections are peer-to-peer relationships. The connections are
+ transient. Every connection is associated with one session.
+
+ Data Encryption Standard
+ DES [DES] still is a very widely used symmetric encryption
+ algorithm although it is considered as rather weak now. DES is a
+ block cipher with a 56-bit key and an 8-byte block size. Note that
+ in TLS, for key generation purposes, DES is treated as having an
+ 8-byte key length (64 bits), but it still only provides 56 bits of
+ protection. (The low bit of each key byte is presumed to be set to
+ produce odd parity in that key byte.) DES can also be operated in
+ a mode [3DES] where three independent keys and three encryptions
+ are used for each block of data; this uses 168 bits of key (24
+ bytes in the TLS key generation method) and provides the
+ equivalent of 112 bits of security.
+
+ Digital Signature Standard (DSS)
+ A standard for digital signing, including the Digital Signing
+ Algorithm, approved by the National Institute of Standards and
+ Technology, defined in NIST FIPS PUB 186-2, "Digital Signature
+ Standard", published January 2000 by the U.S. Dept. of Commerce
+ [DSS]. A significant update [DSS-3] has been drafted and
+ published in March 2006.
+
+
+ digital signatures
+ Digital signatures utilize public key cryptography and one-way
+ hash functions to produce a signature of the data that can be
+ authenticated, and is difficult to forge or repudiate.
+
+ handshake
+ An initial negotiation between client and server that establishes
+ the parameters of their transactions.
+
+ Initialization Vector (IV)
+ When a block cipher is used in CBC mode, the initialization vector
+ is exclusive-ORed with the first plaintext block prior to
+ encryption.
+
+ Message Authentication Code (MAC)
+ A Message Authentication Code is a one-way hash computed from a
+ message and some secret data. It is difficult to forge without
+ knowing the secret data. Its purpose is to detect if the message
+ has been altered.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 76]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ master secret
+ Secure secret data used for generating encryption keys, MAC
+ secrets, and IVs.
+
+ MD5
+ MD5 [MD5] is a hashing function that converts an arbitrarily long
+ data stream into a hash of fixed size (16 bytes). Due to
+ significant progresses in cryptanalysis, at the time of
+ publication of this document, MD5 no longer can be considered a
+ 'secure' hashing function.
+
+ public key cryptography
+ A class of cryptographic techniques employing two-key ciphers.
+ Messages encrypted with the public key can only be decrypted with
+ the associated private key. Conversely, messages signed with the
+ private key can be verified with the public key.
+
+ one-way hash function
+ A one-way transformation that converts an arbitrary amount of data
+ into a fixed-length hash. It is computationally hard to reverse
+ the transformation or to find collisions. MD5 and SHA are examples
+ of one-way hash functions.
+
+ RC4
+ A stream cipher invented by Ron Rivest. A compatible cipher is
+ described in [SCH].
+
+ RSA
+ A very widely used public-key algorithm that can be used for
+ either encryption or digital signing. [RSA]
+
+ server
+ The server is the application entity that responds to requests for
+ connections from clients. See also under client.
+
+ session
+ A TLS session is an association between a client and a server.
+ Sessions are created by the handshake protocol. Sessions define a
+ set of cryptographic security parameters that can be shared among
+ multiple connections. Sessions are used to avoid the expensive
+ negotiation of new security parameters for each connection.
+
+ session identifier
+ A session identifier is a value generated by a server that
+ identifies a particular session.
+
+ server write key
+ The key used to encrypt data written by the server.
+
+
+
+Dierks & Rescorla Standards Track [Page 77]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ server write MAC key
+ The secret data used to authenticate data written by the server.
+
+ SHA
+ The Secure Hash Algorithm [SHS] is defined in FIPS PUB 180-2. It
+ produces a 20-byte output. Note that all references to SHA
+ (without a numerical suffix) actually use the modified SHA-1
+ algorithm.
+
+ SHA-256
+ The 256-bit Secure Hash Algorithm is defined in FIPS PUB 180-2. It
+ produces a 32-byte output.
+
+ SSL
+ Netscape's Secure Socket Layer protocol [SSL3]. TLS is based on
+ SSL Version 3.0
+
+ stream cipher
+ An encryption algorithm that converts a key into a
+ cryptographically strong keystream, which is then exclusive-ORed
+ with the plaintext.
+
+ symmetric cipher
+ See bulk cipher.
+
+ Transport Layer Security (TLS)
+ This protocol; also, the Transport Layer Security working group of
+ the Internet Engineering Task Force (IETF). See "Comments" at the
+ end of this document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 78]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Appendix C. Cipher Suite Definitions
+
+Cipher Suite Key Cipher Mac
+ Exchange
+
+TLS_NULL_WITH_NULL_NULL NULL NULL NULL
+TLS_RSA_WITH_NULL_MD5 RSA NULL MD5
+TLS_RSA_WITH_NULL_SHA RSA NULL SHA
+TLS_RSA_WITH_NULL_SHA256 RSA NULL SHA256
+TLS_RSA_WITH_RC4_128_MD5 RSA RC4_128 MD5
+TLS_RSA_WITH_RC4_128_SHA RSA RC4_128 SHA
+TLS_RSA_WITH_3DES_EDE_CBC_SHA RSA 3DES_EDE_CBC SHA
+TLS_RSA_WITH_AES_128_CBC_SHA RSA AES_128_CBC SHA
+TLS_RSA_WITH_AES_256_CBC_SHA RSA AES_256_CBC SHA
+TLS_RSA_WITH_AES_128_CBC_SHA256 RSA AES_128_CBC SHA256
+TLS_RSA_WITH_AES_256_CBC_SHA256 RSA AES_256_CBC SHA256
+TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA DH_DSS 3DES_EDE_CBC SHA
+TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA DH_RSA 3DES_EDE_CBC SHA
+TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA DHE_DSS 3DES_EDE_CBC SHA
+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA DHE_RSA 3DES_EDE_CBC SHA
+TLS_DH_anon_WITH_RC4_128_MD5 DH_anon RC4_128 MD5
+TLS_DH_anon_WITH_3DES_EDE_CBC_SHA DH_anon 3DES_EDE_CBC SHA
+TLS_DH_DSS_WITH_AES_128_CBC_SHA DH_DSS AES_128_CBC SHA
+TLS_DH_RSA_WITH_AES_128_CBC_SHA DH_RSA AES_128_CBC SHA
+TLS_DHE_DSS_WITH_AES_128_CBC_SHA DHE_DSS AES_128_CBC SHA
+TLS_DHE_RSA_WITH_AES_128_CBC_SHA DHE_RSA AES_128_CBC SHA
+TLS_DH_anon_WITH_AES_128_CBC_SHA DH_anon AES_128_CBC SHA
+TLS_DH_DSS_WITH_AES_256_CBC_SHA DH_DSS AES_256_CBC SHA
+TLS_DH_RSA_WITH_AES_256_CBC_SHA DH_RSA AES_256_CBC SHA
+TLS_DHE_DSS_WITH_AES_256_CBC_SHA DHE_DSS AES_256_CBC SHA
+TLS_DHE_RSA_WITH_AES_256_CBC_SHA DHE_RSA AES_256_CBC SHA
+TLS_DH_anon_WITH_AES_256_CBC_SHA DH_anon AES_256_CBC SHA
+TLS_DH_DSS_WITH_AES_128_CBC_SHA256 DH_DSS AES_128_CBC SHA256
+TLS_DH_RSA_WITH_AES_128_CBC_SHA256 DH_RSA AES_128_CBC SHA256
+TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 DHE_DSS AES_128_CBC SHA256
+TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 DHE_RSA AES_128_CBC SHA256
+TLS_DH_anon_WITH_AES_128_CBC_SHA256 DH_anon AES_128_CBC SHA256
+TLS_DH_DSS_WITH_AES_256_CBC_SHA256 DH_DSS AES_256_CBC SHA256
+TLS_DH_RSA_WITH_AES_256_CBC_SHA256 DH_RSA AES_256_CBC SHA256
+TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 DHE_DSS AES_256_CBC SHA256
+TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 DHE_RSA AES_256_CBC SHA256
+TLS_DH_anon_WITH_AES_256_CBC_SHA256 DH_anon AES_256_CBC SHA256
+
+
+ Key IV Block
+Cipher Type Material Size Size
+------------ ------ -------- ---- -----
+NULL Stream 0 0 N/A
+
+
+
+Dierks & Rescorla Standards Track [Page 79]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+RC4_128 Stream 16 0 N/A
+3DES_EDE_CBC Block 24 8 8
+AES_128_CBC Block 16 16 16
+AES_256_CBC Block 32 16 16
+
+
+MAC Algorithm mac_length mac_key_length
+-------- ----------- ---------- --------------
+NULL N/A 0 0
+MD5 HMAC-MD5 16 16
+SHA HMAC-SHA1 20 20
+SHA256 HMAC-SHA256 32 32
+
+ Type
+ Indicates whether this is a stream cipher or a block cipher
+ running in CBC mode.
+
+ Key Material
+ The number of bytes from the key_block that are used for
+ generating the write keys.
+
+ Expanded Key Material
+ The number of bytes actually fed into the encryption algorithm.
+
+ IV Size
+ The amount of data needed to be generated for the initialization
+ vector. Zero for stream ciphers; equal to the block size for block
+ ciphers (this is equal to SecurityParameters.record_iv_length).
+
+ Block Size
+ The amount of data a block cipher enciphers in one chunk; a block
+ cipher running in CBC mode can only encrypt an even multiple of
+ its block size.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 80]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Appendix D. Implementation Notes
+
+ The TLS protocol cannot prevent many common security mistakes. This
+ section provides several recommendations to assist implementors.
+
+D.1 Random Number Generation and Seeding
+
+ TLS requires a cryptographically secure pseudorandom number generator
+ (PRNG). Care must be taken in designing and seeding PRNGs. PRNGs
+ based on secure hash operations, most notably SHA-1, are acceptable,
+ but cannot provide more security than the size of the random number
+ generator state.
+
+ To estimate the amount of seed material being produced, add the
+ number of bits of unpredictable information in each seed byte. For
+ example, keystroke timing values taken from a PC compatible's 18.2 Hz
+ timer provide 1 or 2 secure bits each, even though the total size of
+ the counter value is 16 bits or more. Seeding a 128-bit PRNG would
+ thus require approximately 100 such timer values.
+
+ [RANDOM] provides guidance on the generation of random values.
+
+D.2 Certificates and Authentication
+
+ Implementations are responsible for verifying the integrity of
+ certificates and should generally support certificate revocation
+ messages. Certificates should always be verified to ensure proper
+ signing by a trusted Certificate Authority (CA). The selection and
+ addition of trusted CAs should be done very carefully. Users should
+ be able to view information about the certificate and root CA.
+
+D.3 Cipher Suites
+
+ TLS supports a range of key sizes and security levels, including some
+ that provide no or minimal security. A proper implementation will
+ probably not support many cipher suites. For instance, anonymous
+ Diffie-Hellman is strongly discouraged because it cannot prevent man-
+ in-the-middle attacks. Applications should also enforce minimum and
+ maximum key sizes. For example, certificate chains containing 512-bit
+ RSA keys or signatures are not appropriate for high-security
+ applications.
+
+D.4 Implementation Pitfalls
+
+ Implementation experience has shown that certain parts of earlier TLS
+ specifications are not easy to understand, and have been a source of
+ interoperability and security problems. Many of these areas have been
+ clarified in this document, but this appendix contains a short list
+
+
+
+Dierks & Rescorla Standards Track [Page 81]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ of the most important things that require special attention from
+ implementors.
+
+ TLS protocol issues:
+
+ - Do you correctly handle handshake messages that are fragmented
+ to multiple TLS records (see Section 6.2.1)? Including corner
+ cases like a ClientHello that is split to several small
+ fragments? Do you fragment handshake messages that exceed the
+ maximum fragment size? In particular, the certificate and
+ certificate request handshake messages can be large enough to
+ require fragmentation.
+
+ - Do you ignore the TLS record layer version number in all TLS
+ records before ServerHello (see Appendix E.1)?
+
+ - Do you handle TLS extensions in ClientHello correctly,
+ including omitting the extensions field completely?
+
+ - Do you support renegotiation, both client and server initiated?
+ While renegotiation is an optional feature, supporting
+ it is highly recommended.
+
+ - When the server has requested a client certificate, but no
+ suitable certificate is available, do you correctly send
+ an empty Certificate message, instead of omitting the whole
+ message (see Section 7.4.6)?
+
+ Cryptographic details:
+
+ - In RSA-encrypted Premaster Secret, do you correctly send and
+ verify the version number? When an error is encountered, do
+ you continue the handshake to avoid the Bleichenbacher
+ attack (see Section 7.4.7.1)?
+
+ - What countermeasures do you use to prevent timing attacks against
+ RSA decryption and signing operations (see Section 7.4.7.1)?
+
+ - When verifying RSA signatures, do you accept both NULL and
+ missing parameters (see Section 4.7)? Do you verify that the
+ RSA padding doesn't have additional data after the hash value?
+ [FI06]
+
+ - When using Diffie-Hellman key exchange, do you correctly strip
+ leading zero bytes from the negotiated key (see Section 8.1.2)?
+
+ - Does your TLS client check that the Diffie-Hellman parameters
+ sent by the server are acceptable (see Section F.1.1.3)?
+
+
+
+Dierks & Rescorla Standards Track [Page 82]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ - How do you generate unpredictable IVs for CBC mode ciphers
+ (see Section 6.2.3.2)?
+
+ - Do you accept long CBC mode padding (up to 255 bytes; see
+ Section 6.2.3.2)?
+
+ - How do you address CBC mode timing attacks (Section 6.2.3.2)?
+
+ - Do you use a strong and, most importantly, properly seeded
+ random number generator (see Appendix D.1) for generating the
+ premaster secret (for RSA key exchange), Diffie-Hellman private
+ values, the DSA "k" parameter, and other security-critical
+ values?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 83]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Appendix E. Backward Compatibility
+
+E.1 Compatibility with TLS 1.0/1.1 and SSL 3.0
+
+ Since there are various versions of TLS (1.0, 1.1, 1.2, and any
+ future versions) and SSL (2.0 and 3.0), means are needed to negotiate
+ the specific protocol version to use. The TLS protocol provides a
+ built-in mechanism for version negotiation so as not to bother other
+ protocol components with the complexities of version selection.
+
+ TLS versions 1.0, 1.1, and 1.2, and SSL 3.0 are very similar, and use
+ compatible ClientHello messages; thus, supporting all of them is
+ relatively easy. Similarly, servers can easily handle clients trying
+ to use future versions of TLS as long as the ClientHello format
+ remains compatible, and the client supports the highest protocol
+ version available in the server.
+
+ A TLS 1.2 client who wishes to negotiate with such older servers will
+ send a normal TLS 1.2 ClientHello, containing { 3, 3 } (TLS 1.2) in
+ ClientHello.client_version. If the server does not support this
+ version, it will respond with ServerHello containing an older version
+ number. If the client agrees to use this version, the negotiation
+ will proceed as appropriate for the negotiated protocol.
+
+ If the version chosen by the server is not supported by the client
+ (or not acceptable), the client MUST send a "protocol_version" alert
+ message and close the connection.
+
+ If a TLS server receives a ClientHello containing a version number
+ greater than the highest version supported by the server, it MUST
+ reply according to the highest version supported by the server.
+
+ A TLS server can also receive a ClientHello containing a version
+ number smaller than the highest supported version. If the server
+ wishes to negotiate with old clients, it will proceed as appropriate
+ for the highest version supported by the server that is not greater
+ than ClientHello.client_version. For example, if the server supports
+ TLS 1.0, 1.1, and 1.2, and client_version is TLS 1.0, the server will
+ proceed with a TLS 1.0 ServerHello. If server supports (or is willing
+ to use) only versions greater than client_version, it MUST send a
+ "protocol_version" alert message and close the connection.
+
+ Whenever a client already knows the highest protocol version known to
+ a server (for example, when resuming a session), it SHOULD initiate
+ the connection in that native protocol.
+
+ Note: some server implementations are known to implement version
+ negotiation incorrectly. For example, there are buggy TLS 1.0 servers
+
+
+
+Dierks & Rescorla Standards Track [Page 84]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ that simply close the connection when the client offers a version
+ newer than TLS 1.0. Also, it is known that some servers will refuse
+ the connection if any TLS extensions are included in ClientHello.
+ Interoperability with such buggy servers is a complex topic beyond
+ the scope of this document, and may require multiple connection
+ attempts by the client.
+
+ Earlier versions of the TLS specification were not fully clear on
+ what the record layer version number (TLSPlaintext.version) should
+ contain when sending ClientHello (i.e., before it is known which
+ version of the protocol will be employed). Thus, TLS servers
+ compliant with this specification MUST accept any value {03,XX} as
+ the record layer version number for ClientHello.
+
+ TLS clients that wish to negotiate with older servers MAY send any
+ value {03,XX} as the record layer version number. Typical values
+ would be {03,00}, the lowest version number supported by the client,
+ and the value of ClientHello.client_version. No single value will
+ guarantee interoperability with all old servers, but this is a
+ complex topic beyond the scope of this document.
+
+E.2 Compatibility with SSL 2.0
+
+ TLS 1.2 clients that wish to support SSL 2.0 servers MUST send
+ version 2.0 CLIENT-HELLO messages defined in [SSL2]. The message MUST
+ contain the same version number as would be used for ordinary
+ ClientHello, and MUST encode the supported TLS cipher suites in the
+ CIPHER-SPECS-DATA field as described below.
+
+ Warning: The ability to send version 2.0 CLIENT-HELLO messages will
+ be phased out with all due haste, since the newer ClientHello format
+ provides better mechanisms for moving to newer versions and
+ negotiating extensions. TLS 1.2 clients SHOULD NOT support SSL 2.0.
+
+ However, even TLS servers that do not support SSL 2.0 MAY accept
+ version 2.0 CLIENT-HELLO messages. The message is presented below in
+ sufficient detail for TLS server implementors; the true definition is
+ still assumed to be [SSL2].
+
+ For negotiation purposes, 2.0 CLIENT-HELLO is interpreted the same
+ way as a ClientHello with a "null" compression method and no
+ extensions. Note that this message MUST be sent directly on the wire,
+ not wrapped as a TLS record. For the purposes of calculating Finished
+ and CertificateVerify, the msg_length field is not considered to be a
+ part of the handshake message.
+
+ uint8 V2CipherSpec[3];
+
+
+
+
+Dierks & Rescorla Standards Track [Page 85]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ struct {
+ uint16 msg_length;
+ uint8 msg_type;
+ Version version;
+ uint16 cipher_spec_length;
+ uint16 session_id_length;
+ uint16 challenge_length;
+ V2CipherSpec cipher_specs[V2ClientHello.cipher_spec_length];
+ opaque session_id[V2ClientHello.session_id_length];
+ opaque challenge[V2ClientHello.challenge_length;
+ } V2ClientHello;
+
+ msg_length
+ The highest bit MUST be 1; the remaining bits contain the length
+ of the following data in bytes.
+
+ msg_type
+ This field, in conjunction with the version field, identifies a
+ version 2 client hello message. The value MUST be one (1).
+
+ version
+ Equal to ClientHello.client_version.
+
+ cipher_spec_length
+ This field is the total length of the field cipher_specs. It
+ cannot be zero and MUST be a multiple of the V2CipherSpec length
+ (3).
+
+ session_id_length
+ This field MUST have a value of zero for a client that claims to
+ support TLS 1.2.
+
+ challenge_length
+ The length in bytes of the client's challenge to the server to
+ authenticate itself. Historically, permissible values are between
+ 16 and 32 bytes inclusive. When using the SSLv2 backward
+ compatible handshake the client SHOULD use a 32 byte challenge.
+
+ cipher_specs
+ This is a list of all CipherSpecs the client is willing and able
+ to use. In addition to the 2.0 cipher specs defined in [SSL2],
+ this includes the TLS cipher suites normally sent in
+ ClientHello.cipher_suites, each cipher suite prefixed by a zero
+ byte. For example, TLS cipher suite {0x00,0x0A} would be sent as
+ {0x00,0x00,0x0A}.
+
+ session_id
+ This field MUST be empty.
+
+
+
+Dierks & Rescorla Standards Track [Page 86]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ challenge
+ Corresponds to ClientHello.random. If the challenge length is less
+ than 32, the TLS server will pad the data with leading (note: not
+ trailing) zero bytes to make it 32 bytes long.
+
+ Note: Requests to resume a TLS session MUST use a TLS client hello.
+
+E.3. Avoiding Man-in-the-Middle Version Rollback
+
+ When TLS clients fall back to Version 2.0 compatibility mode, they
+ MUST use special PKCS#1 block formatting. This is done so that TLS
+ servers will reject Version 2.0 sessions with TLS-capable clients.
+
+ When a client negotiates SSL 2.0 but also supports TLS, it MUST set
+ the right-hand (least-significant) 8 random bytes of the PKCS padding
+ (not including the terminal null of the padding) for the RSA
+ encryption of the ENCRYPTED-KEY-DATA field of the CLIENT-MASTER-KEY
+ to 0x03 (the other padding bytes are random).
+
+ When a TLS-capable server negotiates SSL 2.0 it SHOULD, after
+ decrypting the ENCRYPTED-KEY-DATA field, check that these eight
+ padding bytes are 0x03. If they are not, the server SHOULD generate a
+ random value for SECRET-KEY-DATA, and continue the handshake (which
+ will eventually fail since the keys will not match). Note that
+ reporting the error situation to the client could make the server
+ vulnerable to attacks described in [BLEI].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 87]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Appendix F. Security Analysis
+
+ The TLS protocol is designed to establish a secure connection between
+ a client and a server communicating over an insecure channel. This
+ document makes several traditional assumptions, including that
+ attackers have substantial computational resources and cannot obtain
+ secret information from sources outside the protocol. Attackers are
+ assumed to have the ability to capture, modify, delete, replay, and
+ otherwise tamper with messages sent over the communication channel.
+ This appendix outlines how TLS has been designed to resist a variety
+ of attacks.
+
+F.1. Handshake Protocol
+
+ The handshake protocol is responsible for selecting a CipherSpec and
+ generating a Master Secret, which together comprise the primary
+ cryptographic parameters associated with a secure session. The
+ handshake protocol can also optionally authenticate parties who have
+ certificates signed by a trusted certificate authority.
+
+F.1.1. Authentication and Key Exchange
+
+ TLS supports three authentication modes: authentication of both
+ parties, server authentication with an unauthenticated client, and
+ total anonymity. Whenever the server is authenticated, the channel is
+ secure against man-in-the-middle attacks, but completely anonymous
+ sessions are inherently vulnerable to such attacks. Anonymous
+ servers cannot authenticate clients. If the server is authenticated,
+ its certificate message must provide a valid certificate chain
+ leading to an acceptable certificate authority. Similarly,
+ authenticated clients must supply an acceptable certificate to the
+ server. Each party is responsible for verifying that the other's
+ certificate is valid and has not expired or been revoked.
+
+ The general goal of the key exchange process is to create a
+ pre_master_secret known to the communicating parties and not to
+ attackers. The pre_master_secret will be used to generate the
+ master_secret (see Section 8.1). The master_secret is required to
+ generate the finished messages, encryption keys, and MAC keys (see
+ Sections 7.4.9 and 6.3). By sending a correct finished message,
+ parties thus prove that they know the correct pre_master_secret.
+
+F.1.1.1. Anonymous Key Exchange
+
+ Completely anonymous sessions can be established using Diffie-Hellman
+ for key exchange. The server's public parameters are contained in the
+ server key exchange message and the client's are sent in the client
+ key exchange message. Eavesdroppers who do not know the private
+
+
+
+Dierks & Rescorla Standards Track [Page 88]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ values should not be able to find the Diffie-Hellman result (i.e. the
+ pre_master_secret).
+
+ Warning: Completely anonymous connections only provide protection
+ against passive eavesdropping. Unless an independent tamper-proof
+ channel is used to verify that the finished messages were not
+ replaced by an attacker, server authentication is required in
+ environments where active man-in-the-middle attacks are a concern.
+
+F.1.1.2. RSA Key Exchange and Authentication
+
+ With RSA, key exchange and server authentication are combined. The
+ public key is contained in the server's certificate. Note that
+ compromise of the server's static RSA key results in a loss of
+ confidentiality for all sessions protected under that static key. TLS
+ users desiring Perfect Forward Secrecy should use DHE cipher suites.
+ The damage done by exposure of a private key can be limited by
+ changing one's private key (and certificate) frequently.
+
+ After verifying the server's certificate, the client encrypts a
+ pre_master_secret with the server's public key. By successfully
+ decoding the pre_master_secret and producing a correct finished
+ message, the server demonstrates that it knows the private key
+ corresponding to the server certificate.
+
+ When RSA is used for key exchange, clients are authenticated using
+ the certificate verify message (see Section 7.4.8). The client signs
+ a value derived from all preceding handshake messages. These
+ handshake messages include the server certificate, which binds the
+ signature to the server, and ServerHello.random, which binds the
+ signature to the current handshake process.
+
+F.1.1.3. Diffie-Hellman Key Exchange with Authentication
+
+ When Diffie-Hellman key exchange is used, the server can either
+ supply a certificate containing fixed Diffie-Hellman parameters or
+ use the server key exchange message to send a set of temporary
+ Diffie-Hellman parameters signed with a DSA or RSA certificate.
+ Temporary parameters are hashed with the hello.random values before
+ signing to ensure that attackers do not replay old parameters. In
+ either case, the client can verify the certificate or signature to
+ ensure that the parameters belong to the server.
+
+ If the client has a certificate containing fixed Diffie-Hellman
+ parameters, its certificate contains the information required to
+ complete the key exchange. Note that in this case the client and
+ server will generate the same Diffie-Hellman result (i.e.,
+ pre_master_secret) every time they communicate. To prevent the
+
+
+
+Dierks & Rescorla Standards Track [Page 89]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ pre_master_secret from staying in memory any longer than necessary,
+ it should be converted into the master_secret as soon as possible.
+ Client Diffie-Hellman parameters must be compatible with those
+ supplied by the server for the key exchange to work.
+
+ If the client has a standard DSA or RSA certificate or is
+ unauthenticated, it sends a set of temporary parameters to the server
+ in the client key exchange message, then optionally uses a
+ certificate verify message to authenticate itself.
+
+ If the same DH keypair is to be used for multiple handshakes, either
+ because the client or server has a certificate containing a fixed DH
+ keypair or because the server is reusing DH keys, care must be taken
+ to prevent small subgroup attacks. Implementations SHOULD follow the
+ guidelines found in [SUBGROUP].
+
+ Small subgroup attacks are most easily avoided by using one of the
+ DHE cipher suites and generating a fresh DH private key (X) for each
+ handshake. If a suitable base (such as 2) is chosen, g^X mod p can be
+ computed very quickly, therefore the performance cost is minimized.
+ Additionally, using a fresh key for each handshake provides Perfect
+ Forward Secrecy. Implementations SHOULD generate a new X for each
+ handshake when using DHE cipher suites.
+
+ Because TLS allows the server to provide arbitrary DH groups, the
+ client should verify that the DH group is of suitable size as defined
+ by local policy. The client SHOULD also verify that the DH public
+ exponent appears to be of adequate size. [KEYSIZ] provides a useful
+ guide to the strength of various group sizes. The server MAY choose
+ to assist the client by providing a known group, such as those
+ defined in [IKEALG] or [MODP]. These can be verified by simple
+ comparison.
+
+F.1.2. Version Rollback Attacks
+
+ Because TLS includes substantial improvements over SSL Version 2.0,
+ attackers may try to make TLS-capable clients and servers fall back
+ to Version 2.0. This attack can occur if (and only if) two TLS-
+ capable parties use an SSL 2.0 handshake.
+
+ Although the solution using non-random PKCS #1 block type 2 message
+ padding is inelegant, it provides a reasonably secure way for Version
+ 3.0 servers to detect the attack. This solution is not secure against
+ attackers who can brute force the key and substitute a new ENCRYPTED-
+ KEY-DATA message containing the same key (but with normal padding)
+ before the application specified wait threshold has expired. Altering
+ the padding of the least significant 8 bytes of the PKCS padding does
+ not impact security for the size of the signed hashes and RSA key
+
+
+
+Dierks & Rescorla Standards Track [Page 90]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ lengths used in the protocol, since this is essentially equivalent to
+ increasing the input block size by 8 bytes.
+
+F.1.3. Detecting Attacks Against the Handshake Protocol
+
+ An attacker might try to influence the handshake exchange to make the
+ parties select different encryption algorithms than they would
+ normally chooses.
+
+ For this attack, an attacker must actively change one or more
+ handshake messages. If this occurs, the client and server will
+ compute different values for the handshake message hashes. As a
+ result, the parties will not accept each others' finished messages.
+ Without the master_secret, the attacker cannot repair the finished
+ messages, so the attack will be discovered.
+
+F.1.4. Resuming Sessions
+
+ When a connection is established by resuming a session, new
+ ClientHello.random and ServerHello.random values are hashed with the
+ session's master_secret. Provided that the master_secret has not been
+ compromised and that the secure hash operations used to produce the
+ encryption keys and MAC keys are secure, the connection should be
+ secure and effectively independent from previous connections.
+ Attackers cannot use known encryption keys or MAC secrets to
+ compromise the master_secret without breaking the secure hash
+ operations.
+
+ Sessions cannot be resumed unless both the client and server agree.
+ If either party suspects that the session may have been compromised,
+ or that certificates may have expired or been revoked, it should
+ force a full handshake. An upper limit of 24 hours is suggested for
+ session ID lifetimes, since an attacker who obtains a master_secret
+ may be able to impersonate the compromised party until the
+ corresponding session ID is retired. Applications that may be run in
+ relatively insecure environments should not write session IDs to
+ stable storage.
+
+F.2. Protecting Application Data
+
+ The master_secret is hashed with the ClientHello.random and
+ ServerHello.random to produce unique data encryption keys and MAC
+ secrets for each connection.
+
+ Outgoing data is protected with a MAC before transmission. To prevent
+ message replay or modification attacks, the MAC is computed from the
+ MAC key, the sequence number, the message length, the message
+ contents, and two fixed character strings. The message type field is
+
+
+
+Dierks & Rescorla Standards Track [Page 91]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ necessary to ensure that messages intended for one TLS Record Layer
+ client are not redirected to another. The sequence number ensures
+ that attempts to delete or reorder messages will be detected. Since
+ sequence numbers are 64 bits long, they should never overflow.
+ Messages from one party cannot be inserted into the other's output,
+ since they use independent MAC keys. Similarly, the server-write and
+ client-write keys are independent, so stream cipher keys are used
+ only once.
+
+ If an attacker does break an encryption key, all messages encrypted
+ with it can be read. Similarly, compromise of a MAC key can make
+ message modification attacks possible. Because MACs are also
+ encrypted, message-alteration attacks generally require breaking the
+ encryption algorithm as well as the MAC.
+
+ Note: MAC keys may be larger than encryption keys, so messages can
+ remain tamper resistant even if encryption keys are broken.
+
+F.3. Explicit IVs
+
+ [CBCATT] describes a chosen plaintext attack on TLS that depends on
+ knowing the IV for a record. Previous versions of TLS [TLS1.0] used
+ the CBC residue of the previous record as the IV and therefore
+ enabled this attack. This version uses an explicit IV in order to
+ protect against this attack.
+
+F.4. Security of Composite Cipher Modes
+
+ TLS secures transmitted application data via the use of symmetric
+ encryption and authentication functions defined in the negotiated
+ cipher suite. The objective is to protect both the integrity and
+ confidentiality of the transmitted data from malicious actions by
+ active attackers in the network. It turns out that the order in
+ which encryption and authentication functions are applied to the data
+ plays an important role for achieving this goal [ENCAUTH].
+
+ The most robust method, called encrypt-then-authenticate, first
+ applies encryption to the data and then applies a MAC to the
+ ciphertext. This method ensures that the integrity and
+ confidentiality goals are obtained with ANY pair of encryption and
+ MAC functions, provided that the former is secure against chosen
+ plaintext attacks and that the MAC is secure against chosen-message
+ attacks. TLS uses another method, called authenticate-then-encrypt,
+ in which first a MAC is computed on the plaintext and then the
+ concatenation of plaintext and MAC is encrypted. This method has
+ been proven secure for CERTAIN combinations of encryption functions
+ and MAC functions, but it is not guaranteed to be secure in general.
+ In particular, it has been shown that there exist perfectly secure
+
+
+
+Dierks & Rescorla Standards Track [Page 92]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ encryption functions (secure even in the information-theoretic sense)
+ that combined with any secure MAC function, fail to provide the
+ confidentiality goal against an active attack. Therefore, new cipher
+ suites and operation modes adopted into TLS need to be analyzed under
+ the authenticate-then-encrypt method to verify that they achieve the
+ stated integrity and confidentiality goals.
+
+ Currently, the security of the authenticate-then-encrypt method has
+ been proven for some important cases. One is the case of stream
+ ciphers in which a computationally unpredictable pad of the length of
+ the message, plus the length of the MAC tag, is produced using a
+ pseudo-random generator and this pad is xor-ed with the concatenation
+ of plaintext and MAC tag. The other is the case of CBC mode using a
+ secure block cipher. In this case, security can be shown if one
+ applies one CBC encryption pass to the concatenation of plaintext and
+ MAC and uses a new, independent, and unpredictable IV for each new
+ pair of plaintext and MAC. In versions of TLS prior to 1.1, CBC mode
+ was used properly EXCEPT that it used a predictable IV in the form of
+ the last block of the previous ciphertext. This made TLS open to
+ chosen plaintext attacks. This version of the protocol is immune to
+ those attacks. For exact details in the encryption modes proven
+ secure, see [ENCAUTH].
+
+F.5 Denial of Service
+
+ TLS is susceptible to a number of denial of service (DoS) attacks.
+ In particular, an attacker who initiates a large number of TCP
+ connections can cause a server to consume large amounts of CPU doing
+ RSA decryption. However, because TLS is generally used over TCP, it
+ is difficult for the attacker to hide his point of origin if proper
+ TCP SYN randomization is used [SEQNUM] by the TCP stack.
+
+ Because TLS runs over TCP, it is also susceptible to a number of
+ denial of service attacks on individual connections. In particular,
+ attackers can forge RSTs, thereby terminating connections, or forge
+ partial TLS records, thereby causing the connection to stall. These
+ attacks cannot in general be defended against by a TCP-using
+ protocol. Implementors or users who are concerned with this class of
+ attack should use IPsec AH [AH] or ESP [ESP].
+
+F.6 Final Notes
+
+ For TLS to be able to provide a secure connection, both the client
+ and server systems, keys, and applications must be secure. In
+ addition, the implementation must be free of security errors.
+
+ The system is only as strong as the weakest key exchange and
+ authentication algorithm supported, and only trustworthy
+
+
+
+Dierks & Rescorla Standards Track [Page 93]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ cryptographic functions should be used. Short public keys and
+ anonymous servers should be used with great caution. Implementations
+ and users must be careful when deciding which certificates and
+ certificate authorities are acceptable; a dishonest certificate
+ authority can do tremendous damage.
+
+Changes in This Version
+ [RFC Editor: Please delete this]
+
+ Clarified traffic analysis considerations
+
+ Added support for SHA-224 for signatures (though not for HMAC).
+
+ Consistent use of camelback style for references to messages (e.g.,
+ ServerHelloDone) in the text.
+
+ Changed "DSS" to "DSA" where we are referring to the algorithm.
+
+ Extensive editorial revisions from Alfred Hoenes.
+
+Normative References
+
+ [AES] National Institute of Standards and Technology,
+ "Specification for the Advanced Encryption Standard (AES)"
+ FIPS 197. November 26, 2001.
+
+ [3DES] National Institute of Standards and Technology,
+ "Recommendation for the Triple Data Encryption Algorithm
+ (TDEA) Block Cipher", NIST Special Publication 800-67, May
+ 2004.
+
+ [DSS] NIST FIPS PUB 186-2, "Digital Signature Standard", National
+ Institute of Standards and Technology, U.S. Department of
+ Commerce, 2000.
+
+ [HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
+ Hashing for Message Authentication", RFC 2104, February
+ 1997.
+
+ [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321,
+ April 1992.
+
+ [PKCS1] J. Jonsson, B. Kaliski, "Public-Key Cryptography Standards
+ (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC
+ 3447, February 2003.
+
+ [PKIX] Housley, R., Ford, W., Polk, W. and D. Solo, "Internet X.509
+ Public Key Infrastructure Certificate and Certificate
+
+
+
+Dierks & Rescorla Standards Track [Page 94]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Revocation List (CRL) Profile", RFC 3280, April 2002.
+
+
+ [SCH] B. Schneier. "Applied Cryptography: Protocols, Algorithms,
+ and Source Code in C, 2nd ed.", Published by John Wiley &
+ Sons, Inc. 1996.
+
+ [SHS] NIST FIPS PUB 180-2, "Secure Hash Standard", National
+ Institute of Standards and Technology, U.S. Department of
+ Commerce, August 2002.
+
+ [REQ] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an
+ IANA Considerations Section in RFCs", BCP 25, RFC 2434,
+ October 1998.
+
+ [X680] ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002,
+ Information technology - Abstract Syntax Notation One
+ (ASN.1): Specification of basic notation.
+
+ [X690] ITU-T Recommendation X.690 (2002) | ISO/IEC 8825-1:2002,
+ Information technology - ASN.1 encoding Rules: Specification
+ of Basic Encoding Rules (BER), Canonical Encoding Rules
+ (CER) and Distinguished Encoding Rules (DER).
+
+Informative References
+
+ [AEAD] Mcgrew, D., "An Interface and Algorithms for Authenticated
+ Encryption", RFC 5116, January 2008.
+
+ [AH] Kent, S., and Atkinson, R., "IP Authentication Header", RFC
+ 4302, December 2005.
+
+ [BLEI] Bleichenbacher D., "Chosen Ciphertext Attacks against
+ Protocols Based on RSA Encryption Standard PKCS #1" in
+ Advances in Cryptology -- CRYPTO'98, LNCS vol. 1462, pages:
+ 1-12, 1998.
+
+ [CBCATT] Moeller, B., "Security of CBC Ciphersuites in SSL/TLS:
+ Problems and Countermeasures",
+ http://www.openssl.org/~bodo/tls-cbc.txt.
+
+ [CBCTIME] Canvel, B., Hiltgen, A., Vaudenay, S., and M. Vuagnoux,
+ "Password Interception in a SSL/TLS Channel", Advances in
+ Cryptology -- CRYPTO 2003, LNCS vol. 2729, 2003.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 95]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ [CCM] "NIST Special Publication 800-38C: The CCM Mode for
+ Authentication and Confidentiality",
+ http://csrc.nist.gov/publications/nistpubs/800-38C/
+ SP800-38C.pdf
+
+ [DES] National Institute of Standards and Technology, "Data
+ Encryption Standard (DES)", FIPS PUB 46-3, October 1999.
+
+ [DSS-3] NIST FIPS PUB 186-3 Draft, "Digital Signature Standard",
+ National Institute of Standards and Technology, U.S.
+ Department of Commerce, 2006.
+
+ [ECSDSA] American National Standards Institute, "Public Key
+ Cryptography for the Financial Services Industry: The
+ Elliptic Curve Digital Signature Algorithm (ECDSA)", ANS
+ X9.62-2005, November 2005.
+
+ [ENCAUTH] Krawczyk, H., "The Order of Encryption and Authentication
+ for Protecting Communications (Or: How Secure is SSL?)",
+ Crypto 2001.
+
+ [ESP] Kent, S., and Atkinson, R., "IP Encapsulating Security
+ Payload (ESP)", RFC 4303, December 2005.
+
+ [FI06] Hal Finney, "Bleichenbacher's RSA signature forgery based on
+ implementation error", ietf-openpgp@imc.org mailing list, 27
+ August 2006, http://www.imc.org/ietf-openpgp/mail-
+ archive/msg14307.html.
+
+ [GCM] "NIST Special Publication 800-38D DRAFT (June, 2007):
+ Recommendation for Block Cipher Modes of Operation:
+ Galois/Counter Mode (GCM) and GMAC"
+
+ [IKEALG] Schiller, J., "Cryptographic Algorithms for Use in the
+ Internet Key Exchange Version 2 (IKEv2)", RFC 4307, December
+ 2005.
+
+ [KEYSIZ] Orman, H., and Hoffman, P., "Determining Strengths For
+ Public Keys Used For Exchanging Symmetric Keys" RFC 3766,
+ April 2004.
+
+ [KPR03] Klima, V., Pokorny, O., Rosa, T., "Attacking RSA-based
+ Sessions in SSL/TLS", http://eprint.iacr.org/2003/052/,
+ March 2003.
+
+ [MODP] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
+ Diffie-Hellman groups for Internet Key Exchange (IKE)", RFC
+ 3526, May 2003.
+
+
+
+Dierks & Rescorla Standards Track [Page 96]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ [PKCS6] RSA Laboratories, "PKCS #6: RSA Extended Certificate Syntax
+ Standard", version 1.5, November 1993.
+
+ [PKCS7] RSA Laboratories, "PKCS #7: RSA Cryptographic Message Syntax
+ Standard", version 1.5, November 1993.
+
+ [RANDOM] Eastlake, D., 3rd, Schiller, J., and S. Crocker, "Randomness
+ Requirements for Security", BCP 106, RFC 4086, June 2005.
+
+ [RFC3749] Hollenbeck, S., "Transport Layer Security Protocol
+ Compression Methods", RFC 3749, May 2004.
+
+ [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
+ Wright, T., "Transport Layer Security (TLS) Extensions", RFC
+ 4366, April 2006.
+
+ [RSA] R. Rivest, A. Shamir, and L. M. Adleman, "A Method for
+ Obtaining Digital Signatures and Public-Key Cryptosystems",
+ Communications of the ACM, v. 21, n. 2, Feb 1978, pp.
+ 120-126.
+
+ [SEQNUM] Bellovin. S., "Defending Against Sequence Number Attacks",
+ RFC 1948, May 1996.
+
+ [SSL2] Hickman, Kipp, "The SSL Protocol", Netscape Communications
+ Corp., Feb 9, 1995.
+
+ [SSL3] A. Freier, P. Karlton, and P. Kocher, "The SSL 3.0
+ Protocol", Netscape Communications Corp., Nov 18, 1996.
+
+ [SUBGROUP] Zuccherato, R., "Methods for Avoiding the "Small-Subgroup"
+ Attacks on the Diffie-Hellman Key Agreement Method for
+ S/MIME", RFC 2785, March 2000.
+
+ [TCP] Postel, J., "Transmission Control Protocol", STD 7, RFC 793,
+ September 1981.
+
+ [TIMING] Boneh, D., Brumley, D., "Remote timing attacks are
+ practical", USENIX Security Symposium 2003.
+
+ [TLSAES] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites
+ for Transport Layer Security (TLS)", RFC 3268, June 2002.
+
+ [TLSECC] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and
+ Moeller, B., "Elliptic Curve Cryptography (ECC) Cipher
+ Suites for Transport Layer Security (TLS)", RFC 4492, May
+ 2006.
+
+
+
+
+Dierks & Rescorla Standards Track [Page 97]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ [TLSEXT] Eastlake, D.E., "Transport Layer Security (TLS) Extensions:
+ Extension Definitions", January 2008, draft-ietf-tls-
+ rfc4366-bis-01.txt.
+
+ [TLSPGP] Mavrogiannopoulos, N., "Using OpenPGP keys for TLS
+ authentication", RFC 5081, November 2007.
+
+ [TLSPSK] Eronen, P., Tschofenig, H., "Pre-Shared Key Ciphersuites for
+ Transport Layer Security (TLS)", RFC 4279, December 2005.
+
+ [TLS1.0] Dierks, T., and C. Allen, "The TLS Protocol, Version 1.0",
+ RFC 2246, January 1999.
+
+ [TLS1.1] Dierks, T., and E. Rescorla, "The TLS Protocol, Version
+ 1.1", RFC 4346, April, 2006.
+
+ [X501] ITU-T Recommendation X.501: Information Technology - Open
+ Systems Interconnection - The Directory: Models, 1993.
+
+ [XDR] Eisler, M., "External Data Representation Standard", STD 67,
+ RFC 4506, May 2006.
+
+Credits
+
+ Working Group Chairs
+
+ Eric Rescorla
+ EMail: ekr@networkresonance.com
+
+ Pasi Eronen
+ pasi.eronen@nokia.com
+
+
+ Editors
+
+ Tim Dierks Eric Rescorla
+ Independent Network Resonance, Inc.
+ EMail: tim@dierks.org EMail: ekr@networkresonance.com
+
+
+ Other contributors
+
+ Christopher Allen (co-editor of TLS 1.0)
+ Alacrity Ventures
+ ChristopherA@AlacrityManagement.com
+
+ Martin Abadi
+ University of California, Santa Cruz
+
+
+
+Dierks & Rescorla Standards Track [Page 98]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ abadi@cs.ucsc.edu
+
+ Steven M. Bellovin
+ Columbia University
+ smb@cs.columbia.edu
+
+ Simon Blake-Wilson
+ BCI
+ EMail: sblakewilson@bcisse.com
+
+ Ran Canetti
+ IBM
+ canetti@watson.ibm.com
+
+ Pete Chown
+ Skygate Technology Ltd
+ pc@skygate.co.uk
+
+ Taher Elgamal
+ taher@securify.com
+ Securify
+
+ Pasi Eronen
+ pasi.eronen@nokia.com
+ Nokia
+
+ Anil Gangolli
+ anil@busybuddha.org
+
+ Kipp Hickman
+
+ Alfred Hoenes
+
+ David Hopwood
+ Independent Consultant
+ EMail: david.hopwood@blueyonder.co.uk
+
+ Phil Karlton (co-author of SSLv3)
+
+ Paul Kocher (co-author of SSLv3)
+ Cryptography Research
+ paul@cryptography.com
+
+ Hugo Krawczyk
+ IBM
+ hugo@ee.technion.ac.il
+
+ Jan Mikkelsen
+
+
+
+Dierks & Rescorla Standards Track [Page 99]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+ Transactionware
+ EMail: janm@transactionware.com
+
+ Magnus Nystrom
+ RSA Security
+ EMail: magnus@rsasecurity.com
+
+ Robert Relyea
+ Netscape Communications
+ relyea@netscape.com
+
+ Jim Roskind
+ Netscape Communications
+ jar@netscape.com
+
+ Michael Sabin
+
+ Dan Simon
+ Microsoft, Inc.
+ dansimon@microsoft.com
+
+ Tom Weinstein
+
+ Tim Wright
+ Vodafone
+ EMail: timothy.wright@vodafone.com
+
+Comments
+
+ The discussion list for the IETF TLS working group is located at the
+ e-mail address <tls@ietf.org>. Information on the group and
+ information on how to subscribe to the list is at
+ <https://www1.ietf.org/mailman/listinfo/tls>
+
+ Archives of the list can be found at:
+ <http://www.ietf.org/mail-archive/web/tls/current/index.html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 100]
+
+draft-ietf-tls-rfc4346-bis-10.txt TLS March, 2008
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+Dierks & Rescorla Standards Track [Page 101]
+
+
diff --git a/doc/protocol/draft-ietf-tls-rsa-aes-gcm-03.txt b/doc/protocol/draft-ietf-tls-rsa-aes-gcm-03.txt
new file mode 100644
index 0000000000..7b5e57abab
--- /dev/null
+++ b/doc/protocol/draft-ietf-tls-rsa-aes-gcm-03.txt
@@ -0,0 +1,504 @@
+
+
+
+TLS Working Group J. Salowey
+Internet-Draft A. Choudhury
+Intended status: Standards Track D. McGrew
+Expires: October 16, 2008 Cisco Systems, Inc.
+ April 14, 2008
+
+
+ AES-GCM Cipher Suites for TLS
+ draft-ietf-tls-rsa-aes-gcm-03
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+ This Internet-Draft will expire on October 16, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ This memo describes the use of the Advanced Encryption Standard (AES)
+ in Galois/Counter Mode (GCM) as a Transport Layer Security (TLS)
+ authenticated encryption operation. GCM provides both
+ confidentiality and data origin authentication, can be efficiently
+ implemented in hardware for speeds of 10 gigabits per second and
+ above, and is also well-suited to software implementations. This
+ memo defines TLS cipher suites that use AES-GCM with RSA, DSS and
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 1]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+ Diffie-Hellman based key exchange mechanisms.
+
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
+
+ 2. Conventions Used In This Document . . . . . . . . . . . . . . . 3
+
+ 3. AES-GCM Cipher Suites . . . . . . . . . . . . . . . . . . . . . 3
+
+ 4. TLS Versions . . . . . . . . . . . . . . . . . . . . . . . . . 4
+
+ 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
+
+ 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
+ 6.1. Counter Reuse . . . . . . . . . . . . . . . . . . . . . . . 5
+ 6.2. Recommendations for Multiple Encryption Processors . . . . 5
+
+ 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 6
+
+ 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7
+ 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7
+ 8.2. Informative References . . . . . . . . . . . . . . . . . . 7
+
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 7
+ Intellectual Property and Copyright Statements . . . . . . . . . . 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 2]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+1. Introduction
+
+ This document describes the use of AES [AES] in Galois Counter Mode
+ (GCM) [GCM] (AES-GCM) with various key exchange mechanisms as a
+ cipher suite for TLS. AES-GCM is an authenticated encryption with
+ associated data (AEAD) cipher (as defined in TLS 1.2
+ [I-D.ietf-tls-rfc4346-bis]) providing both confidentiality and data
+ origin authentication. The following sections define cipher suites
+ based on RSA, DSS and Diffie-Hellman key exchanges; ECC based cipher
+ suites are defined in a separate document [I-D.ietf-tls-ecc-new-mac].
+
+ AES-GCM is not only efficient and secure, but hardware
+ implementations can achieve high speeds with low cost and low
+ latency, because the mode can be pipelined. Applications that
+ require high data throughput can benefit from these high-speed
+ implementations. AES-GCM has been specified as a mode that can be
+ used with IPsec ESP [RFC4106] and 802.1AE MAC Security [IEEE8021AE].
+
+
+2. Conventions Used In This Document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+
+3. AES-GCM Cipher Suites
+
+ The following cipher suites use the new authenticated encryption
+ modes defined in TLS 1.2 with AES in Galois Counter Mode (GCM) [GCM]:
+
+ CipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_anon_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_anon_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+
+ These cipher suites use the AES-GCM authenticated encryption with
+ associated data (AEAD) algorithms AEAD_AES_128_GCM and
+ AEAD_AES_256_GCM described in [RFC5116]. Note that each of these
+ AEAD algorithms uses a 128-bit authentication tag with GCM. The
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 3]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+ "nonce" SHALL be 12 bytes long consisting of two parts as follows:
+ (this is an example of a "partially explicit" nonce; see section
+ 3.2.1 in [RFC5116]).
+
+ struct{
+ opaque salt[4];
+ opaque nonce_explicit[8];
+ } GCMNonce;
+
+ The salt is the "implicit" part of the nonce and is not sent in the
+ packet. Instead the salt is generated as part of the handshake
+ process: it is either the client_write_IV (when the client is
+ sending) or the server_write_IV (when the server is sending). The
+ salt length (SecurityParameters.fixed_iv_length) is 4 octets.
+
+ The nonce_explicit is the "explicit" part of the nonce. It is chosen
+ by the sender and is carried in each TLS record in the
+ GenericAEADCipher.nonce_explicit field. The nonce_explicit length
+ (SecurityParameters.record_iv_length) is 8 octets.
+
+ Each value of the nonce_explicit MUST be distinct for each distinct
+ invocation of GCM encrypt function for any fixed key. Failure to
+ meet this uniqueness requirement can significantly degrade security.
+ The nonce_explicit MAY be the 64-bit sequence number.
+
+ The RSA, DHE_RSA, DH_RSA, DHE_DSS, DH_DSS, and DH_anon key exchanges
+ are performed as defined in [I-D.ietf-tls-rfc4346-bis].
+
+ The PRF algorithms SHALL be as follows:
+
+ For cipher suites ending with _SHA256, the PRF is the TLS PRF
+ [I-D.ietf-tls-rfc4346-bis] with SHA-256 as the hash function.
+
+ For cipher suites ending with _SHA384, the PRF is the TLS PRF
+ [I-D.ietf-tls-rfc4346-bis] with SHA-384 as the hash function.
+
+ Implementations MUST send TLS Alert bad_record_mac for all types of
+ failures encountered in processing the AES-GCM algorithm.
+
+
+4. TLS Versions
+
+ These cipher suites make use of the authenticated encryption with
+ additional data defined in TLS 1.2 [I-D.ietf-tls-rfc4346-bis]. They
+ MUST NOT be negotiated in older versions of TLS. Clients MUST NOT
+ offer these cipher suites if they do not offer TLS 1.2 or later.
+ Servers which select an earlier version of TLS MUST NOT select one of
+ these cipher suites. Because TLS has no way for the client to
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 4]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+ indicate that it supports TLS 1.2 but not earlier, a non-compliant
+ server might potentially negotiate TLS 1.1 or earlier and select one
+ of the cipher suites in this document. Clients MUST check the TLS
+ version and generate a fatal "illegal_parameter" alert if they detect
+ an incorrect version.
+
+
+5. IANA Considerations
+
+ IANA has assigned the following values for the cipher suites defined
+ in this draft:
+
+ CipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+ CipherSuite TLS_DH_anon_WITH_AES_128_GCM_SHA256 = {TBD,TBD}
+ CipherSuite TLS_DH_anon_WITH_AES_256_GCM_SHA384 = {TBD,TBD}
+
+
+6. Security Considerations
+
+ The security considerations in [I-D.ietf-tls-rfc4346-bis] apply to
+ this document as well. The remainder of this section describes
+ security considerations specific to the cipher suites described in
+ this document.
+
+6.1. Counter Reuse
+
+ AES-GCM security requires that the counter is never reused. The IV
+ construction in Section 3 is designed to prevent counter reuse.
+
+6.2. Recommendations for Multiple Encryption Processors
+
+ If multiple cryptographic processors are in use by the sender, then
+ the sender MUST ensure that, for a particular key, each value of the
+ nonce_explicit used with that key is distinct. In this case each
+ encryption processor SHOULD include in the nonce_explicit a fixed
+ value that is distinct for each processor. The recommended format is
+
+ nonce_explicit = FixedDistinct || Variable
+
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 5]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+ where the FixedDistinct field is distinct for each encryption
+ processor, but is fixed for a given processor, and the Variable field
+ is distinct for each distinct nonce used by a particular encryption
+ processor. When this method is used, the FixedDistinct fields used
+ by the different processors MUST have the same length.
+
+ In the terms of Figure 2 in [RFC5116], the Salt is the Fixed-Common
+ part of the nonce (it is fixed, and it is common across all
+ encryption processors), the FixedDistinct field exactly corresponds
+ to the Fixed-Distinct field, and the Variable field corresponds to
+ the Counter field, and the explicit part exactly corresponds to the
+ nonce_explicit.
+
+ For clarity, we provide an example for TLS in which there are two
+ distinct encryption processors, each of which uses a one-byte
+ FixedDistinct field:
+
+ Salt = eedc68dc
+ FixedDistinct = 01 (for the first encryption processor)
+ FixedDistinct = 02 (for the second encryption processor)
+
+ The GCMnonces generated by the first encryption processor, and their
+ corresponding nonce_explicit, are:
+
+ GCMNonce nonce_explicit
+ ------------------------ ----------------------------
+ eedc68dc0100000000000000 0100000000000000
+ eedc68dc0100000000000001 0100000000000001
+ eedc68dc0100000000000002 0100000000000002
+ ...
+
+ The GCMnonces generated by the second encryption processor, and their
+ corresponding nonce_explicit, are
+
+ GCMNonce nonce_explicit
+ ------------------------ ----------------------------
+ eedc68dc0200000000000000 0200000000000000
+ eedc68dc0200000000000001 0200000000000001
+ eedc68dc0200000000000002 0200000000000002
+ ...
+
+
+
+7. Acknowledgements
+
+ This draft borrows heavily from [I-D.ietf-tls-ecc-new-mac]. The
+ authors would like to thank Alex Lam, Simon Josefsson and Pasi Eronen
+ for providing useful comments during the review of this draft.
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 6]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+8. References
+
+8.1. Normative References
+
+ [AES] National Institute of Standards and Technology, "Advanced
+ Encryption Standard (AES)", FIPS 197, November 2001.
+
+ [GCM] Dworkin, M., "Recommendation for Block Cipher Modes of
+ Operation: Galois/Counter Mode (GCM) and GMAC", National
+ Institute of Standards and Technology SP 800-38D,
+ November 2007.
+
+ [I-D.ietf-tls-rfc4346-bis]
+ Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.2", draft-ietf-tls-rfc4346-bis-10
+ (work in progress), March 2008.
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
+ Encryption", RFC 5116, January 2008.
+
+8.2. Informative References
+
+ [I-D.ietf-tls-ecc-new-mac]
+ Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
+ 256/384 and AES Galois Counter Mode",
+ draft-ietf-tls-ecc-new-mac-05 (work in progress),
+ April 2008.
+
+ [IEEE8021AE]
+ Institute of Electrical and Electronics Engineers, "Media
+ Access Control Security", IEEE Standard 802.1AE,
+ August 2006.
+
+ [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode
+ (GCM) in IPsec Encapsulating Security Payload (ESP)",
+ RFC 4106, June 2005.
+
+
+
+
+
+
+
+
+
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 7]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+Authors' Addresses
+
+ Joseph Salowey
+ Cisco Systems, Inc.
+ 2901 3rd. Ave
+ Seattle, WA 98121
+ USA
+
+ Email: jsalowey@cisco.com
+
+
+ Abhijit Choudhury
+ Cisco Systems, Inc.
+ 3625 Cisco Way
+ San Jose, CA 95134
+ USA
+
+ Email: abhijitc@cisco.com
+
+
+ David McGrew
+ Cisco Systems, Inc.
+ 170 W Tasman Drive
+ San Jose, CA 95134
+ USA
+
+ Email: mcgrew@cisco.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 8]
+
+Internet-Draft AES-GCM Cipher suites April 2008
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+Salowey, et al. Expires October 16, 2008 [Page 9]
+
diff --git a/doc/protocol/draft-keromytis-tls-authz-keynote-00.txt b/doc/protocol/draft-keromytis-tls-authz-keynote-00.txt
new file mode 100644
index 0000000000..14479ad944
--- /dev/null
+++ b/doc/protocol/draft-keromytis-tls-authz-keynote-00.txt
@@ -0,0 +1,210 @@
+Internet-Draft A. D. Keromytis
+March 2008 Columbia University
+Expires: October 2008
+Creation Date: 2008-03-28
+Intended Status: Proposed
+
+
+ Transport Layer Security (TLS) Authorization Using KeyNote
+ <draft-keromytis-tls-authz-keynote-00.txt>
+
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six
+ months and may be updated, replaced, or obsoleted by other
+ documents at any time. It is inappropriate to use Internet-Drafts
+ as reference material or to cite them other than as "work in
+ progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ This document specifies the use of the KeyNote trust-management
+ system as an authorization extension in the Transport Layer
+ Security (TLS) Handshake Protocol, according to [AUTHZ].
+ Extensions carried in the client and server hello messages
+ confirm that both parties support the desired authorization
+ data types. Then, if supported by both the client and the
+ server, KeyNote credentials are exchanged during the
+ supplemental data handshake message.
+
+
+1. Introduction
+
+ This document describes the identifiers necessary to exchange
+ KeyNote [KEYNOTE] credential assertions inside a TLS [TLS1.0]
+ [TLS1.1] exchange. Such credential assertions can authorize
+ the client and/or the server to perform certain actions. In
+ most usage scenarios, the KeyNote credential assertions will
+ be signed by a cryptographic public key [RFC2792]. By using the
+ X.509 key and signature encoding [X509KEY], it is possible to
+ add KeyNote-based authorization and policy compliance support to
+ the existing, unmodified X.509 authentication exchange in TLS.
+
+ A list of KeyNote credentials (e.g., forming a delegation chain)
+ may be sent as part of the same payload.
+
+ In most scenarios, at least one of these credentials will be
+ issued to the public key of the transmitter of the credentials,
+ i.e., said public key will appear in the ``Licensees'' field of
+ at least one KeyNote credential assertion. The same public key
+ will generally be used by the transmitter of the same credentials
+ to authenticate as part of the TLS exchange. The
+ authentication material (e.g., cryptographic public key) that was
+ used by the transmitter to authenticate in the TLS exchange will
+ be provided to the KeyNote evaluation engine as an ``Action
+ Authorizer''.
+
+
+2. KeyNote Credential Assertion Lists
+
+ The KeyNote Assertion List type definition in the TLS Authorization
+ Data Formats registry is:
+
+ keynote_assertion_list(TBA)
+
+ When the keynote_assertion_list value is present, the authorization
+ data is a list of KeyNote credential assertions that conforms to
+ the profile in RFC 2704 [KEYNOTE].
+
+ A KeyNote assertion list is transmitted inside an AuthorizationData
+ structure as an opaque sequence of 1 - 2^16-1 bytes:
+
+ opaque KeyNoteAssertionList<1..2^16-1>;
+
+ When KeyNoteAssertion List is used, the field contains an ASCII-
+ encoded list of signed KeyNote assertions, as described in RFC 2704
+ [KEYNOTE]. The assertions are separated by two '\n' (newline)
+ characters. A KeyNote assertion is a structure similar to a public
+ key certificate; the main difference is that instead of a binding
+ between a name and a public key, KeyNote assertions bind public keys
+ to authorization rules that are evaluated by the peer when the sender
+ later issues specific requests.
+
+ When making an authorization decision based on a list of KeyNote
+ assertions, proper linkage between the KeyNote assertions and the
+ public key certificate that is transferred in the TLS Certificate
+ message is needed. Receivers of a KeyNote assertion list should
+ initialize the ACTION_AUTHORIZER variable to be the sender's public
+ key, which was used to authenticate the TLS exchange. If a
+ different authentication mechanism is used, it is the responsibility
+ of the credential issuer to issue the appropriate credentials.
+
+
+3. IANA Considerations
+
+ This document requires a new entry in the IANA-maintained TLS
+ Authorization Data Formats registry, keynote_assertion_list(TBD).
+ This registry is defined in [AUTHZ].
+
+
+4. Security Considerations
+
+ There are no security considerations beyond those discussed in
+ [KEYNOTE], [RFC2792], and [AUTHZ].
+
+
+5. Normative References
+
+ [IANA] Narten, T., and H. Alvestrand, "Guidelines for Writing
+ an IANA Considerations Section in RFCs", RFC 3434,
+ October 1998.
+
+ [TLS1.0] Dierks, T., and C. Allen, "The TLS Protocol, Version
+ 1.0", RFC 2246, January 1999.
+
+ [TLS1.1] Dierks, T., and E. Rescorla, "The Transport Layer
+ Security (TLS) Protocol, Version 1.1", RFC 4346,
+ February 2006.
+
+
+6. Informative References
+
+ [KEYNOTE] Blaze, M., Feigenbaum, J., Ioannidis, J., and
+ A. Keromytis, "The KeyNote Trust-Management System,
+ Version 2", RFC 2704, September 1999.
+
+ [RFC2792] Blaze, M., Ioannidis, J., and A. Keromytis, "DSA and RSA
+ Key and Signature Encoding for the KeyNote Trust
+ Management System", RFC 2792, March 2000.
+
+ [AUTHZ] Brown, M., and R. Housley, "Transport Layer Security
+ (TLS) Authorization Extensions", June 2006
+ <draft-housley-tls-authz-extns-07.txt>
+
+ [X509KEY] A. D. Keromytis, "X.509 Key and Signature Encoding for
+ the KeyNote Trust Management System", March 2008
+ <draft-keromytis-keynote-x509-00.txt>
+
+
+Author's Address
+
+ Angelos D. Keromytis
+ Department of Computer Science
+ Columbia University
+ Mail Code 0401
+ 1214 Amsterdam Avenue
+ New York, New York 1007
+ USA
+ angelos <at> cs <dot> columbia <dot> edu
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
diff --git a/doc/protocol/draft-nir-tls-eap-03.txt b/doc/protocol/draft-nir-tls-eap-03.txt
new file mode 100644
index 0000000000..5415134610
--- /dev/null
+++ b/doc/protocol/draft-nir-tls-eap-03.txt
@@ -0,0 +1,1176 @@
+
+
+
+TLS Working Group Y. Nir
+Internet-Draft Y. Sheffer
+Intended status: Standards Track Check Point
+Expires: October 6, 2008 H. Tschofenig
+ NSN
+ P. Gutmann
+ University of Auckland
+ April 4, 2008
+
+
+ TLS using EAP Authentication
+ draft-nir-tls-eap-03.txt
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+ This Internet-Draft will expire on October 6, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 1]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+Abstract
+
+ This document describes an extension to the TLS protocol to allow TLS
+ clients to authenticate with legacy credentials using the Extensible
+ Authentication Protocol (EAP).
+
+ This work follows the example of IKEv2, where EAP has been added to
+ the IKEv2 protocol to allow clients to use different credentials such
+ as passwords, token cards, and shared secrets.
+
+ When TLS is used with EAP, additional records are sent after the
+ ChangeCipherSpec protocol message and before the Finished message,
+ effectively creating an extended handshake before the application
+ layer data can be sent. Each EapMsg handshake record contains
+ exactly one EAP message. Using EAP for client authentication allows
+ TLS to be used with various AAA back-end servers such as RADIUS or
+ Diameter.
+
+ TLS with EAP may be used for securing a data connection such as HTTP
+ or POP3. We believe it has three main benefits:
+ o The ability of EAP to work with backend servers can remove that
+ burden from the application layer.
+ o Moving the user authentication into the TLS handshake protects the
+ presumably less secure application layer from attacks by
+ unauthenticated parties.
+ o Using mutual authentication methods within EAP can help thwart
+ certain classes of phishing attacks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 2]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
+ 1.1. EAP Applicability . . . . . . . . . . . . . . . . . . . . 5
+ 1.2. Comparison with Design Alternatives . . . . . . . . . . . 5
+ 1.3. Conventions Used in This Document . . . . . . . . . . . . 5
+ 2. Operating Environment . . . . . . . . . . . . . . . . . . . . 6
+ 3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 7
+ 3.1. The tee_supported Extension . . . . . . . . . . . . . . . 8
+ 3.2. The InterimAuth Handshake Message . . . . . . . . . . . . 8
+ 3.3. The EapMsg Handshake Message . . . . . . . . . . . . . . . 8
+ 3.4. Calculating the Finished message . . . . . . . . . . . . . 9
+ 4. Security Considerations . . . . . . . . . . . . . . . . . . . 10
+ 4.1. InterimAuth vs. Finished . . . . . . . . . . . . . . . . . 10
+ 4.2. Identity Protection . . . . . . . . . . . . . . . . . . . 10
+ 4.3. Mutual Authentication . . . . . . . . . . . . . . . . . . 11
+ 5. Performance Considerations . . . . . . . . . . . . . . . . . . 12
+ 6. Operational Considerations . . . . . . . . . . . . . . . . . . 13
+ 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
+ 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15
+ 9. Changes from Previous Versions . . . . . . . . . . . . . . . . 16
+ 9.1. Changes in version -02 . . . . . . . . . . . . . . . . . . 16
+ 9.2. Changes in version -01 . . . . . . . . . . . . . . . . . . 16
+ 9.3. Changes from the protocol model draft . . . . . . . . . . 16
+ 10. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 17
+ 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18
+ 11.1. Normative References . . . . . . . . . . . . . . . . . . . 18
+ 11.2. Informative References . . . . . . . . . . . . . . . . . . 18
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20
+ Intellectual Property and Copyright Statements . . . . . . . . . . 21
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 3]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+1. Introduction
+
+ This document describes a new extension to [TLS]. This extension
+ allows a TLS client to authenticate using [EAP] instead of performing
+ the authentication at the application level. The extension follows
+ [TLS-EXT]. For the remainder of this document we will refer to this
+ extension as TEE (TLS with EAP Extension).
+
+ TEE extends the TLS handshake beyond the regular setup, to allow the
+ EAP protocol to run between the TLS server (called an "authenticator"
+ in EAP) and the TLS client (called a "supplicant"). This allows the
+ TLS architecture to handle client authentication before exposing the
+ server application software to an unauthenticated client. In doing
+ this, we follow the approach taken for IKEv2 in [RFC4306]. However,
+ similar to regular TLS, we protect the user identity by only sending
+ the client identity after the server has authenticated. In this our
+ solution differs from that of IKEv2.
+
+ Currently used applications that rely on non-certificate user
+ credentials use TLS to authenticate the server only. After that, the
+ application takes over, and presents a login screen where the user is
+ expected to present their credentials.
+
+ This creates several problems. It allows a client to access the
+ application before authentication, thus creating a potential for
+ anonymous attacks on non-hardened applications. Additionally, web
+ pages are not particularly well suited for long shared secrets and
+ for interfacing with certain devices such as USB tokens.
+
+ TEE allows full mutual authentication to occur for all these
+ applications within the TLS exchange. The application receives
+ control only when the user is identified and authenticated. The
+ authentication can be built into the server infrastructure by
+ connecting to an AAA server. The client side can be integrated into
+ client software such as web browsers and mail clients. An EAP
+ infrastructure is already built into some operating systems providing
+ a user interface for each authentication method within EAP.
+
+ We intend TEE to be used for various protocols that use TLS such as
+ HTTPS, in cases where certificate based client authentication is not
+ practical. This includes web-based mail services, online banking,
+ premium content websites and mail clients.
+
+ Another class of applications that may see benefit from TEE are TLS
+ based VPN clients used as part of so-called "SSL VPN" products. No
+ such client protocols have so far been standardized.
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 4]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+1.1. EAP Applicability
+
+ Section 1.3 of [EAP] states that EAP is only applicable for network
+ access authentication, rather than for "bulk data transfer". It then
+ goes on to explain why the transport properties of EAP indeed make it
+ unsuitable for bulk data transfer, e.g. for large file transport.
+ Our proposed use of EAP falls squarely within the applicability as
+ defined, since we make no further use of EAP beyond access
+ authentication.
+
+1.2. Comparison with Design Alternatives
+
+ It has been suggested to implement EAP authentication as part of the
+ protected application, rather than as part of the TLS handshake. A
+ BCP document could be used to describe a secure way of doing this.
+ The drawbacks we see in such an approach are listed below:
+ o EAP does not have a pre-defined transport method. Application
+ designers would need to specify an EAP transport for each
+ application. Making this a part of TLS has the benefit of a
+ single specification for all protected applications.
+ o The integration of EAP and TLS is security-sensitive and should be
+ standardized and interoperable. We do not believe that it should
+ be left to application designers to do this in a secure manner.
+ Specifically on the server-side, integration with AAA servers adds
+ complexity and is more naturally part of the underlying
+ infrastrcture.
+ o Our current proposal provides channel binding between TLS and EAP,
+ to counter the MITM attacks described in [MITM]. TLS does not
+ provide any standard way of extracting cryptographic material from
+ the TLS state, and in most implementations, the TLS state is not
+ exposed to the protected application. Because of this, it is
+ difficult for application designers to bind the user
+ authentication to the protected channel provided by TLS.
+
+1.3. Conventions Used in This Document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 5]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+2. Operating Environment
+
+ TEE will work between a client application and a server application,
+ performing either client authentication or mutual authentication
+ within the TLS exchange.
+
+
+ Client Server
+ +-------------------------+ +------------------------+
+ | |GUI| | Client | |TLS+-+-----+-+TLS| |Server | |
+ | +-^-+ |Software| +-^-+ | +-+-^-+ |Application | |
+ | | +--------+ | | | | |Software | |
+ | | | | | | +------------+ |
+ | +-v----------------v-+ | | | |
+ | | EAP | | +---|--------------------+
+ | | Infrastructure | | |
+ | +--------------------+ | | +--------+
+ +-------------------------+ | | AAA |
+ | | Server |
+ +----- |
+ +--------+
+
+ The above diagram shows the typical deployment. The client has
+ software that either includes a UI for some EAP methods, or else is
+ able to invoke some operating system EAP infrastructure that takes
+ care of the user interaction. The server is configured with the
+ address and protocol of the AAA server. Typically the AAA server
+ communicates using the RADIUS protocol with EAP ([RADIUS] and
+ [RAD-EAP]), or the Diameter protocol ([Diameter] and [Dia-EAP]).
+
+ As stated in the introduction, we expect TEE to be used in both
+ browsers and applications. Further uses may be authentication and
+ key generation for other protocols, and tunneling clients, which so
+ far have not been standardized.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 6]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+3. Protocol Overview
+
+ The TEE extension defines the following:
+ o A new extension type called tee_supported, used to indicate that
+ the communicating application (either client or server) supports
+ this extension.
+ o A new message type for the handshake protocol, called InterimAuth,
+ which is used to sign previous messages.
+ o A new message type for the handshake protocol, called EapMsg,
+ which is used to carry a single EAP message.
+
+ The diagram below outlines the protocol structure. For illustration
+ purposes only, we use the GPSK EAP method [EAP-GPSK].
+
+ Client Server
+ ------ ------
+
+ ClientHello(*) -------->
+ ServerHello(*)
+ (Certificate)
+ ServerKeyExchange
+ EapMsg(Identity-Request)
+ <-------- ServerHelloDone
+ ClientKeyExchange
+ (CertificateVerify)
+ ChangeCipherSpec
+ InterimAuth
+ EapMsg(Identity-Reply) -------->
+ ChangeCipherSpec
+ InterimAuth
+ EapMsg(GPSK-Request)
+ <--------
+ EapMsg(GPSK-Reply) -------->
+ EapMsg(GPSK-Request)
+ <--------
+ EapMsg(GPSK-Reply) -------->
+ EapMsg(Success)
+ <-------- Finished
+ Finished -------->
+
+ (*) The ClientHello and ServerHello include the tee_supported
+ extension to indicate support for TEE
+
+
+ The client indicates in the first message its support for TEE. The
+ server sends an EAP identity request in the reply. The client sends
+ the identity reply after the handshake completion. The EAP request-
+ response sequence continues until the client is either authenticated
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 7]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+ or rejected.
+
+3.1. The tee_supported Extension
+
+ The tee_supported extension is a ClientHello and ServerHello
+ extension as defined in section 2.3 of [TLS-EXT]. The extension_type
+ field is TBA by IANA. The extension_data is zero-length.
+
+3.2. The InterimAuth Handshake Message
+
+ The InterimAuth message is identical in syntax to the Finished
+ message described in section 7.4.9 of [TLS]. It is calculated in
+ exactly the same way.
+
+ The semantics, however, are somewhat different. The "Finished"
+ message indicates that application data may now be sent. The
+ "InterimAuth" message does not indicate this. Instead, further
+ handshake messages are needed.
+
+ The HandshakeType value for the InterimAuth handshake message is TBA
+ by IANA.
+
+3.3. The EapMsg Handshake Message
+
+ The EapMsg handshake message carries exactly one EAP message as
+ defined in [EAP].
+
+ The HandshakeType value for the EapMsg handshake message is TBA by
+ IANA.
+
+ The EapMsg message is used to tunnel EAP messages between the
+ authentication server, which may be co-located with the TLS server,
+ or else may be a separate AAA server, and the supplicant, which is
+ co-located with the TLS client. TLS on either side receives the EAP
+ data from the EAP infrastructure, and treats it as opaque. TLS does
+ not make any changes to the EAP payload or make any decisions based
+ on the contents of an EapMsg handshake message.
+
+ Note that it is expected that the authentication server notifies the
+ TLS server about authentication success or failure, and so TLS need
+ not inspect the eap_payload within the EapMsg to detect success or
+ failure.
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 8]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+ struct {
+ opaque eap_payload[4..65535];
+ } EapMsg;
+
+ eap_payload is defined in section 4 of RFC 3748. It includes
+ the Code, Identifier, Length and Data fields of the EAP
+ packet.
+
+3.4. Calculating the Finished message
+
+ If the EAP method is key-generating (see [I-D.ietf-eap-keying]), the
+ Finished message is calculated as follows:
+
+ struct {
+ opaque verify_data[12];
+ } Finished;
+
+ verify_data
+ PRF(MSK, finished_label, MD5(handshake_messages) +
+ SHA-1(handshake_messages)) [0..11];
+
+ The finished_label and the PRF are as defined in section 7.4.9 of
+ [TLS].
+
+ The handshake_messages field, unlike regular TLS, does not sign all
+ the data in the handshake. Instead it signs all the data that has
+ not been signed by the previous InterimAuth message. The
+ handshake_messages field includes all of the octets beginning with
+ and including the InterimAuth message, up to but not including this
+ Finished message. This is the concatenation of all the Handshake
+ structures exchanged thus far, and not yet signed, as defined in
+ section 7.4 of [TLS]and in this document.
+
+ The Master Session Key (MSK) is derived by the AAA server and by the
+ client if the EAP method is key-generating. On the server-side, it
+ is typically received from the AAA server over the RADIUS or Diameter
+ protocol. On the client-side, it is passed to TLS by some other
+ method.
+
+ If the EAP method is not key-generating, then the master_secret is
+ used to sign the messages instead of the MSK. For a discussion on
+ the use of such methods, see Section 4.1.
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 9]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+4. Security Considerations
+
+4.1. InterimAuth vs. Finished
+
+ In regular TLS, the Finished message provides two functions: it signs
+ all preceding messages, and it signals that application data can now
+ be sent. In TEE, it only signs those messages that have not yet been
+ signed.
+
+ Some EAP methods, such as EAP-TLS, EAP-IKEv2 and EAP-SIM generate
+ keys in addition to authenticating clients. Such methods are said to
+ be resistant to man-in-the-middle (MITM) attacks as discussed in
+ [MITM]. Such methods are called key-generating methods.
+
+ To realize the benefit of such methods, we need to verify the key
+ that was generated within the EAP method. This is referred to as the
+ MSK in EAP. In TEE, the InterimAuth message signs all previous
+ messages with the master_secret, just like the Finished message in
+ regular TLS. The Finished message signs the rest of the messages
+ using the MSK if such exists. If not, then the messages are signed
+ with the master_secret as in regular TLS.
+
+ The need for signing twice arises from the fact that we need to use
+ both the master_secret and the MSK. It was possible to use just one
+ Finished record and blend the MSK into the master_secret. However,
+ this would needlessly complicate the protocol and make security
+ analysis more difficult. Instead, we have decided to follow the
+ example of IKEv2, where two AUTH payloads are exchanged.
+
+ It should be noted that using non-key-generating methods may expose
+ the client to a MITM attack if the same method and credentials are
+ used in some other situation, in which the EAP is done outside of a
+ protected tunnel with an authenticated server. Unless it can be
+ determined that the EAP method is never used in such a situation,
+ non-key-generating methods SHOULD NOT be used. This issue is
+ discussed extensively in [Compound-Authentication].
+
+4.2. Identity Protection
+
+ Unlike [TLS-PSK], TEE provides identity protection for the client.
+ The client's identity is hidden from a passive eavesdropper using TLS
+ encryption. Active attacks are discussed in Section 4.3.
+
+ We could save one round-trip by having the client send its identity
+ within the Client Hello message. This is similar to TLS-PSK.
+ However, we believe that identity protection is a worthy enough goal,
+ so as to justify the extra round-trip.
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 10]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+4.3. Mutual Authentication
+
+ In order to achieve our security goals, we need to have both the
+ server and the client authenticate. Client authentication is
+ obviously done using the EAP method. The server authentication can
+ be done in either of two ways:
+ 1. The client can verify the server certificate. This may work well
+ depending on the scenario, but implies that the client or its
+ user can recognize the right DN or alternate name, and
+ distinguish it from plausible alternatives. The introduction to
+ [I.D.Webauth-phishing] shows that at least in HTTPS, this is not
+ always the case.
+ 2. The client can use a mutually authenticated (MA) EAP method such
+ as GPSK. In this case, server certificate verification does not
+ matter, and the TLS handshake may as well be anonymous. Note
+ that in this case, the client identity is sent to the server
+ before server authentication.
+
+ To summarize:
+ o Clients MUST NOT propose anonymous ciphersuites, unless they
+ support MA EAP methods.
+ o Clients MUST NOT accept non-MA methods if the ciphersuite is
+ anonymous.
+ o Clients MUST NOT accept non-MA methods if they are not able to
+ verify the server credentials. Note that this document does not
+ define what verification involves. If the server DN is known and
+ stored on the client, verifying certificate signature and checking
+ revocation may be enough. For web browsers, the case is not as
+ clear cut, and MA methods SHOULD be used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 11]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+5. Performance Considerations
+
+ Regular TLS adds two round-trips to a TCP connection. However,
+ because of the stream nature of TCP, the client does not really need
+ to wait for the server's Finished message, and can begin sending
+ application data immediately after its own Finished message. In
+ practice, many clients do so, and TLS only adds one round-trip of
+ delay.
+
+ TEE adds as many round-trips as the EAP method requires. For
+ example, EAP-MD5 requires 1 round-trip, while EAP-GPSK requires 2
+ round-trips. Additionally, the client MUST wait for the EAP-Success
+ message before sending its own Finished message, so we need at least
+ 3 round-trips for the entire handshake. The best a client can do is
+ two round-trips plus however many round-trips the EAP method
+ requires.
+
+ It should be noted, though, that these extra round-trips save
+ processing time at the application level. Two extra round-trips take
+ a lot less time than presenting a log-in web page and processing the
+ user's input.
+
+ It should also be noted, that TEE reverses the order of the Finished
+ messages. In regular TLS the client sends the Finished message
+ first. In TEE it is the server that sends the Finished message
+ first. This should not affect performance, and it is clear that the
+ client may send application data immediately after the Finished
+ message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 12]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+6. Operational Considerations
+
+ Section 4.3 defines a dependency between the TLS state and the EAP
+ state in that it mandates that certain EAP methods should not be used
+ with certain TLS ciphersuites. To avoid such dependencies, there are
+ two approaches that implementations can take. They can either not
+ use any anonymous ciphersuites, or else they can use only MA EAP
+ methods.
+
+ Where certificate validation is problematic, such as in browser-based
+ HTTPS, we recommend the latter approach.
+
+ In cases where the use of EAP within TLS is not known before opening
+ the connection, it is necessary to consider the implications of
+ requiring the user to type in credentials after the connection has
+ already started. TCP sessions may time out, because of security
+ considerations, and this may lead to session setup failure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 13]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+7. IANA Considerations
+
+ IANA is asked to assign an extension type value from the
+ "ExtensionType Values" registry for the tee_supported extension.
+
+ IANA is asked to assign two handshake message types from the "TLS
+ HandshakeType Registry", one for "EapMsg" and one for "InterimAuth".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 14]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+8. Acknowledgments
+
+ The authors would like to thank Josh Howlett for his comments.
+
+ The TLS Inner Application Extension work ([TLS/IA]) has inspired the
+ authors to create this simplified work. TLS/IA provides a somewhat
+ different approach to integrating non-certificate credentials into
+ the TLS protocol, in addition to several other features available
+ from the RADIUS namespace.
+
+ The authors would also like to thank the various contributors to
+ [RFC4306] whose work inspired this one.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 15]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+9. Changes from Previous Versions
+
+9.1. Changes in version -02
+
+ o Added discussion of alternative designs.
+
+9.2. Changes in version -01
+
+ o Changed the construction of the Finished message
+ o Replaced MS-CHAPv2 with GPSK in examples.
+ o Added open issues section.
+ o Added reference to [Compound-Authentication]
+ o Fixed reference to MITM attack
+
+9.3. Changes from the protocol model draft
+
+ o Added diagram for EapMsg
+ o Added discussion of EAP applicability
+ o Added discussion of mutually-authenticated EAP methods vs other
+ methods in the security considerations.
+ o Added operational considerations.
+ o Other minor nits.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 16]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+10. Open Issues
+
+ Some have suggested that since the protocol is identical to regular
+ TLS up to the InterimAuth message, we should call that the Finished
+ message, and call the last message in the extended handshake
+ something like "EapFinished". This has the advantage that the
+ construction of Finished is already well defined and will not change.
+ However, the Finished message has a specific meaning as indicated by
+ its name. It means that the handshake is over and that application
+ data can now be sent. This is not true of what is in this draft
+ called InterimAuth. We'd like the opinions of reviewrs about this
+ issue.
+
+ The MSK from the EAP exchange is only used to sign the Finished
+ message. It is not used again in the data encryption. In this we
+ followed the example of IKEv2. The reason is that TLS already has
+ perfectly good ways of exchanging keys, and we do not need this
+ capability from EAP methods. Also, using the MSK in keys would
+ require an additional ChangeCipherSpec and would complicate the
+ protocol. We'd like the opinions of reviewrs about this issue.
+
+ Another response we got was that we should have a MUST requirement
+ that only mutually authenticated and key-generating methods be used
+ in TEE. This would simplify the security considerations section.
+ While we agree that this is a good idea, most EAP methods in common
+ use are not compliant. Additionally, such requirements assume that
+ EAP packets are visible to a passive attacker. As EAP is used in
+ protected tunnels such as in L2TP, in IKEv2 and here, this assumption
+ may not be required. If we consider the server authenticated by its
+ certificate, it may be acceptable to use a non-MA method.
+
+ It has been suggested that identity protection is not important
+ enough to add a roundtrip, and so we should have the client send the
+ username in the ClientHello. We are not sure about how others feel
+ about this, and would like to solicit the reviewers opinion. Note
+ that if this is done, the client sends the user name before ever
+ receiving any indication that the server actually supports TEE. This
+ might be acceptable in an email client, where the server is
+ preconfigured, but it may be unacceptable in other uses, such as web
+ browsers.
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 17]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+11. References
+
+11.1. Normative References
+
+ [EAP] Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H.
+ Levkowetz, "Extensible Authentication Protocol (EAP)",
+ RFC 3748, June 2004.
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.1", RFC 4346, April 2006.
+
+ [TLS-EXT] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J.,
+ and T. Wright, "Transport Layer Security (TLS)
+ Extensions", RFC 4366, April 2006.
+
+11.2. Informative References
+
+ [Compound-Authentication]
+ Puthenkulam, J., Lortz, V., Palekar, A., and D. Simon,
+ "The Compound Authentication Binding Problem",
+ draft-puthenkulam-eap-binding-04 (work in progress),
+ October 2003.
+
+ [Dia-EAP] Eronen, P., Hiller, T., and G. Zorn, "Diameter Extensible
+ Authentication Protocol (EAP) Application", RFC 4072,
+ August 2005.
+
+ [Diameter]
+ Calhoun, P., Loughney, J., Guttman, E., Zorn, G., and J.
+ Arkko, "Diameter Base Protocol", RFC 3588, September 2003.
+
+ [EAP-GPSK]
+ Clancy, T. and H. Tschofenig, "EAP Generalized Pre-Shared
+ Key (EAP-GPSK)", draft-ietf-emu-eap-gpsk-05 (work in
+ progress), April 2007.
+
+ [I-D.ietf-eap-keying]
+ Aboba, B., "Extensible Authentication Protocol (EAP) Key
+ Management Framework", draft-ietf-eap-keying-18 (work in
+ progress), February 2007.
+
+ [I.D.Webauth-phishing]
+ Hartman, S., "Requirements for Web Authentication
+ Resistant to Phishing", draft-hartman-webauth-phishing-03
+ (work in progress), March 2007.
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 18]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+ [MITM] Asokan, N., Niemi, V., and K. Nyberg, "Man-in-the-Middle
+ in Tunneled Authentication Protocols", IACR ePrint
+ Archive , October 2002.
+
+ [RAD-EAP] Aboba, B. and P. Calhoun, "RADIUS (Remote Authentication
+ Dial In User Service) Support For Extensible
+ Authentication Protocol (EAP)", RFC 3579, September 2003.
+
+ [RADIUS] Rigney, C., Willens, S., Rubens, A., and W. Simpson,
+ "Remote Authentication Dial In User Service (RADIUS)",
+ RFC 2865, June 2000.
+
+ [RFC4306] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol",
+ RFC 4306, December 2005.
+
+ [TLS-PSK] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites
+ for Transport Layer Security (TLS)", RFC 4279,
+ December 2005.
+
+ [TLS/IA] Funk, P., Blake-Wilson, S., Smith, H., Tschofenig, N., and
+ T. Hardjono, "TLS Inner Application Extension (TLS/IA)",
+ draft-funk-tls-inner-application-extension-03 (work in
+ progress), June 2006.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 19]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+Authors' Addresses
+
+ Yoav Nir
+ Check Point Software Technologies Ltd.
+ 5 Hasolelim st.
+ Tel Aviv 67897
+ Israel
+
+ Email: ynir@checkpoint.com
+
+
+ Yaron Sheffer
+ Check Point Software Technologies Ltd.
+ 5 Hasolelim st.
+ Tel Aviv 67897
+ Israel
+
+ Email: yaronf at checkpoint dot com
+
+
+ Hannes Tschofenig
+ Nokia Siemens Networks
+ Otto-Hahn-Ring 6
+ Munich, Bavaria 81739
+ Germany
+
+ Email: Hannes.Tschofenig@siemens.com
+ URI: http://www.tschofenig.com
+
+
+ Peter Gutmann
+ University of Auckland
+ Department of Computer Science
+ New Zealand
+
+ Email: pgut001@cs.auckland.ac.nz
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 20]
+
+Internet-Draft EAP-in-TLS April 2008
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+Nir, et al. Expires October 6, 2008 [Page 21]
+
diff --git a/doc/protocol/draft-rescorla-tls-suiteb-02.txt b/doc/protocol/draft-rescorla-tls-suiteb-02.txt
new file mode 100644
index 0000000000..a8ac2cf2b3
--- /dev/null
+++ b/doc/protocol/draft-rescorla-tls-suiteb-02.txt
@@ -0,0 +1,449 @@
+
+
+
+Network Working Group M. Salter
+Internet-Draft National Security Agency
+Intended status: Informational E. Rescorla
+Expires: October 16, 2008 Network Resonance
+ April 14, 2008
+
+
+ Suite B Cipher Suites for TLS
+ draft-rescorla-tls-suiteb-02.txt
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+ This Internet-Draft will expire on October 16, 2008.
+
+Copyright Notice
+
+ Copyright (C) The IETF Trust (2008).
+
+Abstract
+
+ The United States Government has published guidelines for "NSA Suite
+ B Cryptography" dated July, 2005, which defines cryptographic
+ algorithm polcy for national security applications. This document
+ defines a profile of TLS which is conformant with Suite B.
+
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 1]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
+ 2. Conventions Used In This Document . . . . . . . . . . . . . . . 3
+ 3. Suite B Requirements . . . . . . . . . . . . . . . . . . . . . 3
+ 4. Suite B Compliance Requirements . . . . . . . . . . . . . . . . 4
+ 4.1. Security Levels . . . . . . . . . . . . . . . . . . . . . . 4
+ 4.2. Acceptable Curves . . . . . . . . . . . . . . . . . . . . . 5
+ 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
+ 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
+ 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 6
+ 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
+ 8.1. Normative References . . . . . . . . . . . . . . . . . . . 6
+ 8.2. Informative References . . . . . . . . . . . . . . . . . . 7
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 7
+ Intellectual Property and Copyright Statements . . . . . . . . . . 8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 2]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+1. Introduction
+
+ In July, 2005 the National Security Agency posted "Fact Sheet, NSA
+ Suite B Cryptography" which stated:
+
+ To complement the existing policy for the use of the Advanced
+ Encryption Standard (AES) to protect national security systems
+ and information as specified in The National Policy on the use of
+ the Advanced Encryption Standard (AES) to Protect National
+ Security Systems and National Security Information (CNSSP-15),
+ the National Security Agency (NSA) announced Suite B Cryptography
+ at the 2005 RSA Conference. In addition to the AES, Suite B
+ includes cryptographic algorithms for hashing, digital
+ signatures, and key exchange.
+
+ Suite B only specifies the cryptographic algorithms to be
+ used. Many other factors need to be addressed in determining
+ whether a particular device implementing a particular set of
+ cryptographic algorithms should be used to satisfy a particular
+ requirement.
+
+ Among those factors are "requirements for interoperability both
+ domestically and internationally".
+
+ This document is a profile of of TLS 1.2 [I-D.ietf-tls-rfc4346-bis]
+ and of the cipher suites defined in [I-D.ietf-tls-ecc-new-mac], but
+ does not itself define any new cipher suites. This profile requires
+ TLS 1.2.
+
+
+2. Conventions Used In This Document
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
+
+3. Suite B Requirements
+
+ The "Suite B Fact Sheet" requires that key establishment and
+ authentication algorithms be based on Elliptic Curve Cryptography,
+ that the encryption algorithm be AES [AES], and that the function
+ used for key derivation and data integrity be SHA [SHS]. It defines
+ two security levels, of 128 and 192 bits.
+
+ In particular it states:
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 3]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+ SUITE B includes:
+
+ Encryption: Advanced Encryption Standard (AES) -
+ FIPS 197 (with keys sizes of 128 and 256
+ bits)
+
+ Digital Signature: Elliptic Curve Digital Signature Algorithm -
+ FIPS 186-2 (using the curves with 256 and
+ 384-bit prime moduli)
+
+ Key Exchange: Elliptic Curve Diffie-Hellman or Elliptic
+ Curve MQV Draft NIST Special Publication
+ 800-56 (using the curves with 256 and
+ 384-bit prime moduli)
+
+ Hashing: Secure Hash Algorithm - FIPS 180-2
+ (using SHA-256 and SHA-384)
+
+ All implementations of Suite B must, at a minimum, include AES
+ with 128-bit keys, the 256-bit prime modulus elliptic curve and
+ SHA-256 as a common mode for widespread interoperability.
+
+ The 128-bit security level corresponds to an elliptic curve size of
+ 256 bits, AES-128, and SHA-256. The 192-bit security level
+ corresponds to an elliptic curve size of 384 bits, AES-256, and SHA-
+ 384.
+
+
+4. Suite B Compliance Requirements
+
+ To be considered "Suite B compatible" at least one of the Galois
+ Counter Mode (GCM) CipherSuites defined in [I-D.ietf-tls-ecc-new-mac]
+ MUST be negotiated. In compliance with the guidance in the Suite B
+ Fact Sheet every TLS implementation of Suite B SHOULD implement
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.
+
+4.1. Security Levels
+
+ As described in Section 1, Suite B specifies two security levels, 128
+ and 192 bit. The following table lists the security levels for each
+ cipher suite:
+
+
+
+
+
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 4]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+ +-----------------------------------------+----------------+
+ | Cipher Suite | Security Level |
+ +-----------------------------------------+----------------+
+ | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 | 128 |
+ | TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 | 128 |
+ | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 | 192 |
+ | TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 | 192 |
+ +-----------------------------------------+----------------+
+
+4.2. Acceptable Curves
+
+ RFC 4492 defines a variety of elliptic curves. For cipher suites
+ defined in this specification, only secp256r1 (23) or secp384r1 (24)
+ may be used. (These are the same curves that appear in FIPS 186-2
+ [DSS] as P-256 and P-384, respectively.) For cipher suites at the
+ 128-bit security level, secp256r1 MUST be used. For cipher suites at
+ the 192-bit security level, secp384r1 MUST be used. RFC 4492
+ requires that uncompressed (0) form be supported.
+ ansiX962_compressed_prime(1) point formats MAY be supported.
+
+ Clients desiring to negotiate only a Suite B-compliant connection
+ MUST generate a "Supported Elliptic Curves Extension" containing only
+ the allowed curves. These curves MUST match the cipher suite
+ security levels being offered. Clients which are willing to do both
+ Suite B-compliant and non-Suite B-compliant connections MAY omit the
+ extension or send the extension but offer other curves as well as the
+ appropriate Suite B ones.
+
+ Servers desiring to negotiate a Suite B-compliant connection SHOULD
+ check for the presence of the extension, but MUST NOT negotiate
+ inappropriate curves even if they are offered by the client. This
+ allows a Client which is willing to do either Suite B-compliant or
+ non-Suite B-compliant modes to interoperate with a server which will
+ only do Suite B-compliant modes. If the client does not advertise an
+ acceptable curve, the server MUST generate a fatal
+ "handshake_failure" alert and terminate the connection. Clients MUST
+ check the chosen curve to make sure it is acceptable.
+
+
+5. Security Considerations
+
+ Most of the security considerations for this document are described
+ in TLS 1.2 [I-D.ietf-tls-rfc4346-bis], RFC 4492 [RFC4492],
+ [I-D.ietf-tls-rsa-aes-gcm], and [I-D.ietf-tls-ecc-new-mac]. Readers
+ should consult those documents.
+
+ In order to meet the goal of a consistent security level for the
+ entire cipher suite, in Suite B mode TLS implementations MUST ONLY
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 5]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+ use the curves defined in Section 4.2. Otherwise, it is possible to
+ have a set of symmetric algorithms with much weaker or stronger
+ security properties than the asymmetric (ECC) algorithms.
+
+
+6. IANA Considerations
+
+ This document defines no actions for IANA.
+
+
+7. Acknowledgements
+
+ This work was supported by the US Department of Defense.
+
+
+8. References
+
+8.1. Normative References
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B.
+ Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites
+ for Transport Layer Security (TLS)", RFC 4492, May 2006.
+
+ [I-D.ietf-tls-rfc4346-bis]
+ Dierks, T. and E. Rescorla, "The Transport Layer Security
+ (TLS) Protocol Version 1.2", draft-ietf-tls-rfc4346-bis-10
+ (work in progress), March 2008.
+
+ [I-D.ietf-tls-ecc-new-mac]
+ Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
+ 256/384 and AES Galois Counter Mode",
+ draft-ietf-tls-ecc-new-mac-04 (work in progress),
+ February 2008.
+
+ [AES] National Institute of Standards and Technology,
+ "Specification for the Advanced Encryption Standard
+ (AES)", FIPS 197, November 2001.
+
+ [SHS] National Institute of Standards and Technology, "Secure
+ Hash Standard", FIPS 180-2, August 2002.
+
+ [DSS] National Institute of Standards and Technology, "Digital
+ Signature Standard", FIPS 186-2, January 2000.
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 6]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+8.2. Informative References
+
+ [I-D.ietf-tls-rsa-aes-gcm]
+ Salowey, J., Choudhury, A., and D. McGrew, "AES-GCM Cipher
+ Suites for TLS", draft-ietf-tls-rsa-aes-gcm-02 (work in
+ progress), February 2008.
+
+
+Authors' Addresses
+
+ Margaret Salter
+ National Security Agency
+ 9800 Savage Rd.
+ Fort Meade 20755-6709
+ USA
+
+ Email: msalter@restarea.ncsc.mil
+
+
+ Eric Rescorla
+ Network Resonance
+ 2064 Edgewood Drive
+ Palo Alto 94303
+ USA
+
+ Email: ekr@rtfm.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 7]
+
+Internet-Draft Suite B for TLS April 2008
+
+
+Full Copyright Statement
+
+ Copyright (C) The IETF Trust (2008).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
+ THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+Salter & Rescorla Expires October 16, 2008 [Page 8]
+
+
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 30f859484e..747b62cd64 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -18,7 +18,7 @@ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting the functions and macros.
# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR=../../
+DOC_SOURCE_DIR=../../lib --source-dir=../../libextra --source-dir=../../includes
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
@@ -46,6 +46,7 @@ HFILE_GLOB=$(top_srcdir)/includes/gnutls/*.h $(top_builddir)/includes/gnutls/*.h
CFILE_GLOB=$(top_srcdir)/lib/*.c \
$(top_srcdir)/lib/x509/*.c \
$(top_srcdir)/lib/openpgp/*.c \
+ $(top_srcdir)/lib/opencdk/*.c \
$(top_srcdir)/libextra/*.c \
$(top_srcdir)/lib/minitasn1/*.c
diff --git a/gl/fseeko.c b/gl/fseeko.c
index 0e6dfab169..87ac92d9d9 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -70,7 +70,12 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
? fp->_bf._size
: 0)
&& fp_ub._base == NULL)
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
+#elif defined __EMX__ /* emx+gcc */
+ if (fp->_ptr == fp->_buffer
+ && fp->_rcount == 0
+ && fp->_wcount == 0
+ && fp->_ungetc_count == 0)
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
# define fp_ ((struct { unsigned char *_ptr; \
unsigned char *_base; \
@@ -82,6 +87,11 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
# else
+# if defined _SCO_DS /* OpenServer */
+# define _base __base
+# define _ptr __ptr
+# define _cnt __cnt
+# endif
if (fp->_ptr == fp->_base
&& (fp->_ptr == NULL || fp->_cnt == 0))
# endif
@@ -112,7 +122,12 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
fp->_offset = pos;
fp->_flags |= __SOFF;
fp->_flags &= ~__SEOF;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
+#elif defined __EMX__ /* emx+gcc */
+ fp->_flags &= ~_IOEOF;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+# if defined _SCO_DS /* OpenServer */
+# define _flag __flag
+# endif
fp->_flag &= ~_IOEOF;
#endif
return 0;
diff --git a/gl/getdelim.c b/gl/getdelim.c
index beb131aef6..3c519ccbf4 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007 Free
+ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or
@@ -42,11 +42,6 @@
# define funlockfile(x) ((void) 0)
#endif
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'ed as
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index d72e891acc..7ef38354e6 100644
--- a/gl/gnulib.mk
+++ b/gl/gnulib.mk
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet error fdl gendocs getaddrinfo getline getpass gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
MOSTLYCLEANFILES += core *.stackdump
@@ -101,6 +101,16 @@ EXTRA_libgnu_la_SOURCES += getpass.c
## end gnulib module getpass
+## begin gnulib module gnumakefile
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+ test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+
+EXTRA_DIST += $(top_srcdir)/GNUmakefile
+
+## end gnulib module gnumakefile
+
## begin gnulib module gnupload
@@ -151,7 +161,7 @@ EXTRA_libgnu_la_SOURCES += lseek.c
## begin gnulib module maintainer-makefile
-EXTRA_DIST += $(top_srcdir)/build-aux/GNUmakefile $(top_srcdir)/build-aux/maint.mk
+EXTRA_DIST += $(top_srcdir)/maint.mk
## end gnulib module maintainer-makefile
diff --git a/gl/m4/eoverflow.m4 b/gl/m4/eoverflow.m4
new file mode 100644
index 0000000000..3bffd10ed1
--- /dev/null
+++ b/gl/m4/eoverflow.m4
@@ -0,0 +1,70 @@
+# eoverflow.m4 serial 2
+dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like AIX 3) don't define it, and some systems
+# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+
+# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
+# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
+# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
+# value.
+
+AC_DEFUN([gl_EOVERFLOW],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+
+ AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
+ AC_EGREP_CPP(yes,[
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
+ ac_cv_decl_EOVERFLOW=yes
+ else
+ AC_EGREP_CPP(yes,[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ else
+ dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but
+ dnl don't define it as EINVAL, because snprintf() callers want to
+ dnl distinguish EINVAL and EOVERFLOW.
+ ac_cv_decl_EOVERFLOW=E2BIG
+ fi
+ fi
+ ])
+ if test "$ac_cv_decl_EOVERFLOW" != yes; then
+ AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
+ [Define as good substitute value for EOVERFLOW.])
+ EOVERFLOW="$ac_cv_decl_EOVERFLOW"
+ AC_SUBST(EOVERFLOW)
+ fi
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 2e9b9cdac2..57c36684e0 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet error fdl gendocs getaddrinfo getline getpass gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --avoid=gettext-h --avoid=malloc-posix --avoid=realloc-posix --avoid=snprintf --avoid=stdbool --avoid=stdio --avoid=string --avoid=sys_socket --avoid=unistd --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl --no-vc-files arpa_inet error fdl gendocs getaddrinfo getline getpass gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 maintainer-makefile progname readline version-etc-fsf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -31,3 +31,4 @@ gl_MAKEFILE_NAME([gnulib.mk])
gl_LIBTOOL
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([])
+gl_VC_FILES([false])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 9336d72605..3edfc120f8 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,9 +1,28 @@
-# gnulib-common.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 4
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+# gl_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+])
+
# gl_MODULE_INDICATOR([modulename])
# defines a C macro indicating the presence of the given module.
AC_DEFUN([gl_MODULE_INDICATOR],
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 9b4c130517..832095bb72 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -44,7 +44,9 @@ AC_DEFUN([gl_INIT],
m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
+ gl_COMMON
gl_source_base='gl'
+ gl_EOVERFLOW
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
gl_ERROR
@@ -59,6 +61,16 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GETLINE
gl_STDIO_MODULE_INDICATOR([getline])
gl_FUNC_GETPASS
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
gl_INET_NTOP
gl_INET_PTON
gl_FUNC_LSEEK
@@ -94,6 +106,7 @@ AC_DEFUN([gl_INIT],
m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
+ gl_COMMON
gl_source_base='gl/tests'
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
@@ -187,11 +200,9 @@ AC_DEFUN([gltests_LIBSOURCES], [
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
- build-aux/GNUmakefile
build-aux/config.rpath
build-aux/gendocs.sh
build-aux/gnupload
- build-aux/maint.mk
doc/fdl.texi
doc/gendocs_template
doc/gpl-3.0.texi
@@ -224,6 +235,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/version-etc.c
lib/version-etc.h
m4/arpa_inet_h.m4
+ m4/eoverflow.m4
m4/error.m4
m4/extensions.m4
m4/fseeko.m4
@@ -245,4 +257,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdarg.m4
m4/strdup.m4
m4/strerror.m4
+ top/GNUmakefile
+ top/maint.mk
])
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 7c08e9319b..a842e2a236 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 5
+# include_next.m4 serial 6
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -71,7 +71,7 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
AC_REQUIRE([gl_INCLUDE_NEXT])
AC_CHECK_HEADERS_ONCE([$1])
- AC_FOREACH([gl_HEADER_NAME], [$1],
+ m4_foreach_w([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
[gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
if test $gl_cv_have_include_next = yes; then
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index e3d26fc42d..1602895105 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 13 (gettext-0.17)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# lib-link.m4 serial 15 (gettext-0.18)
+dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -39,8 +39,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
@@ -57,9 +57,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
dnl accordingly.
@@ -95,8 +95,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl Determine the platform dependent parameters needed to use rpath:
@@ -136,6 +136,27 @@ AC_DEFUN([AC_LIB_RPATH],
:, enable_rpath=yes)
])
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
@@ -144,19 +165,23 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
dnl Autoconf >= 2.61 supports dots in --with options.
- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -609,6 +634,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
done
fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
])
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
diff --git a/includes/gnutls/crypto.h b/includes/gnutls/crypto.h
index b4f5a6ff50..8d44a0eac4 100644
--- a/includes/gnutls/crypto.h
+++ b/includes/gnutls/crypto.h
@@ -43,6 +43,19 @@ typedef struct gnutls_crypto_mac {
void (*deinit)( void* ctx);
} gnutls_crypto_mac_st;
+typedef enum gnutls_rnd_level
+{
+ GNUTLS_RND_KEY = 0,
+ GNUTLS_RND_RANDOM = 1, /* unpredictable */
+ GNUTLS_RND_NONCE = 2,
+} gnutls_rnd_level_t;
+
+typedef struct gnutls_crypto_rnd {
+ int (*init)( void** ctx);
+ int (*rnd) ( void* ctx, int /* gnutls_rnd_level_t */ level, void* data, int datasize);
+ void (*deinit)( void* ctx);
+} gnutls_crypto_rnd_st;
+
/* the same... setkey should be null */
typedef gnutls_crypto_mac_st gnutls_crypto_digest_st;
@@ -51,5 +64,6 @@ typedef gnutls_crypto_mac_st gnutls_crypto_digest_st;
int gnutls_crypto_cipher_register( gnutls_cipher_algorithm_t algorithm, int priority, gnutls_crypto_cipher_st* s);
int gnutls_crypto_mac_register( gnutls_mac_algorithm_t algorithm, int priority, gnutls_crypto_mac_st* s);
int gnutls_crypto_digest_register( gnutls_digest_algorithm_t algorithm, int priority, gnutls_crypto_digest_st* s);
+int gnutls_crypto_rnd_register( int priority, gnutls_crypto_rnd_st* s);
#endif
diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in
index 0292ab7cc0..eb7f8a7a27 100644
--- a/includes/gnutls/gnutls.h.in
+++ b/includes/gnutls/gnutls.h.in
@@ -126,6 +126,8 @@ extern "C"
GNUTLS_MAC_SHA256,
GNUTLS_MAC_SHA384,
GNUTLS_MAC_SHA512
+ /* If you add anything here, make sure you align with
+ gnutls_digest_algorithm_t, in particular SHA-224. */
} gnutls_mac_algorithm_t;
/* The enumerations here should have the same value with
@@ -140,7 +142,8 @@ extern "C"
GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2,
GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256,
GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384,
- GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512
+ GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512,
+ GNUTLS_DIG_SHA224
} gnutls_digest_algorithm_t;
/* exported for other gnutls headers. This is the maximum number of
@@ -308,7 +311,8 @@ extern "C"
GNUTLS_SIGN_RSA_RMD160,
GNUTLS_SIGN_RSA_SHA256,
GNUTLS_SIGN_RSA_SHA384,
- GNUTLS_SIGN_RSA_SHA512
+ GNUTLS_SIGN_RSA_SHA512,
+ GNUTLS_SIGN_RSA_SHA224
} gnutls_sign_algorithm_t;
const char *gnutls_sign_algorithm_get_name (gnutls_sign_algorithm_t
diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h
index e921de1e1e..e56a226e4e 100644
--- a/includes/gnutls/openpgp.h
+++ b/includes/gnutls/openpgp.h
@@ -178,7 +178,7 @@ extern "C"
int gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key, const gnutls_openpgp_keyid_t keyid);
int gnutls_openpgp_privkey_get_preferred_key_id (gnutls_openpgp_privkey_t key, gnutls_openpgp_keyid_t keyid);
- int gnutls_openpgp_crt_get_auth_subkey( gnutls_openpgp_crt_t crt, gnutls_openpgp_keyid_t keyid);
+ int gnutls_openpgp_crt_get_auth_subkey( gnutls_openpgp_crt_t crt, gnutls_openpgp_keyid_t keyid, unsigned int flag);
/* Keyring stuff.
*/
diff --git a/lgl/Makefile.am b/lgl/Makefile.am
index dd94a7cb5e..3f0e17eafb 100644
--- a/lgl/Makefile.am
+++ b/lgl/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl=2 --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-camellia crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 func gettext memmem-simple memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=lgl/override --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-camellia crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 func gettext memmem-simple memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
@@ -434,6 +434,7 @@ stdlib.h: stdlib.in.h
-e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
@@ -441,9 +442,11 @@ stdlib.h: stdlib.in.h
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
-e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
-e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/stdlib.in.h; \
diff --git a/lgl/gc-gnulib.c b/lgl/gc-gnulib.c
index ce4ff029c2..27fafe452b 100644
--- a/lgl/gc-gnulib.c
+++ b/lgl/gc-gnulib.c
@@ -1,5 +1,5 @@
/* gc-gnulib.c --- Common gnulib internal crypto interface functions
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
@@ -73,15 +73,40 @@
#undef open
#undef close
+#ifdef GNULIB_GC_RANDOM
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <wincrypt.h>
+HCRYPTPROV g_hProv = 0;
+# endif
+#endif
+
Gc_rc
gc_init (void)
{
+#ifdef GNULIB_GC_RANDOM
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if(g_hProv)
+ CryptReleaseContext(g_hProv, 0);
+ CryptAcquireContext(&g_hProv, NULL, NULL, PROV_RSA_FULL, 0);
+# endif
+#endif
+
return GC_OK;
}
void
gc_done (void)
{
+#ifdef GNULIB_GC_RANDOM
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if(g_hProv)
+ {
+ CryptReleaseContext(g_hProv, 0);
+ g_hProv = 0;
+ }
+# endif
+#endif
+
return;
}
@@ -92,6 +117,11 @@ gc_done (void)
static Gc_rc
randomize (int level, char *data, size_t datalen)
{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if(!g_hProv)
+ return GC_RANDOM_ERROR;
+ CryptGenRandom(g_hProv, (DWORD)datalen, data);
+#else
int fd;
const char *device;
size_t len = 0;
@@ -140,6 +170,7 @@ randomize (int level, char *data, size_t datalen)
rc = close (fd);
if (rc < 0)
return GC_RANDOM_ERROR;
+#endif
return GC_OK;
}
diff --git a/lgl/gc-libgcrypt.c b/lgl/gc-libgcrypt.c
index 73c81254ea..0b7e003a13 100644
--- a/lgl/gc-libgcrypt.c
+++ b/lgl/gc-libgcrypt.c
@@ -294,6 +294,12 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle)
gcryalg = GCRY_MD_SHA512;
break;
+#ifdef ENABLE_CAMELLIA
+ case GC_SHA224:
+ gcryalg = GCRY_MD_SHA224;
+ break;
+#endif
+
case GC_RMD160:
gcryalg = GCRY_MD_RMD160;
break;
@@ -393,6 +399,12 @@ gc_hash_digest_length (Gc_hash hash)
len = GC_SHA512_DIGEST_SIZE;
break;
+#ifdef ENABLE_CAMELLIA
+ case GC_SHA224:
+ len = GC_SHA224_DIGEST_SIZE;
+ break;
+#endif
+
default:
return 0;
}
@@ -508,6 +520,12 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *resbuf)
break;
#endif
+#ifdef GNULIB_GC_SHA224
+ case GC_SHA224:
+ gcryalg = GCRY_MD_SHA224;
+ break;
+#endif
+
#ifdef GNULIB_GC_RMD160
case GC_RMD160:
gcryalg = GCRY_MD_RMD160;
diff --git a/lgl/gc.h b/lgl/gc.h
index da29344ebd..2b87101219 100644
--- a/lgl/gc.h
+++ b/lgl/gc.h
@@ -1,5 +1,5 @@
/* gc.h --- Header file for implementation agnostic crypto wrapper API.
- * Copyright (C) 2002, 2003, 2004, 2005, 2007 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
@@ -48,7 +48,8 @@ enum Gc_hash
GC_RMD160,
GC_SHA256,
GC_SHA384,
- GC_SHA512
+ GC_SHA512,
+ GC_SHA224
};
typedef enum Gc_hash Gc_hash;
@@ -68,6 +69,7 @@ typedef void *gc_hash_handle;
#define GC_SHA256_DIGEST_SIZE 32
#define GC_SHA384_DIGEST_SIZE 48
#define GC_SHA512_DIGEST_SIZE 64
+#define GC_SHA224_DIGEST_SIZE 24
/* Cipher types. */
enum Gc_cipher
diff --git a/lgl/m4/gc-random.m4 b/lgl/m4/gc-random.m4
index e86cf6f0ec..c66e071314 100644
--- a/lgl/m4/gc-random.m4
+++ b/lgl/m4/gc-random.m4
@@ -1,5 +1,5 @@
-# gc-random.m4 serial 2
-dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# gc-random.m4 serial 3
+dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -39,21 +39,21 @@ AC_DEFUN([gl_GC_RANDOM],
AC_MSG_CHECKING([device with (strong) random data...])
AC_ARG_ENABLE(random-device,
- AC_HELP_STRING([--enable-random-device],
+ AS_HELP_STRING([--enable-random-device],
[device with (strong) randomness (for Nettle)]),
NAME_OF_RANDOM_DEVICE=$enableval)
AC_MSG_RESULT($NAME_OF_RANDOM_DEVICE)
AC_MSG_CHECKING([device with pseudo random data...])
AC_ARG_ENABLE(pseudo-random-device,
- AC_HELP_STRING([--enable-pseudo-random-device],
+ AS_HELP_STRING([--enable-pseudo-random-device],
[device with pseudo randomness (for Nettle)]),
NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval)
AC_MSG_RESULT($NAME_OF_PSEUDO_RANDOM_DEVICE)
AC_MSG_CHECKING([device with unpredictable data for nonces...])
AC_ARG_ENABLE(nonce-device,
- AC_HELP_STRING([--enable-nonce-device],
+ AS_HELP_STRING([--enable-nonce-device],
[device with unpredictable nonces (for Nettle)]),
NAME_OF_NONCE_DEVICE=$enableval)
AC_MSG_RESULT($NAME_OF_NONCE_DEVICE)
@@ -72,7 +72,7 @@ AC_DEFUN([gl_GC_RANDOM],
AC_MSG_WARN([[Device `$NAME_OF_NONCE_DEVICE' does not exist, consider to use --enable-nonce-device]]))
fi
else
- AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]])
+ AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]])
fi
# FIXME?: Open+read 42 bytes+close twice and compare data. Should differ.
diff --git a/lgl/m4/gnulib-cache.m4 b/lgl/m4/gnulib-cache.m4
index 02e91aa2e0..b081708467 100644
--- a/lgl/m4/gnulib-cache.m4
+++ b/lgl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -15,10 +15,10 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl=2 --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-camellia crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 func gettext memmem-simple memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --local-dir=lgl/override --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-camellia crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 func gettext memmem-simple memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_LOCAL_DIR([])
+gl_LOCAL_DIR([lgl/override])
gl_MODULES([crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-camellia crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 func gettext memmem-simple memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
gl_AVOID([])
gl_SOURCE_BASE([lgl])
@@ -32,3 +32,4 @@ gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([lgl])
gl_PO_DOMAIN([])
+gl_VC_FILES([false])
diff --git a/lgl/m4/gnulib-common.m4 b/lgl/m4/gnulib-common.m4
index 9336d72605..3edfc120f8 100644
--- a/lgl/m4/gnulib-common.m4
+++ b/lgl/m4/gnulib-common.m4
@@ -1,9 +1,28 @@
-# gnulib-common.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 4
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+# gl_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+])
+
# gl_MODULE_INDICATOR([modulename])
# defines a C macro indicating the presence of the given module.
AC_DEFUN([gl_MODULE_INDICATOR],
diff --git a/lgl/m4/gnulib-comp.m4 b/lgl/m4/gnulib-comp.m4
index 79586543b6..3ee744ae8f 100644
--- a/lgl/m4/gnulib-comp.m4
+++ b/lgl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -38,7 +38,9 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([AC_LIBOBJ], m4_defn([lgl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([lgl_LIBSOURCES]))
+ gl_COMMON
gl_source_base='lgl'
+ gl_EOVERFLOW
gl_FUNC_ALLOCA
gl_GC
if test $gl_cond_libtool = false; then
@@ -133,6 +135,7 @@ AC_DEFUN([lgl_INIT],
m4_pushdef([AC_LIBOBJ], m4_defn([lgltests_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgltests_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([lgltests_LIBSOURCES]))
+ gl_COMMON
gl_source_base='tests'
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
diff --git a/lgl/m4/include_next.m4 b/lgl/m4/include_next.m4
index 7c08e9319b..a842e2a236 100644
--- a/lgl/m4/include_next.m4
+++ b/lgl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 5
+# include_next.m4 serial 6
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -71,7 +71,7 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
AC_REQUIRE([gl_INCLUDE_NEXT])
AC_CHECK_HEADERS_ONCE([$1])
- AC_FOREACH([gl_HEADER_NAME], [$1],
+ m4_foreach_w([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
[gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
if test $gl_cv_have_include_next = yes; then
diff --git a/lgl/m4/lib-link.m4 b/lgl/m4/lib-link.m4
index e3d26fc42d..1602895105 100644
--- a/lgl/m4/lib-link.m4
+++ b/lgl/m4/lib-link.m4
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 13 (gettext-0.17)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# lib-link.m4 serial 15 (gettext-0.18)
+dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -39,8 +39,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
@@ -57,9 +57,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
dnl accordingly.
@@ -95,8 +95,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl Determine the platform dependent parameters needed to use rpath:
@@ -136,6 +136,27 @@ AC_DEFUN([AC_LIB_RPATH],
:, enable_rpath=yes)
])
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
@@ -144,19 +165,23 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
dnl Autoconf >= 2.61 supports dots in --with options.
- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -609,6 +634,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
done
fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
])
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
diff --git a/lgl/m4/stdint.m4 b/lgl/m4/stdint.m4
index bb6c34fe1e..9b5001a52d 100644
--- a/lgl/m4/stdint.m4
+++ b/lgl/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 29
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# stdint.m4 serial 30
+dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -240,7 +240,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to the number of bits in type ']gltype['.])])
for gltype in $1 ; do
@@ -265,7 +265,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
eval BITSIZEOF_${GLTYPE}=\$result
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
@@ -278,7 +278,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to 1 if ']gltype[' is a signed integer type.])])
for gltype in $1 ; do
@@ -298,7 +298,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
eval HAVE_SIGNED_${GLTYPE}=0
fi
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
@@ -311,7 +311,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
[Define to l, ll, u, ul, ull, etc., as suitable for
constants of type ']gltype['.])])
@@ -350,7 +350,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
eval ${GLTYPE}_SUFFIX=\$result
AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
done
- AC_FOREACH([gltype], [$1],
+ m4_foreach_w([gltype], [$1],
[AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
])
diff --git a/lgl/m4/stdlib_h.m4 b/lgl/m4/stdlib_h.m4
index fe4ce122e9..d9240b46a0 100644
--- a/lgl/m4/stdlib_h.m4
+++ b/lgl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 5
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 6
+dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -27,6 +27,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
+ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
@@ -35,8 +36,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
+ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
])
diff --git a/lgl/m4/sys_socket_h.m4 b/lgl/m4/sys_socket_h.m4
index d9659c2d75..887cff80eb 100644
--- a/lgl/m4/sys_socket_h.m4
+++ b/lgl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
-# sys_socket_h.m4 serial 4
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 5
+dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,9 +17,28 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
])
if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
SYS_SOCKET_H=''
+ dnl If the shutdown function exists, <sys/socket.h> should define
+ dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
+ AC_CHECK_FUNCS([shutdown])
+ if test $ac_cv_func_shutdown = yes; then
+ AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
+ [gl_cv_header_sys_socket_h_shut],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+ [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
+ [gl_cv_header_sys_socket_h_shut=yes],
+ [gl_cv_header_sys_socket_h_shut=no])
+ ])
+ if test $gl_cv_header_sys_socket_h_shut = no; then
+ SYS_SOCKET_H='sys/socket.h'
+ fi
+ fi
else
SYS_SOCKET_H='sys/socket.h'
-
+ fi
+ if test -n "$SYS_SOCKET_H"; then
+ dnl Check prerequisites of the <sys/socket.h> replacement.
gl_CHECK_NEXT_HEADERS([sys/socket.h])
if test $ac_cv_header_sys_socket_h = yes; then
HAVE_SYS_SOCKET_H=1
diff --git a/lgl/m4/vasnprintf.m4 b/lgl/m4/vasnprintf.m4
index c4d3f4fa07..536258c06b 100644
--- a/lgl/m4/vasnprintf.m4
+++ b/lgl/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 24
+# vasnprintf.m4 serial 25
dnl Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_VASNPRINTF],
[
- AC_REQUIRE([gl_EOVERFLOW])
AC_CHECK_FUNCS_ONCE([vasnprintf])
if test $ac_cv_func_vasnprintf = no; then
gl_REPLACE_VASNPRINTF
diff --git a/lgl/override/lib/gc-libgcrypt.c.diff b/lgl/override/lib/gc-libgcrypt.c.diff
new file mode 100644
index 0000000000..d1bedb882f
--- /dev/null
+++ b/lgl/override/lib/gc-libgcrypt.c.diff
@@ -0,0 +1,26 @@
+--- lgl/gc-libgcrypt.c.orig 2008-04-13 14:51:05.000000000 +0200
++++ lgl/gc-libgcrypt.c 2008-04-13 14:52:04.000000000 +0200
+@@ -294,9 +294,11 @@
+ gcryalg = GCRY_MD_SHA512;
+ break;
+
++#ifdef ENABLE_CAMELLIA
+ case GC_SHA224:
+ gcryalg = GCRY_MD_SHA224;
+ break;
++#endif
+
+ case GC_RMD160:
+ gcryalg = GCRY_MD_RMD160;
+@@ -397,9 +399,11 @@
+ len = GC_SHA512_DIGEST_SIZE;
+ break;
+
++#ifdef ENABLE_CAMELLIA
+ case GC_SHA224:
+ len = GC_SHA224_DIGEST_SIZE;
+ break;
++#endif
+
+ default:
+ return 0;
diff --git a/lgl/snprintf.c b/lgl/snprintf.c
index 5c45bdc5e5..65434a94c1 100644
--- a/lgl/snprintf.c
+++ b/lgl/snprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
@@ -29,11 +29,6 @@
#include "vasnprintf.h"
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
/* Print formatted output to string STR. Similar to sprintf, but
additional length SIZE limit how much is written into STR. Returns
string length of formatted string (which may be larger than SIZE).
diff --git a/lgl/stdlib.in.h b/lgl/stdlib.in.h
index bc7dc4f9a3..318a206eb5 100644
--- a/lgl/stdlib.in.h
+++ b/lgl/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -199,6 +199,23 @@ extern int unsetenv (const char *name);
#endif
+#if @GNULIB_STRTOD@
+# if @REPLACE_STRTOD@
+# define strtod rpl_strtod
+# endif
+# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
+ /* Parse a double from STRING, updating ENDP if appropriate. */
+extern double strtod (const char *str, char **endp);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtod
+# define strtod(s, e) \
+ (GL_LINK_WARNING ("strtod is unportable - " \
+ "use gnulib module strtod for portability"), \
+ strtod (s, e))
+#endif
+
+
#ifdef __cplusplus
}
#endif
diff --git a/lgl/sys_socket.in.h b/lgl/sys_socket.in.h
index 35cde40b23..f6594b43fe 100644
--- a/lgl/sys_socket.in.h
+++ b/lgl/sys_socket.in.h
@@ -1,5 +1,6 @@
-/* Provide a sys/socket header file for systems lacking it (read: MinGW).
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Provide a sys/socket header file for systems lacking it (read: MinGW)
+ and for systems where it is incomplete.
+ Copyright (C) 2005-2008 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -16,8 +17,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-/* This file is supposed to be used on platforms that lack <sys/socket.h>
- and on platforms where <sys/socket.h> cannot be included standalone.
+/* This file is supposed to be used on platforms that lack <sys/socket.h>,
+ on platforms where <sys/socket.h> cannot be included standalone, and on
+ platforms where <sys/socket.h> does not provide all necessary definitions.
It is intended to provide definitions and prototypes needed by an
application. */
@@ -37,7 +39,22 @@
#ifndef _GL_SYS_SOCKET_H
#define _GL_SYS_SOCKET_H
-#if !@HAVE_SYS_SOCKET_H@
+#if @HAVE_SYS_SOCKET_H@
+
+/* A platform that has <sys/socket.h>. */
+
+/* For shutdown(). */
+# if !defined SHUT_RD
+# define SHUT_RD 0
+# endif
+# if !defined SHUT_WR
+# define SHUT_WR 1
+# endif
+# if !defined SHUT_RDWR
+# define SHUT_RDWR 2
+# endif
+
+#else
/* A platform that lacks <sys/socket.h>.
diff --git a/lgl/vasnprintf.c b/lgl/vasnprintf.c
index ed579d34aa..ec694dfb69 100644
--- a/lgl/vasnprintf.c
+++ b/lgl/vasnprintf.c
@@ -117,11 +117,6 @@
# include "fpucw.h"
#endif
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
#if HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
@@ -3661,6 +3656,44 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
+ /* Decide whether to handle the precision ourselves. */
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ switch (dp->conversion)
+ {
+ case 'd': case 'i': case 'u':
+ case 'o':
+ case 'x': case 'X': case 'p':
+ prec_ourselves = has_precision && (precision > 0);
+ break;
+ default:
+ prec_ourselves = 0;
+ break;
+ }
+#endif
+
+ /* Decide whether to perform the padding ourselves. */
+#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+ switch (dp->conversion)
+ {
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+ /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need
+ to perform the padding after this conversion. Functions
+ with unistdio extensions perform the padding based on
+ character count rather than element count. */
+ case 'c': case 's':
+# endif
+# if NEED_PRINTF_FLAG_ZERO
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+# endif
+ pad_ourselves = 1;
+ break;
+ default:
+ pad_ourselves = prec_ourselves;
+ break;
+ }
+#endif
+
#if !USE_SNPRINTF
/* Allocate a temporary buffer of sufficient size for calling
sprintf. */
@@ -3837,18 +3870,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
abort ();
}
+ if (!pad_ourselves)
+ {
# if ENABLE_UNISTDIO
- /* Padding considers the number of characters, therefore the
- number of elements after padding may be
- > max (tmp_length, width)
- but is certainly
- <= tmp_length + width. */
- tmp_length = xsum (tmp_length, width);
+ /* Padding considers the number of characters, therefore
+ the number of elements after padding may be
+ > max (tmp_length, width)
+ but is certainly
+ <= tmp_length + width. */
+ tmp_length = xsum (tmp_length, width);
# else
- /* Padding considers the number of elements, says POSIX. */
- if (tmp_length < width)
- tmp_length = width;
+ /* Padding considers the number of elements,
+ says POSIX. */
+ if (tmp_length < width)
+ tmp_length = width;
# endif
+ }
tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
}
@@ -3869,44 +3906,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
- /* Decide whether to handle the precision ourselves. */
-#if NEED_PRINTF_UNBOUNDED_PRECISION
- switch (dp->conversion)
- {
- case 'd': case 'i': case 'u':
- case 'o':
- case 'x': case 'X': case 'p':
- prec_ourselves = has_precision && (precision > 0);
- break;
- default:
- prec_ourselves = 0;
- break;
- }
-#endif
-
- /* Decide whether to perform the padding ourselves. */
-#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
- switch (dp->conversion)
- {
-# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
- /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need
- to perform the padding after this conversion. Functions
- with unistdio extensions perform the padding based on
- character count rather than element count. */
- case 'c': case 's':
-# endif
-# if NEED_PRINTF_FLAG_ZERO
- case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
- case 'a': case 'A':
-# endif
- pad_ourselves = 1;
- break;
- default:
- pad_ourselves = prec_ourselves;
- break;
- }
-#endif
-
/* Construct the format string for calling snprintf or
sprintf. */
fbp = buf;
@@ -4403,14 +4402,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
-#if !DCHAR_IS_TCHAR
-# if !USE_SNPRINTF
+#if !USE_SNPRINTF
if (count >= tmp_length)
/* tmp_length was incorrectly calculated - fix the
code above! */
abort ();
-# endif
+#endif
+#if !DCHAR_IS_TCHAR
/* Convert from TCHAR_T[] to DCHAR_T[]. */
if (dp->conversion == 'c' || dp->conversion == 's')
{
@@ -4528,7 +4527,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
if (w < width)
{
size_t pad = width - w;
-# if USE_SNPRINTF
+
/* Make room for the result. */
if (xsum (count, pad) > allocated - length)
{
@@ -4538,12 +4537,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
xmax (xsum3 (length, count, pad),
xtimes (allocated, 2));
+# if USE_SNPRINTF
length += count;
ENSURE_ALLOCATION (n);
length -= count;
+# else
+ ENSURE_ALLOCATION (n);
+# endif
}
/* Here count + pad <= allocated - length. */
-# endif
+
{
# if !DCHAR_IS_TCHAR || USE_SNPRINTF
DCHAR_T * const rp = result + length;
@@ -4553,7 +4556,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
DCHAR_T *p = rp + count;
DCHAR_T *end = p + pad;
DCHAR_T *pad_ptr;
-# if !DCHAR_IS_TCHAR
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
if (dp->conversion == 'c'
|| dp->conversion == 's')
/* No zero-padding for string directives. */
@@ -4604,13 +4607,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
-#if DCHAR_IS_TCHAR && !USE_SNPRINTF
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
-#endif
-
/* Here still count <= allocated - length. */
#if !DCHAR_IS_TCHAR || USE_SNPRINTF
diff --git a/lgl/vasprintf.c b/lgl/vasprintf.c
index 7b645460ee..c74dc76e4f 100644
--- a/lgl/vasprintf.c
+++ b/lgl/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -30,11 +30,6 @@
#include "vasnprintf.h"
-/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
-#ifndef EOVERFLOW
-# define EOVERFLOW E2BIG
-#endif
-
int
vasprintf (char **resultp, const char *format, va_list args)
{
diff --git a/lgl/wchar.in.h b/lgl/wchar.in.h
index 0aba1cac10..73588712bb 100644
--- a/lgl/wchar.in.h
+++ b/lgl/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -26,6 +26,14 @@
* the declaration of wcwidth().
*/
+#ifdef __need_mbstate_t
+/* Special invocation convention inside uClibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention. */
+
#ifndef _GL_WCHAR_H
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -80,3 +88,4 @@ extern int wcwidth (int /* actually wchar_t */);
#endif /* _GL_WCHAR_H */
#endif /* _GL_WCHAR_H */
+#endif
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 96691bdbfb..3a5274fe76 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -33,15 +33,12 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" \
-I$(top_srcdir)/includes -I../includes \
-I$(srcdir)/x509 \
-I$(top_srcdir)/libextra -I$(top_srcdir)/lib/openpgp/ \
- -I$(top_srcdir)/lib/opencdk \
- $(LIBOPENCDK_CFLAGS) $(LIBGCRYPT_CFLAGS)
+ $(LIBGCRYPT_CFLAGS)
if ENABLE_OPENPGP
-if ENABLE_INCLUDED_OPENCDK
SUBDIRS += opencdk
-AM_CPPFLAGS += -I$(srcdir)/opencdk
-endif
SUBDIRS += openpgp
+AM_CPPFLAGS += -I$(srcdir)/opencdk -I$(top_srcdir)/lib/opencdk
endif
if ENABLE_MINITASN1
@@ -85,7 +82,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c gnutls_cipher.c \
gnutls_x509.c ext_cert_type.c gnutls_rsa_export.c \
auth_rsa_export.c ext_server_name.c auth_dh_common.c \
gnutls_helper.c ext_inner_application.c \
- gnutls_supplemental.c crypto.c
+ gnutls_supplemental.c crypto.c random.c
if ENABLE_OPRFI
COBJECTS += $(OPRFI_COBJECTS)
@@ -106,7 +103,7 @@ HFILES = debug.h gnutls_compress.h defines.h gnutls_cipher.h \
ext_srp.h gnutls_srp.h auth_srp.h auth_srp_passwd.h \
gnutls_helper.h auth_psk.h auth_psk_passwd.h \
ext_inner_application.h gnutls_supplemental.h ext_oprfi.h \
- crypto.h
+ crypto.h random.h
# Separate so we can create the documentation
@@ -122,11 +119,7 @@ libgnutls_la_LIBADD = ../lgl/liblgnu.la x509/libgnutls_x509.la \
if ENABLE_OPENPGP
libgnutls_la_SOURCES += gnutls_openpgp.c
libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
-if ENABLE_INCLUDED_OPENCDK
libgnutls_la_LIBADD += opencdk/libminiopencdk.la
-else
-libgnutls_la_LDFLAGS += $(LTLIBOPENCDK)
-endif
endif
if HAVE_LD_VERSION_SCRIPT
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index d4f55d0fb3..91567cb25a 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -456,7 +456,7 @@ call_get_cert_callback (gnutls_session_t session,
if (type == GNUTLS_CRT_X509)
{
local_certs = alloc_and_load_x509_certs (st.cert.x509, st.ncerts);
- if (local_certs != NULL)
+ if (local_certs != NULL && st.key.x509 != NULL)
{
local_key = alloc_and_load_x509_key (st.key.x509);
if (local_key == NULL)
@@ -480,7 +480,7 @@ call_get_cert_callback (gnutls_session_t session,
#ifdef ENABLE_OPENPGP
{
local_certs = alloc_and_load_pgp_certs (st.cert.pgp);
- if (local_certs != NULL)
+ if (local_certs != NULL && st.key.pgp != NULL)
{
local_key = alloc_and_load_pgp_key (st.key.pgp);
if (local_key == NULL)
@@ -1180,7 +1180,7 @@ _gnutls_proc_openpgp_server_certificate (gnutls_session_t session,
}
peer_certificate_list =
- gnutls_alloca (sizeof (gnutls_cert) * (peer_certificate_list_size));
+ gnutls_malloc (sizeof (gnutls_cert) * (peer_certificate_list_size));
if (peer_certificate_list == NULL)
{
gnutls_assert ();
@@ -1221,7 +1221,7 @@ cleanup:
_gnutls_free_datum (&akey);
CLEAR_CERTS;
- gnutls_afree (peer_certificate_list);
+ gnutls_free (peer_certificate_list);
return ret;
}
diff --git a/lib/auth_psk_passwd.c b/lib/auth_psk_passwd.c
index 82d1a9b635..65891878c7 100644
--- a/lib/auth_psk_passwd.c
+++ b/lib/auth_psk_passwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007 Free Software Foundation
+ * Copyright (C) 2005, 2007, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -38,6 +38,7 @@
#include <gnutls_str.h>
#include <gnutls_datum.h>
#include <gnutls_num.h>
+#include <random.h>
/* this function parses passwd.psk file. Format is:
@@ -97,6 +98,8 @@ pwd_put_values (gnutls_datum_t * psk, char *str)
static int
_randomize_psk (gnutls_datum_t * psk)
{
+ int ret;
+
psk->data = gnutls_malloc (16);
if (psk->data == NULL)
{
@@ -105,12 +108,14 @@ _randomize_psk (gnutls_datum_t * psk)
}
psk->size = 16;
- if (gc_nonce ((char *) psk->data, 16) != GC_OK)
+
+ ret = _gnutls_rnd (RND_NONCE, (char *) psk->data, 16);
+ if ( ret < 0)
{
- gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ gnutls_assert();
+ return ret;
}
-
+
return 0;
}
@@ -192,6 +197,7 @@ _gnutls_psk_pwd_find_entry (gnutls_session_t session, char *username,
if (strncmp (username, line, MAX (i, len)) == 0)
{
ret = pwd_put_values (psk, line);
+ fclose (fd);
if (ret < 0)
{
gnutls_assert ();
@@ -200,6 +206,7 @@ _gnutls_psk_pwd_find_entry (gnutls_session_t session, char *username,
return 0;
}
}
+ fclose (fd);
/* user was not found. Fake him.
* the last index found and randomize the entry.
diff --git a/lib/auth_rsa.c b/lib/auth_rsa.c
index 59d12e465a..d4f34a000d 100644
--- a/lib/auth_rsa.c
+++ b/lib/auth_rsa.c
@@ -40,7 +40,7 @@
#include "debug.h"
#include <gnutls_sig.h>
#include <gnutls_x509.h>
-#include <gc.h>
+#include <random.h>
int _gnutls_gen_rsa_client_kx (gnutls_session_t, opaque **);
int _gnutls_proc_rsa_client_kx (gnutls_session_t, opaque *, size_t);
@@ -290,10 +290,11 @@ _gnutls_proc_rsa_client_kx (gnutls_session_t session, opaque * data,
/* we do not need strong random numbers here.
*/
- if (gc_nonce (session->key->key.data, session->key->key.size) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, session->key->key.data, session->key->key.size);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
}
@@ -344,11 +345,11 @@ _gnutls_gen_rsa_client_kx (gnutls_session_t session, opaque ** data)
return GNUTLS_E_MEMORY_ERROR;
}
- if (gc_pseudo_random (session->key->key.data,
- session->key->key.size) != GC_OK)
+ ret = _gnutls_rnd( RND_RANDOM, session->key->key.data, session->key->key.size);
+ if ( ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
ver = _gnutls_get_adv_version (session);
diff --git a/lib/auth_srp_passwd.c b/lib/auth_srp_passwd.c
index 45909fdd86..8f098315d3 100644
--- a/lib/auth_srp_passwd.c
+++ b/lib/auth_srp_passwd.c
@@ -39,7 +39,7 @@
#include <gnutls_str.h>
#include <gnutls_datum.h>
#include <gnutls_num.h>
-#include <gc.h>
+#include <random.h>
static int _randomize_pwd_entry (SRP_PWD_ENTRY * entry);
@@ -397,6 +397,7 @@ static int
_randomize_pwd_entry (SRP_PWD_ENTRY * entry)
{
unsigned char rnd;
+ int ret;
if (entry->g.size == 0 || entry->n.size == 0)
{
@@ -404,11 +405,13 @@ _randomize_pwd_entry (SRP_PWD_ENTRY * entry)
return GNUTLS_E_INTERNAL_ERROR;
}
- if (gc_nonce (&rnd, 1) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, &rnd, 1);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
+
entry->salt.size = (rnd % 10) + 9;
entry->v.data = gnutls_malloc (20);
@@ -419,10 +422,11 @@ _randomize_pwd_entry (SRP_PWD_ENTRY * entry)
return GNUTLS_E_MEMORY_ERROR;
}
- if (gc_nonce (entry->v.data, 20) != GC_OK)
+ ret = _gnutls_rnd (RND_RANDOM, entry->v.data, 20);
+ if ( ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
entry->salt.data = gnutls_malloc (entry->salt.size);
@@ -432,12 +436,13 @@ _randomize_pwd_entry (SRP_PWD_ENTRY * entry)
return GNUTLS_E_MEMORY_ERROR;
}
- if (gc_nonce (entry->salt.data, entry->salt.size) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, entry->salt.data, entry->salt.size);
+ if (ret < 0)
{
- gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ gnutls_assert();
+ return ret;
}
-
+
return 0;
}
diff --git a/lib/crypto.c b/lib/crypto.c
index e6cf097fc8..852cb2ffdf 100644
--- a/lib/crypto.c
+++ b/lib/crypto.c
@@ -37,6 +37,7 @@ typedef struct algo_list {
#define cipher_list algo_list
#define mac_list algo_list
#define digest_list algo_list
+#define rnd_list algo_list
static int _algo_register( algo_list* al, int algorithm, int priority, void* s)
{
@@ -101,8 +102,24 @@ cipher_list* cl;
static cipher_list glob_cl = { GNUTLS_CIPHER_NULL, 0, NULL, NULL };
static mac_list glob_ml = { GNUTLS_MAC_NULL, 0, NULL, NULL };
static digest_list glob_dl = { GNUTLS_MAC_NULL, 0, NULL, NULL };
-
-
+static rnd_list glob_rnd = { 0, 0, NULL, NULL };
+
+
+/**
+ * gnutls_crypto_cipher_register - register a cipher algorithm
+ * @algorithm: is the gnutls algorithm identifier
+ * @priority: is the priority of the algorithm
+ * @s: is a structure holding new cipher's data
+ *
+ * This function will register a cipher algorithm to be used
+ * by gnutls. Any algorithm registered will override
+ * the included algorithms and by convention kernel implemented
+ * algorithms have priority of 90. The algorithm with the lowest
+ * priority will be used by gnutls.
+ *
+ * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
+ *
+ **/
int gnutls_crypto_cipher_register( gnutls_cipher_algorithm_t algorithm, int priority, gnutls_crypto_cipher_st* s)
{
return _algo_register( &glob_cl, algorithm, priority, s);
@@ -113,6 +130,45 @@ gnutls_crypto_cipher_st *_gnutls_get_crypto_cipher( gnutls_cipher_algorithm_t al
return _get_algo( &glob_cl, algo);
}
+/**
+ * gnutls_crypto_rnd_register - register a random generator
+ * @priority: is the priority of the generator
+ * @s: is a structure holding new generator's data
+ *
+ * This function will register a random generator to be used
+ * by gnutls. Any generator registered will override
+ * the included generator and by convention kernel implemented
+ * generators have priority of 90. The generator with the lowest
+ * priority will be used by gnutls.
+ *
+ * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
+ *
+ **/
+int gnutls_crypto_rnd_register( int priority, gnutls_crypto_rnd_st* s)
+{
+ return _algo_register( &glob_rnd, 1, priority, s);
+}
+
+gnutls_crypto_rnd_st *_gnutls_get_crypto_rnd()
+{
+ return _get_algo( &glob_rnd, 1);
+}
+
+/**
+ * gnutls_crypto_mac_register - register a MAC algorithm
+ * @algorithm: is the gnutls algorithm identifier
+ * @priority: is the priority of the algorithm
+ * @s: is a structure holding new algorithms's data
+ *
+ * This function will register a MAC algorithm to be used
+ * by gnutls. Any algorithm registered will override
+ * the included algorithms and by convention kernel implemented
+ * algorithms have priority of 90. The algorithm with the lowest
+ * priority will be used by gnutls.
+ *
+ * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
+ *
+ **/
int gnutls_crypto_mac_register( gnutls_mac_algorithm_t algorithm, int priority, gnutls_crypto_mac_st* s)
{
return _algo_register( &glob_ml, algorithm, priority, s);
@@ -123,7 +179,21 @@ gnutls_crypto_mac_st *_gnutls_get_crypto_mac( gnutls_mac_algorithm_t algo)
return _get_algo( &glob_ml, algo);
}
-
+/**
+ * gnutls_crypto_digest_register - register a digest algorithm
+ * @algorithm: is the gnutls algorithm identifier
+ * @priority: is the priority of the algorithm
+ * @s: is a structure holding new algorithms's data
+ *
+ * This function will register a digest (hash) algorithm to be used
+ * by gnutls. Any algorithm registered will override
+ * the included algorithms and by convention kernel implemented
+ * algorithms have priority of 90. The algorithm with the lowest
+ * priority will be used by gnutls.
+ *
+ * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
+ *
+ **/
int gnutls_crypto_digest_register( gnutls_digest_algorithm_t algorithm, int priority, gnutls_crypto_digest_st* s)
{
return _algo_register( &glob_dl, algorithm, priority, s);
diff --git a/lib/crypto.h b/lib/crypto.h
index eb695a8757..9e4ad10fdb 100644
--- a/lib/crypto.h
+++ b/lib/crypto.h
@@ -1,3 +1,4 @@
gnutls_crypto_cipher_st *_gnutls_get_crypto_cipher( gnutls_cipher_algorithm_t algo);
gnutls_crypto_digest_st *_gnutls_get_crypto_digest( gnutls_digest_algorithm_t algo);
gnutls_crypto_mac_st *_gnutls_get_crypto_mac( gnutls_mac_algorithm_t algo);
+gnutls_crypto_rnd_st *_gnutls_get_crypto_rnd( void );
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c
index dc32003016..36dd77da12 100644
--- a/lib/gnutls_algorithms.c
+++ b/lib/gnutls_algorithms.c
@@ -1701,14 +1701,14 @@ _gnutls_supported_ciphersuites (gnutls_session_t session,
return 0;
}
- tmp_ciphers = gnutls_alloca (count * sizeof (cipher_suite_st));
+ tmp_ciphers = gnutls_malloc (count * sizeof (cipher_suite_st));
if (tmp_ciphers == NULL)
return GNUTLS_E_MEMORY_ERROR;
ciphers = gnutls_malloc (count * sizeof (cipher_suite_st));
if (ciphers == NULL)
{
- gnutls_afree (tmp_ciphers);
+ gnutls_free (tmp_ciphers);
return GNUTLS_E_MEMORY_ERROR;
}
@@ -1767,7 +1767,7 @@ _gnutls_supported_ciphersuites (gnutls_session_t session,
}
#endif
- gnutls_afree (tmp_ciphers);
+ gnutls_free (tmp_ciphers);
/* This function can no longer return 0 cipher suites.
* It returns an error code instead.
diff --git a/lib/gnutls_asn1_tab.c b/lib/gnutls_asn1_tab.c
index 017d9bae15..ecac746e5d 100644
--- a/lib/gnutls_asn1_tab.c
+++ b/lib/gnutls_asn1_tab.c
@@ -4,60 +4,60 @@
#include <libtasn1.h>
-extern const ASN1_ARRAY_TYPE gnutls_asn1_tab[]={
- {"GNUTLS",536872976,0},
- {0,1073741836,0},
- {"RSAPublicKey",1610612741,0},
- {"modulus",1073741827,0},
- {"publicExponent",3,0},
- {"RSAPrivateKey",1610612741,0},
- {"version",1073741826,"Version"},
- {"modulus",1073741827,0},
- {"publicExponent",1073741827,0},
- {"privateExponent",1073741827,0},
- {"prime1",1073741827,0},
- {"prime2",1073741827,0},
- {"exponent1",1073741827,0},
- {"exponent2",1073741827,0},
- {"coefficient",1073741827,0},
- {"otherPrimeInfos",16386,"OtherPrimeInfos"},
- {"Version",1610874883,0},
- {"two-prime",1073741825,"0"},
- {"multi",1,"1"},
- {"OtherPrimeInfos",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"OtherPrimeInfo"},
- {"OtherPrimeInfo",1610612741,0},
- {"prime",1073741827,0},
- {"exponent",1073741827,0},
- {"coefficient",3,0},
- {"AlgorithmIdentifier",1610612741,0},
- {"algorithm",1073741836,0},
- {"parameters",541081613,0},
- {"algorithm",1,0},
- {"DigestInfo",1610612741,0},
- {"digestAlgorithm",1073741826,"DigestAlgorithmIdentifier"},
- {"digest",2,"Digest"},
- {"DigestAlgorithmIdentifier",1073741826,"AlgorithmIdentifier"},
- {"Digest",1073741831,0},
- {"DSAPublicKey",1073741827,0},
- {"DSAParameters",1610612741,0},
- {"p",1073741827,0},
- {"q",1073741827,0},
- {"g",3,0},
- {"DSASignatureValue",1610612741,0},
- {"r",1073741827,0},
- {"s",3,0},
- {"DSAPrivateKey",1610612741,0},
- {"version",1073741827,0},
- {"p",1073741827,0},
- {"q",1073741827,0},
- {"g",1073741827,0},
- {"Y",1073741827,0},
- {"priv",3,0},
- {"DHParameter",536870917,0},
- {"prime",1073741827,0},
- {"base",1073741827,0},
- {"privateValueLength",16387,0},
- {0,0,0}
+const ASN1_ARRAY_TYPE gnutls_asn1_tab[] = {
+ { "GNUTLS", 536872976, NULL },
+ { NULL, 1073741836, NULL },
+ { "RSAPublicKey", 1610612741, NULL },
+ { "modulus", 1073741827, NULL },
+ { "publicExponent", 3, NULL },
+ { "RSAPrivateKey", 1610612741, NULL },
+ { "version", 1073741826, "Version"},
+ { "modulus", 1073741827, NULL },
+ { "publicExponent", 1073741827, NULL },
+ { "privateExponent", 1073741827, NULL },
+ { "prime1", 1073741827, NULL },
+ { "prime2", 1073741827, NULL },
+ { "exponent1", 1073741827, NULL },
+ { "exponent2", 1073741827, NULL },
+ { "coefficient", 1073741827, NULL },
+ { "otherPrimeInfos", 16386, "OtherPrimeInfos"},
+ { "Version", 1610874883, NULL },
+ { "two-prime", 1073741825, "0"},
+ { "multi", 1, "1"},
+ { "OtherPrimeInfos", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "OtherPrimeInfo"},
+ { "OtherPrimeInfo", 1610612741, NULL },
+ { "prime", 1073741827, NULL },
+ { "exponent", 1073741827, NULL },
+ { "coefficient", 3, NULL },
+ { "AlgorithmIdentifier", 1610612741, NULL },
+ { "algorithm", 1073741836, NULL },
+ { "parameters", 541081613, NULL },
+ { "algorithm", 1, NULL },
+ { "DigestInfo", 1610612741, NULL },
+ { "digestAlgorithm", 1073741826, "DigestAlgorithmIdentifier"},
+ { "digest", 2, "Digest"},
+ { "DigestAlgorithmIdentifier", 1073741826, "AlgorithmIdentifier"},
+ { "Digest", 1073741831, NULL },
+ { "DSAPublicKey", 1073741827, NULL },
+ { "DSAParameters", 1610612741, NULL },
+ { "p", 1073741827, NULL },
+ { "q", 1073741827, NULL },
+ { "g", 3, NULL },
+ { "DSASignatureValue", 1610612741, NULL },
+ { "r", 1073741827, NULL },
+ { "s", 3, NULL },
+ { "DSAPrivateKey", 1610612741, NULL },
+ { "version", 1073741827, NULL },
+ { "p", 1073741827, NULL },
+ { "q", 1073741827, NULL },
+ { "g", 1073741827, NULL },
+ { "Y", 1073741827, NULL },
+ { "priv", 3, NULL },
+ { "DHParameter", 536870917, NULL },
+ { "prime", 1073741827, NULL },
+ { "base", 1073741827, NULL },
+ { "privateValueLength", 16387, NULL },
+ { NULL, 0, NULL }
};
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 689779b422..2caf266599 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -430,7 +430,7 @@ _gnutls_io_clear_peeked_data (gnutls_session_t session)
if (session->internals.have_peeked_data == 0 || RCVLOWAT == 0)
return 0;
- peekdata = gnutls_alloca (RCVLOWAT);
+ peekdata = gnutls_malloc (RCVLOWAT);
if (peekdata == NULL)
{
gnutls_assert ();
@@ -448,7 +448,7 @@ _gnutls_io_clear_peeked_data (gnutls_session_t session)
while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN
|| sum < RCVLOWAT);
- gnutls_afree (peekdata);
+ gnutls_free (peekdata);
if (ret < 0)
{
diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
index cd3cdb1c27..ad192f46bd 100644
--- a/lib/gnutls_cipher.c
+++ b/lib/gnutls_cipher.c
@@ -39,6 +39,7 @@
#include "gnutls_kx.h"
#include "gnutls_record.h"
#include "gnutls_constate.h"
+#include <random.h>
#include <gc.h>
inline static int
@@ -236,7 +237,7 @@ calc_enc_length (gnutls_session_t session, int data_size,
cipher_type_t block_algo, uint16_t blocksize)
{
uint8_t rnd;
- int length;
+ int length, ret;
*pad = 0;
@@ -247,10 +248,11 @@ calc_enc_length (gnutls_session_t session, int data_size,
break;
case CIPHER_BLOCK:
- if (gc_nonce (&rnd, 1) != GC_OK)
+ ret =_gnutls_rnd (RND_NONCE, &rnd, 1);
+ if ( ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
/* make rnd a multiple of blocksize */
@@ -378,11 +380,13 @@ _gnutls_compressed2ciphertext (gnutls_session_t session,
{
/* copy the random IV.
*/
- if (gc_nonce (data_ptr, blocksize) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, data_ptr, blocksize);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
+
data_ptr += blocksize;
}
diff --git a/lib/gnutls_constate.c b/lib/gnutls_constate.c
index cbe7a15e74..b929483ae2 100644
--- a/lib/gnutls_constate.c
+++ b/lib/gnutls_constate.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -315,7 +315,7 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
}
else if (IV_size > 0 && export_flag != 0)
{
- opaque *iv_block = gnutls_alloca (IV_size * 2);
+ opaque *iv_block = gnutls_malloc (IV_size * 2);
if (iv_block == NULL)
{
gnutls_assert ();
@@ -333,7 +333,7 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
{
gnutls_assert ();
gnutls_free (key_block);
- gnutls_afree (iv_block);
+ gnutls_free (iv_block);
return ret;
}
@@ -352,7 +352,7 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
if (ret < 0)
{
gnutls_assert ();
- gnutls_afree (iv_block);
+ gnutls_free (iv_block);
gnutls_free (key_block);
return ret;
}
@@ -360,7 +360,7 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
if (_gnutls_sset_datum
(&session->cipher_specs.client_write_IV, iv_block, IV_size) < 0)
{
- gnutls_afree (iv_block);
+ gnutls_free (iv_block);
gnutls_free (key_block);
return GNUTLS_E_MEMORY_ERROR;
}
@@ -369,12 +369,12 @@ _gnutls_set_keys (gnutls_session_t session, int hash_size, int IV_size,
(&session->cipher_specs.server_write_IV,
&iv_block[IV_size], IV_size) < 0)
{
- gnutls_afree (iv_block);
+ gnutls_free (iv_block);
gnutls_free (key_block);
return GNUTLS_E_MEMORY_ERROR;
}
- gnutls_afree (iv_block);
+ gnutls_free (iv_block);
}
gnutls_free (key_block);
diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c
index a0c1546876..707fc00e1b 100644
--- a/lib/gnutls_errors.c
+++ b/lib/gnutls_errors.c
@@ -200,7 +200,8 @@ static const gnutls_error_entry error_algorithms[] = {
ERROR_ENTRY (N_("The tasn1 library version is too old."),
GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY, 1),
-
+ ERROR_ENTRY (N_("The OpenPGP User ID is revoked."),
+ GNUTLS_E_OPENPGP_UID_REVOKED, 1),
ERROR_ENTRY (N_("Error loading the keyring."),
GNUTLS_E_OPENPGP_KEYRING_ERROR, 1),
ERROR_ENTRY (N_("The initialization of LZO has failed."),
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index 683ee78279..e6089a8f26 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -26,6 +26,7 @@
#include <gnutls_errors.h>
#include <libtasn1.h>
#include <gnutls_dh.h>
+#include <random.h>
#ifdef HAVE_WINSOCK
# include <winsock2.h>
@@ -304,9 +305,14 @@ gnutls_global_init (void)
result = _gnutls_asn2err (res);
goto out;
}
-
- /* Initialize the gcrypt (if used random generator) */
- gc_pseudo_random (&c, 1);
+
+ /* Initialize the random generator */
+ result = _gnutls_rnd_init();
+ if (result < 0)
+ {
+ gnutls_assert();
+ goto out;
+ }
out:
return result;
@@ -330,6 +336,7 @@ gnutls_global_deinit (void)
#if HAVE_WINSOCK
WSACleanup ();
#endif
+ _gnutls_rnd_deinit();
asn1_delete_structure (&_gnutls_gnutls_asn);
asn1_delete_structure (&_gnutls_pkix1_asn);
gc_done ();
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index c8b0e3e298..98aa86cb8f 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -52,6 +52,7 @@
#include <auth_anon.h> /* for gnutls_anon_server_credentials_t */
#include <auth_psk.h> /* for gnutls_psk_server_credentials_t */
#include <gc.h>
+#include <random.h>
#ifdef HANDSHAKE_DEBUG
#define ERR(x, y) _gnutls_handshake_log( "HSK[%x]: %s (%d)\n", session, x,y)
@@ -253,6 +254,7 @@ int
_gnutls_tls_create_random (opaque * dst)
{
uint32_t tim;
+ int ret;
/* Use weak random numbers for the most of the
* buffer except for the first 4 that are the
@@ -263,10 +265,11 @@ _gnutls_tls_create_random (opaque * dst)
/* generate server random value */
_gnutls_write_uint32 (tim, dst);
- if (gc_nonce (&dst[4], TLS_RANDOM_SIZE - 4) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, &dst[4], TLS_RANDOM_SIZE - 4);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
return 0;
@@ -930,7 +933,7 @@ _gnutls_send_handshake (gnutls_session_t session, void *i_data,
/* first run */
datasize = i_datasize + HANDSHAKE_HEADER_SIZE;
- data = gnutls_alloca (datasize);
+ data = gnutls_malloc (datasize);
if (data == NULL)
{
gnutls_assert ();
@@ -955,7 +958,7 @@ _gnutls_send_handshake (gnutls_session_t session, void *i_data,
_gnutls_handshake_hash_add_sent (session, type, data, datasize)) < 0)
{
gnutls_assert ();
- gnutls_afree (data);
+ gnutls_free (data);
return ret;
}
@@ -965,7 +968,7 @@ _gnutls_send_handshake (gnutls_session_t session, void *i_data,
_gnutls_handshake_io_send_int (session, GNUTLS_HANDSHAKE, type,
data, datasize);
- gnutls_afree (data);
+ gnutls_free (data);
return ret;
}
@@ -1915,7 +1918,7 @@ _gnutls_send_server_hello (gnutls_session_t session, int again)
return extdatalen;
}
- data = gnutls_alloca (datalen + extdatalen);
+ data = gnutls_malloc (datalen + extdatalen);
if (data == NULL)
{
gnutls_assert ();
@@ -1963,7 +1966,7 @@ _gnutls_send_server_hello (gnutls_session_t session, int again)
ret =
_gnutls_send_handshake (session, data, datalen,
GNUTLS_HANDSHAKE_SERVER_HELLO);
- gnutls_afree (data);
+ gnutls_free (data);
return ret;
}
@@ -2668,11 +2671,13 @@ int
_gnutls_generate_session_id (opaque * session_id, uint8_t * len)
{
*len = TLS_MAX_SESSION_ID_SIZE;
+ int ret;
- if (gc_nonce (session_id, *len) != GC_OK)
+ ret = _gnutls_rnd (RND_NONCE, session_id, *len);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
return 0;
diff --git a/lib/gnutls_mem.h b/lib/gnutls_mem.h
index f76081e566..9af8543f3c 100644
--- a/lib/gnutls_mem.h
+++ b/lib/gnutls_mem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -31,30 +31,6 @@
typedef void svoid; /* for functions that allocate using gnutls_secure_malloc */
-/* Use gnutls_afree() when calling alloca, or
- * memory leaks may occur in systems which do not
- * support alloca.
- */
-#ifdef USE_EFENCE
-# define gnutls_alloca gnutls_malloc
-# define gnutls_afree gnutls_free
-#endif
-
-#ifdef HAVE_ALLOCA
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# endif
-# ifndef gnutls_alloca
-# define gnutls_alloca alloca
-# define gnutls_afree(x)
-# endif
-#else
-# ifndef gnutls_alloca
-# define gnutls_alloca gnutls_malloc
-# define gnutls_afree gnutls_free
-# endif
-#endif /* HAVE_ALLOCA */
-
extern int (*_gnutls_is_secure_memory) (const void *);
/* this realloc function will return ptr if size==0, and
diff --git a/lib/gnutls_mpi.c b/lib/gnutls_mpi.c
index 0d807a1864..eec2c1be78 100644
--- a/lib/gnutls_mpi.c
+++ b/lib/gnutls_mpi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -209,7 +209,7 @@ _gnutls_x509_read_int (ASN1_TYPE node, const char *value, mpi_t * ret_mpi)
return _gnutls_asn2err (result);
}
- tmpstr = gnutls_alloca (tmpstr_size);
+ tmpstr = gnutls_malloc (tmpstr_size);
if (tmpstr == NULL)
{
gnutls_assert ();
@@ -220,7 +220,7 @@ _gnutls_x509_read_int (ASN1_TYPE node, const char *value, mpi_t * ret_mpi)
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return _gnutls_asn2err (result);
}
@@ -228,11 +228,11 @@ _gnutls_x509_read_int (ASN1_TYPE node, const char *value, mpi_t * ret_mpi)
if (_gnutls_mpi_scan (ret_mpi, tmpstr, &s_len) != 0)
{
gnutls_assert ();
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return GNUTLS_E_MPI_SCAN_FAILED;
}
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return 0;
}
@@ -252,7 +252,7 @@ _gnutls_x509_write_int (ASN1_TYPE node, const char *value, mpi_t mpi, int lz)
else
result = _gnutls_mpi_print (NULL, &s_len, mpi);
- tmpstr = gnutls_alloca (s_len);
+ tmpstr = gnutls_malloc (s_len);
if (tmpstr == NULL)
{
gnutls_assert ();
@@ -267,13 +267,13 @@ _gnutls_x509_write_int (ASN1_TYPE node, const char *value, mpi_t mpi, int lz)
if (result != 0)
{
gnutls_assert ();
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return GNUTLS_E_MPI_PRINT_FAILED;
}
result = asn1_write_value (node, value, tmpstr, s_len);
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
if (result != ASN1_SUCCESS)
{
diff --git a/lib/gnutls_openpgp.c b/lib/gnutls_openpgp.c
index 76a8be0680..16e1d0c83d 100644
--- a/lib/gnutls_openpgp.c
+++ b/lib/gnutls_openpgp.c
@@ -399,7 +399,7 @@ gnutls_certificate_set_openpgp_key_mem2 (gnutls_certificate_credentials_t
gnutls_openpgp_keyid_t keyid;
if (strcasecmp( subkey_id, "auto")==0)
- ret = gnutls_openpgp_crt_get_auth_subkey( cert, keyid);
+ ret = gnutls_openpgp_crt_get_auth_subkey( cert, keyid, 1);
else
ret = get_keyid( keyid, subkey_id);
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c
index 3427083beb..5e31804419 100644
--- a/lib/gnutls_pk.c
+++ b/lib/gnutls_pk.c
@@ -36,7 +36,7 @@
#include "debug.h"
#include <x509/x509_int.h>
#include <x509/common.h>
-#include <gc.h>
+#include <random.h>
static int _gnutls_pk_encrypt (int algo, mpi_t * resarr, mpi_t data,
mpi_t * pkey, int pkey_len);
@@ -75,7 +75,7 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
return GNUTLS_E_PK_ENCRYPTION_FAILED;
}
- edata = gnutls_alloca (k);
+ edata = gnutls_malloc (k);
if (edata == NULL)
{
gnutls_assert ();
@@ -98,24 +98,26 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
if (params_len < RSA_PUBLIC_PARAMS)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_INTERNAL_ERROR;
}
- if (gc_pseudo_random (ps, psize) != GC_OK)
+ ret = _gnutls_rnd (RND_RANDOM, ps, psize);
+ if ( ret < 0)
{
gnutls_assert ();
- gnutls_afree (edata);
- return GNUTLS_E_RANDOM_FAILED;
+ gnutls_free (edata);
+ return ret;
}
for (i = 0; i < psize; i++)
while (ps[i] == 0)
{
- if (gc_pseudo_random (&ps[i], 1) != GC_OK)
+ ret = _gnutls_rnd (RND_RANDOM, &ps[i], 1);
+ if (ret < 0)
{
gnutls_assert ();
- gnutls_afree (edata);
- return GNUTLS_E_RANDOM_FAILED;
+ gnutls_free (edata);
+ return ret;
}
}
break;
@@ -125,7 +127,7 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
if (params_len < RSA_PRIVATE_PARAMS)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_INTERNAL_ERROR;
}
@@ -134,7 +136,7 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
break;
default:
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_INTERNAL_ERROR;
}
@@ -144,10 +146,10 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext,
if (_gnutls_mpi_scan_nz (&m, edata, &k) != 0)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_MPI_SCAN_FAILED;
}
- gnutls_afree (edata);
+ gnutls_free (edata);
if (btype == 2) /* encrypt */
ret = _gnutls_pk_encrypt (GCRY_PK_RSA, &res, m, params, params_len);
@@ -254,7 +256,7 @@ _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext,
}
_gnutls_mpi_print (NULL, &esize, res);
- edata = gnutls_alloca (esize + 1);
+ edata = gnutls_malloc (esize + 1);
if (edata == NULL)
{
gnutls_assert ();
@@ -281,7 +283,7 @@ _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext,
if (edata[0] != 0 || edata[1] != btype)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_DECRYPTION_FAILED;
}
@@ -317,7 +319,7 @@ _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext,
break;
default:
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
break;
}
i++;
@@ -325,18 +327,18 @@ _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext,
if (ret < 0)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_DECRYPTION_FAILED;
}
if (_gnutls_sset_datum (plaintext, &edata[i], esize - i) < 0)
{
gnutls_assert ();
- gnutls_afree (edata);
+ gnutls_free (edata);
return GNUTLS_E_MEMORY_ERROR;
}
- gnutls_afree (edata);
+ gnutls_free (edata);
return 0;
}
diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c
index df84deb6ca..f09257481b 100644
--- a/lib/gnutls_state.c
+++ b/lib/gnutls_state.c
@@ -1242,10 +1242,10 @@ _gnutls_rsa_pms_set_version (gnutls_session_t session,
* This callback must return 0 on success or a gnutls error code to
* terminate the handshake.
*
- * NOTE: You should not use this function to terminate the handshake
- * based on client input unless you know what you are doing. Before
- * the handshake is finished there is no way to know if there is a
- * man-in-the-middle attack being performed.
+ * Warning: You should not use this function to terminate the
+ * handshake based on client input unless you know what you are
+ * doing. Before the handshake is finished there is no way to know if
+ * there is a man-in-the-middle attack being performed.
**/
void
gnutls_handshake_set_post_client_hello_function (gnutls_session_t session,
diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c
index 065fb7f274..97302475a7 100644
--- a/lib/opencdk/misc.c
+++ b/lib/opencdk/misc.c
@@ -59,82 +59,6 @@ _cdk_u32tobuf (u32 u, byte *buf)
buf[3] = u ;
}
-
-static const char *
-parse_version_number (const char *s, int *number)
-{
- int val = 0;
-
- if (*s == '0' && isdigit (s[1]))
- return NULL;
- /* leading zeros are not allowed */
- for (; isdigit(*s); s++)
- {
- val *= 10;
- val += *s - '0';
- }
- *number = val;
- return val < 0? NULL : s;
-}
-
-
-static const char *
-parse_version_string (const char * s, int * major, int * minor, int * micro)
-{
- s = parse_version_number( s, major );
- if( !s || *s != '.' )
- return NULL;
- s++;
- s = parse_version_number (s, minor);
- if (!s || *s != '.')
- return NULL;
- s++;
- s = parse_version_number(s, micro);
- if (!s)
- return NULL;
- return s; /* patchlevel */
-}
-
-
-/**
- * cdk_check_version:
- * @req_version: The requested version
- *
- * Check that the the version of the library is at minimum the requested
- * one and return the version string; return NULL if the condition is
- * not satisfied. If a NULL is passed to this function, no check is done,
- *but the version string is simply returned.
- **/
-const char *
-cdk_check_version (const char *req_version)
-{
- const char *ver = VERSION;
- int my_major, my_minor, my_micro;
- int rq_major, rq_minor, rq_micro;
- const char *my_plvl, *rq_plvl;
-
- if (!req_version)
- return ver;
- my_plvl = parse_version_string (ver, &my_major, &my_minor, &my_micro);
- if (!my_plvl)
- return NULL;
- /* very strange our own version is bogus */
- rq_plvl = parse_version_string (req_version, &rq_major, &rq_minor,
- &rq_micro);
- if (!rq_plvl)
- return NULL; /* req version string is invalid */
- if (my_major > rq_major
- || (my_major == rq_major && my_minor > rq_minor)
- || (my_major == rq_major && my_minor == rq_minor
- && my_micro > rq_micro)
- || (my_major == rq_major && my_minor == rq_minor
- && my_micro == rq_micro
- && strcmp (my_plvl, rq_plvl) >= 0))
- return ver;
- return NULL;
-}
-
-
/**
* cdk_strlist_free:
* @sl: the string list
diff --git a/lib/opencdk/pubkey.c b/lib/opencdk/pubkey.c
index 78ff8b0b19..acb4117804 100644
--- a/lib/opencdk/pubkey.c
+++ b/lib/opencdk/pubkey.c
@@ -621,9 +621,12 @@ mpi_to_buffer (gcry_mpi_t a, byte *buf, size_t buflen,
nbits = gcry_mpi_get_nbits (a);
if (r_nbits)
*r_nbits = nbits;
+
+ if (r_nwritten)
+ *r_nwritten = (nbits+7)/8+2;
+
if ((nbits+7)/8+2 > buflen)
return CDK_Too_Short;
- *r_nwritten = (nbits+7)/8+2;
if (gcry_mpi_print (GCRYMPI_FMT_PGP, buf, buflen, r_nwritten, a))
return CDK_Wrong_Format;
diff --git a/lib/openpgp/extras.c b/lib/openpgp/extras.c
index 54b3c9ab12..56ff449c19 100644
--- a/lib/openpgp/extras.c
+++ b/lib/openpgp/extras.c
@@ -133,6 +133,12 @@ gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring,
size_t raw_len = 0;
opaque *raw_data = NULL;
+ if (data->data == NULL || data->size == 0)
+ {
+ gnutls_assert();
+ return GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ }
+
_gnutls_debug_log ("PGP: keyring import format '%s'\n",
format == GNUTLS_OPENPGP_FMT_RAW ? "raw" : "base64");
diff --git a/lib/openpgp/openpgp_int.h b/lib/openpgp/openpgp_int.h
index 2030d38371..6175743718 100644
--- a/lib/openpgp/openpgp_int.h
+++ b/lib/openpgp/openpgp_int.h
@@ -40,7 +40,7 @@ int _gnutls_map_cdk_rc (int rc);
int _gnutls_openpgp_export (cdk_kbnode_t node,
gnutls_openpgp_crt_fmt_t format,
- void *output_data, size_t * output_data_size);
+ void *output_data, size_t * output_data_size, int private);
int _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert,
gnutls_openpgp_crt_t cert);
diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c
index 0dc7759d99..c5b3276c67 100644
--- a/lib/openpgp/output.c
+++ b/lib/openpgp/output.c
@@ -162,7 +162,9 @@ print_key_revoked (gnutls_string * str, gnutls_openpgp_crt_t cert, int idx)
err = gnutls_openpgp_crt_get_subkey_revoked_status( cert, idx);
if (err != 0)
- addf (str, "Revoked: True");
+ addf (str, "\tRevoked: True\n");
+ else
+ addf (str, "\tRevoked: False\n");
}
static void
@@ -248,10 +250,11 @@ print_key_info(gnutls_string * str, gnutls_openpgp_crt_t cert, int idx)
hexdump (str, m.data, m.size, "\t\t\t");
addf (str, _("\t\tExponent:\n"));
hexdump (str, e.data, e.size, "\t\t\t");
+
+ gnutls_free (m.data);
+ gnutls_free (e.data);
}
- gnutls_free (m.data);
- gnutls_free (e.data);
}
break;
@@ -276,6 +279,11 @@ print_key_info(gnutls_string * str, gnutls_openpgp_crt_t cert, int idx)
hexdump (str, q.data, q.size, "\t\t\t");
addf (str, _("\t\tG:\n"));
hexdump (str, g.data, g.size, "\t\t\t");
+
+ gnutls_free (p.data);
+ gnutls_free (q.data);
+ gnutls_free (g.data);
+ gnutls_free (y.data);
}
}
break;
@@ -293,7 +301,9 @@ print_cert (gnutls_string * str, gnutls_openpgp_crt_t cert, unsigned int format)
int i, subkeys;
int err;
char dn[1024];
-size_t dn_size = sizeof (dn);
+size_t dn_size;
+
+ print_key_revoked( str, cert, -1);
/* Version. */
{
@@ -312,16 +322,19 @@ size_t dn_size = sizeof (dn);
/* Names. */
i = 0;
do {
-
+ dn_size = sizeof(dn);
err = gnutls_openpgp_crt_get_name (cert, i++, dn, &dn_size);
- if (err < 0 && err != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
- addf (str, "error: get_name: %s\n", gnutls_strerror (err));
+ if (err < 0 && err != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE && err != GNUTLS_E_OPENPGP_UID_REVOKED) {
+ addf (str, "error: get_name: %s %d\n", gnutls_strerror (err), err);
break;
}
if (err >= 0)
addf (str, _("\tName[%d]: %s\n"), i-1, dn);
+ else if (err == GNUTLS_E_OPENPGP_UID_REVOKED) {
+ addf (str, _("\tRevoked Name[%d]: %s\n"), i-1, dn);
+ }
} while( err >= 0);
@@ -329,7 +342,6 @@ size_t dn_size = sizeof (dn);
print_key_info( str, cert, -1);
print_key_usage( str, cert, -1);
- print_key_revoked( str, cert, -1);
subkeys = gnutls_openpgp_crt_get_subkey_count( cert);
if (subkeys < 0)
@@ -338,11 +350,11 @@ size_t dn_size = sizeof (dn);
for (i=0;i<subkeys;i++) {
addf( str, _("\n\tSubkey[%d]:\n"), i);
+ print_key_revoked( str, cert, i);
print_key_id( str, cert, i);
print_key_times( str, cert, i);
print_key_info( str, cert, i);
print_key_usage( str, cert, i);
- print_key_revoked( str, cert, i);
}
}
diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c
index 8520d3ce6b..7f9489ea0e 100644
--- a/lib/openpgp/pgp.c
+++ b/lib/openpgp/pgp.c
@@ -89,9 +89,16 @@ gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key,
const gnutls_datum_t * data,
gnutls_openpgp_crt_fmt_t format)
{
- cdk_stream_t inp;
+ cdk_stream_t inp;
+ cdk_packet_t pkt;
int rc;
-
+
+ if (data->data == NULL || data->size == 0)
+ {
+ gnutls_assert();
+ return GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ }
+
if (format == GNUTLS_OPENPGP_FMT_RAW)
rc = cdk_kbnode_read_from_mem (&key->knode, data->data, data->size);
else
@@ -110,12 +117,23 @@ gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key,
cdk_stream_close (inp);
if (rc)
{
- rc = _gnutls_map_cdk_rc (rc);
+ if (rc == CDK_Inv_Packet)
+ rc = GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ else
+ rc = _gnutls_map_cdk_rc (rc);
gnutls_assert ();
return rc;
}
}
-
+
+ /* Test if the import was successful. */
+ pkt = cdk_kbnode_find_packet (key->knode, CDK_PKT_PUBLIC_KEY);
+ if (pkt == NULL)
+ {
+ gnutls_assert();
+ return GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ }
+
return 0;
}
@@ -123,7 +141,7 @@ gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key,
*/
int _gnutls_openpgp_export (cdk_kbnode_t node,
gnutls_openpgp_crt_fmt_t format,
- void *output_data, size_t * output_data_size)
+ void *output_data, size_t * output_data_size, int private)
{
size_t input_data_size = *output_data_size;
size_t calc_size;
@@ -153,7 +171,7 @@ int _gnutls_openpgp_export (cdk_kbnode_t node,
/* Calculate the size of the encoded data and check if the provided
buffer is large enough. */
rc = cdk_armor_encode_buffer (in, *output_data_size,
- NULL, 0, &calc_size, CDK_ARMOR_PUBKEY);
+ NULL, 0, &calc_size, private?CDK_ARMOR_SECKEY:CDK_ARMOR_PUBKEY);
if (rc || calc_size > input_data_size)
{
cdk_free (in);
@@ -164,7 +182,7 @@ int _gnutls_openpgp_export (cdk_kbnode_t node,
rc = cdk_armor_encode_buffer (in, *output_data_size,
output_data, input_data_size, &calc_size,
- CDK_ARMOR_PUBKEY);
+ private?CDK_ARMOR_SECKEY:CDK_ARMOR_PUBKEY);
cdk_free (in);
*output_data_size = calc_size;
}
@@ -192,7 +210,7 @@ gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key,
gnutls_openpgp_crt_fmt_t format,
void *output_data, size_t * output_data_size)
{
- return _gnutls_openpgp_export( key->knode, format, output_data, output_data_size);
+ return _gnutls_openpgp_export( key->knode, format, output_data, output_data_size, 0);
}
@@ -356,8 +374,11 @@ gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key,
int algo;
if (!key)
- return GNUTLS_PK_UNKNOWN;
-
+ {
+ gnutls_assert();
+ return GNUTLS_PK_UNKNOWN;
+ }
+
algo = 0;
pkt = cdk_kbnode_find_packet (key->knode, CDK_PKT_PUBLIC_KEY);
if (pkt)
@@ -788,7 +809,10 @@ gnutls_openpgp_crt_get_subkey_pk_algorithm (gnutls_openpgp_crt_t key,
int algo;
if (!key)
- return GNUTLS_PK_UNKNOWN;
+ {
+ gnutls_assert();
+ return GNUTLS_PK_UNKNOWN;
+ }
pkt = _get_public_subkey( key, idx);
@@ -797,13 +821,7 @@ gnutls_openpgp_crt_get_subkey_pk_algorithm (gnutls_openpgp_crt_t key,
{
if (bits)
*bits = cdk_pk_get_nbits (pkt->pkt.public_key);
- algo = pkt->pkt.public_key->pubkey_algo;
- if (is_RSA (algo))
- algo = GNUTLS_PK_RSA;
- else if (is_DSA (algo))
- algo = GNUTLS_PK_DSA;
- else
- algo = GNUTLS_E_UNKNOWN_PK_ALGORITHM;
+ algo = _gnutls_openpgp_get_algo(pkt->pkt.public_key->pubkey_algo);
}
return algo;
@@ -1456,12 +1474,14 @@ int ret;
* gnutls_openpgp_crt_get_auth_subkey - Gets the keyID of an authentication subkey
* @key: the structure that contains the OpenPGP public key.
* @keyid: the struct to save the keyid.
+ * @flag: Non zero indicates that a valid subkey is always returned.
*
* Returns the 64-bit keyID of the first valid OpenPGP subkey marked for authentication.
+ * If flag is non zero then a valid subkey will be returned even if it is not marked for authentication.
*
* Returns zero on success.
**/
-int gnutls_openpgp_crt_get_auth_subkey( gnutls_openpgp_crt_t crt, gnutls_openpgp_keyid_t keyid)
+int gnutls_openpgp_crt_get_auth_subkey( gnutls_openpgp_crt_t crt, gnutls_openpgp_keyid_t keyid, unsigned int flag)
{
int ret, subkeys, i;
unsigned int usage;
@@ -1512,9 +1532,10 @@ int gnutls_openpgp_crt_get_auth_subkey( gnutls_openpgp_crt_t crt, gnutls_openpgp
return ret;
}
- break;
+ return 0;;\
}
}
- return 0;
+ if (flag && keyid_init) return 0;
+ else return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}
diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c
index fa5c8fd5ba..695346b25e 100644
--- a/lib/openpgp/privkey.c
+++ b/lib/openpgp/privkey.c
@@ -93,8 +93,15 @@ gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
gnutls_openpgp_crt_fmt_t format,
const char *pass, unsigned int flags)
{
- cdk_stream_t inp;
+ cdk_stream_t inp;
+ cdk_packet_t pkt;
int rc;
+
+ if (data->data == NULL || data->size == 0)
+ {
+ gnutls_assert();
+ return GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ }
if (format == GNUTLS_OPENPGP_FMT_RAW)
rc = cdk_kbnode_read_from_mem (&key->knode, data->data, data->size);
@@ -119,6 +126,14 @@ gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
return rc;
}
}
+
+ /* Test if the import was successful. */
+ pkt = cdk_kbnode_find_packet (key->knode, CDK_PKT_SECRET_KEY);
+ if (pkt == NULL)
+ {
+ gnutls_assert();
+ return GNUTLS_E_OPENPGP_GETKEY_FAILED;
+ }
return 0;
}
@@ -146,7 +161,7 @@ gnutls_openpgp_privkey_export (gnutls_openpgp_privkey_t key,
void *output_data, size_t * output_data_size)
{
/* FIXME for now we do not export encrypted keys */
- return _gnutls_openpgp_export( key->knode, format, output_data, output_data_size);
+ return _gnutls_openpgp_export( key->knode, format, output_data, output_data_size, 1);
}
@@ -174,7 +189,10 @@ gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
int algo;
if (!key)
- return GNUTLS_PK_UNKNOWN;
+ {
+ gnutls_assert();
+ return GNUTLS_PK_UNKNOWN;
+ }
algo = 0;
pkt = cdk_kbnode_find_packet (key->knode, CDK_PKT_SECRET_KEY);
@@ -196,8 +214,10 @@ int algo;
algo = GNUTLS_PK_RSA;
else if (is_DSA (cdk_algo))
algo = GNUTLS_PK_DSA;
- else
+ else {
+ _gnutls_x509_log("Unknown OpenPGP algorithm %d\n", cdk_algo);
algo = GNUTLS_PK_UNKNOWN;
+ }
return algo;
}
@@ -416,7 +436,10 @@ gnutls_openpgp_privkey_get_subkey_pk_algorithm (gnutls_openpgp_privkey_t key,
int algo;
if (!key)
- return GNUTLS_PK_UNKNOWN;
+ {
+ gnutls_assert();
+ return GNUTLS_PK_UNKNOWN;
+ }
pkt = _get_secret_subkey( key, idx);
@@ -759,8 +782,8 @@ int _get_sk_dsa_raw(gnutls_openpgp_privkey_t pkey, gnutls_openpgp_keyid_t keyid,
}
KEYID_IMPORT(kid32, keyid);
-
- pkt = _gnutls_openpgp_find_key( pkey->knode, kid32, 0);
+
+ pkt = _gnutls_openpgp_find_key( pkey->knode, kid32, 1);
if (pkt == NULL)
{
gnutls_assert();
diff --git a/lib/pkix_asn1_tab.c b/lib/pkix_asn1_tab.c
index 5bbc1ab483..acb39e03ba 100644
--- a/lib/pkix_asn1_tab.c
+++ b/lib/pkix_asn1_tab.c
@@ -4,1122 +4,1122 @@
#include <libtasn1.h>
-extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]={
- {"PKIX1",536875024,0},
- {0,1073741836,0},
- {"id-ce",1879048204,0},
- {"joint-iso-ccitt",1073741825,"2"},
- {"ds",1073741825,"5"},
- {0,1,"29"},
- {"id-ce-authorityKeyIdentifier",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"35"},
- {"AuthorityKeyIdentifier",1610612741,0},
- {"keyIdentifier",1610637314,"KeyIdentifier"},
- {0,4104,"0"},
- {"authorityCertIssuer",1610637314,"GeneralNames"},
- {0,4104,"1"},
- {"authorityCertSerialNumber",536895490,"CertificateSerialNumber"},
- {0,4104,"2"},
- {"KeyIdentifier",1073741831,0},
- {"id-ce-subjectKeyIdentifier",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"14"},
- {"SubjectKeyIdentifier",1073741826,"KeyIdentifier"},
- {"id-ce-keyUsage",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"15"},
- {"KeyUsage",1610874886,0},
- {"digitalSignature",1073741825,"0"},
- {"nonRepudiation",1073741825,"1"},
- {"keyEncipherment",1073741825,"2"},
- {"dataEncipherment",1073741825,"3"},
- {"keyAgreement",1073741825,"4"},
- {"keyCertSign",1073741825,"5"},
- {"cRLSign",1073741825,"6"},
- {"encipherOnly",1073741825,"7"},
- {"decipherOnly",1,"8"},
- {"id-ce-privateKeyUsagePeriod",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"16"},
- {"PrivateKeyUsagePeriod",1610612741,0},
- {"notBefore",1619025937,0},
- {0,4104,"0"},
- {"notAfter",545284113,0},
- {0,4104,"1"},
- {"id-ce-certificatePolicies",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"32"},
- {"CertificatePolicies",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"PolicyInformation"},
- {"PolicyInformation",1610612741,0},
- {"policyIdentifier",1073741826,"CertPolicyId"},
- {"policyQualifiers",538984459,0},
- {"MAX",1074266122,"1"},
- {0,2,"PolicyQualifierInfo"},
- {"CertPolicyId",1073741836,0},
- {"PolicyQualifierInfo",1610612741,0},
- {"policyQualifierId",1073741826,"PolicyQualifierId"},
- {"qualifier",541065229,0},
- {"policyQualifierId",1,0},
- {"PolicyQualifierId",1073741836,0},
- {"CPSuri",1073741826,"IA5String"},
- {"UserNotice",1610612741,0},
- {"noticeRef",1073758210,"NoticeReference"},
- {"explicitText",16386,"DisplayText"},
- {"NoticeReference",1610612741,0},
- {"organization",1073741826,"DisplayText"},
- {"noticeNumbers",536870923,0},
- {0,3,0},
- {"DisplayText",1610612754,0},
- {"visibleString",1612709890,"VisibleString"},
- {"200",524298,"1"},
- {"bmpString",1612709890,"BMPString"},
- {"200",524298,"1"},
- {"utf8String",538968066,"UTF8String"},
- {"200",524298,"1"},
- {"id-ce-policyMappings",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"33"},
- {"PolicyMappings",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,536870917,0},
- {"issuerDomainPolicy",1073741826,"CertPolicyId"},
- {"subjectDomainPolicy",2,"CertPolicyId"},
- {"DirectoryString",1610612754,0},
- {"teletexString",1612709890,"TeletexString"},
- {"MAX",524298,"1"},
- {"printableString",1612709890,"PrintableString"},
- {"MAX",524298,"1"},
- {"universalString",1612709890,"UniversalString"},
- {"MAX",524298,"1"},
- {"utf8String",1612709890,"UTF8String"},
- {"MAX",524298,"1"},
- {"bmpString",1612709890,"BMPString"},
- {"MAX",524298,"1"},
- {"ia5String",538968066,"IA5String"},
- {"MAX",524298,"1"},
- {"id-ce-subjectAltName",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"17"},
- {"SubjectAltName",1073741826,"GeneralNames"},
- {"GeneralNames",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"GeneralName"},
- {"GeneralName",1610612754,0},
- {"otherName",1610620930,"AnotherName"},
- {0,4104,"0"},
- {"rfc822Name",1610620930,"IA5String"},
- {0,4104,"1"},
- {"dNSName",1610620930,"IA5String"},
- {0,4104,"2"},
- {"x400Address",1610620930,"ORAddress"},
- {0,4104,"3"},
- {"directoryName",1610620930,"RDNSequence"},
- {0,2056,"4"},
- {"ediPartyName",1610620930,"EDIPartyName"},
- {0,4104,"5"},
- {"uniformResourceIdentifier",1610620930,"IA5String"},
- {0,4104,"6"},
- {"iPAddress",1610620935,0},
- {0,4104,"7"},
- {"registeredID",536879116,0},
- {0,4104,"8"},
- {"AnotherName",1610612741,0},
- {"type-id",1073741836,0},
- {"value",541073421,0},
- {0,1073743880,"0"},
- {"type-id",1,0},
- {"EDIPartyName",1610612741,0},
- {"nameAssigner",1610637314,"DirectoryString"},
- {0,4104,"0"},
- {"partyName",536879106,"DirectoryString"},
- {0,4104,"1"},
- {"id-ce-issuerAltName",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"18"},
- {"IssuerAltName",1073741826,"GeneralNames"},
- {"id-ce-subjectDirectoryAttributes",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"9"},
- {"SubjectDirectoryAttributes",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"Attribute"},
- {"id-ce-basicConstraints",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"19"},
- {"BasicConstraints",1610612741,0},
- {"cA",1610645508,0},
- {0,131081,0},
- {"pathLenConstraint",537411587,0},
- {"0",10,"MAX"},
- {"id-ce-nameConstraints",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"30"},
- {"NameConstraints",1610612741,0},
- {"permittedSubtrees",1610637314,"GeneralSubtrees"},
- {0,4104,"0"},
- {"excludedSubtrees",536895490,"GeneralSubtrees"},
- {0,4104,"1"},
- {"GeneralSubtrees",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"GeneralSubtree"},
- {"GeneralSubtree",1610612741,0},
- {"base",1073741826,"GeneralName"},
- {"minimum",1610653698,"BaseDistance"},
- {0,1073741833,"0"},
- {0,4104,"0"},
- {"maximum",536895490,"BaseDistance"},
- {0,4104,"1"},
- {"BaseDistance",1611137027,0},
- {"0",10,"MAX"},
- {"id-ce-policyConstraints",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"36"},
- {"PolicyConstraints",1610612741,0},
- {"requireExplicitPolicy",1610637314,"SkipCerts"},
- {0,4104,"0"},
- {"inhibitPolicyMapping",536895490,"SkipCerts"},
- {0,4104,"1"},
- {"SkipCerts",1611137027,0},
- {"0",10,"MAX"},
- {"id-ce-cRLDistributionPoints",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"31"},
- {"CRLDistributionPoints",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"DistributionPoint"},
- {"DistributionPoint",1610612741,0},
- {"distributionPoint",1610637314,"DistributionPointName"},
- {0,2056,"0"},
- {"reasons",1610637314,"ReasonFlags"},
- {0,4104,"1"},
- {"cRLIssuer",536895490,"GeneralNames"},
- {0,4104,"2"},
- {"DistributionPointName",1610612754,0},
- {"fullName",1610620930,"GeneralNames"},
- {0,4104,"0"},
- {"nameRelativeToCRLIssuer",536879106,"RelativeDistinguishedName"},
- {0,4104,"1"},
- {"ReasonFlags",1610874886,0},
- {"unused",1073741825,"0"},
- {"keyCompromise",1073741825,"1"},
- {"cACompromise",1073741825,"2"},
- {"affiliationChanged",1073741825,"3"},
- {"superseded",1073741825,"4"},
- {"cessationOfOperation",1073741825,"5"},
- {"certificateHold",1073741825,"6"},
- {"privilegeWithdrawn",1073741825,"7"},
- {"aACompromise",1,"8"},
- {"id-ce-extKeyUsage",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"37"},
- {"ExtKeyUsageSyntax",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"KeyPurposeId"},
- {"KeyPurposeId",1073741836,0},
- {"id-kp-serverAuth",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"1"},
- {"id-kp-clientAuth",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"2"},
- {"id-kp-codeSigning",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"3"},
- {"id-kp-emailProtection",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"4"},
- {"id-kp-ipsecEndSystem",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"5"},
- {"id-kp-ipsecTunnel",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"6"},
- {"id-kp-ipsecUser",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"7"},
- {"id-kp-timeStamping",1879048204,0},
- {0,1073741825,"id-kp"},
- {0,1,"8"},
- {"id-pe-authorityInfoAccess",1879048204,0},
- {0,1073741825,"id-pe"},
- {0,1,"1"},
- {"AuthorityInfoAccessSyntax",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"AccessDescription"},
- {"AccessDescription",1610612741,0},
- {"accessMethod",1073741836,0},
- {"accessLocation",2,"GeneralName"},
- {"id-ce-cRLNumber",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"20"},
- {"CRLNumber",1611137027,0},
- {"0",10,"MAX"},
- {"id-ce-issuingDistributionPoint",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"28"},
- {"IssuingDistributionPoint",1610612741,0},
- {"distributionPoint",1610637314,"DistributionPointName"},
- {0,4104,"0"},
- {"onlyContainsUserCerts",1610653700,0},
- {0,1073872905,0},
- {0,4104,"1"},
- {"onlyContainsCACerts",1610653700,0},
- {0,1073872905,0},
- {0,4104,"2"},
- {"onlySomeReasons",1610637314,"ReasonFlags"},
- {0,4104,"3"},
- {"indirectCRL",536911876,0},
- {0,1073872905,0},
- {0,4104,"4"},
- {"id-ce-deltaCRLIndicator",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"27"},
- {"BaseCRLNumber",1073741826,"CRLNumber"},
- {"id-ce-cRLReasons",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"21"},
- {"CRLReason",1610874901,0},
- {"unspecified",1073741825,"0"},
- {"keyCompromise",1073741825,"1"},
- {"cACompromise",1073741825,"2"},
- {"affiliationChanged",1073741825,"3"},
- {"superseded",1073741825,"4"},
- {"cessationOfOperation",1073741825,"5"},
- {"certificateHold",1073741825,"6"},
- {"removeFromCRL",1,"8"},
- {"id-ce-certificateIssuer",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"29"},
- {"CertificateIssuer",1073741826,"GeneralNames"},
- {"id-ce-holdInstructionCode",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"23"},
- {"HoldInstructionCode",1073741836,0},
- {"holdInstruction",1879048204,0},
- {"joint-iso-itu-t",1073741825,"2"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"x9cm",1073741825,"10040"},
- {0,1,"2"},
- {"id-holdinstruction-none",1879048204,0},
- {0,1073741825,"holdInstruction"},
- {0,1,"1"},
- {"id-holdinstruction-callissuer",1879048204,0},
- {0,1073741825,"holdInstruction"},
- {0,1,"2"},
- {"id-holdinstruction-reject",1879048204,0},
- {0,1073741825,"holdInstruction"},
- {0,1,"3"},
- {"id-ce-invalidityDate",1879048204,0},
- {0,1073741825,"id-ce"},
- {0,1,"24"},
- {"InvalidityDate",1082130449,0},
- {"VisibleString",1610620935,0},
- {0,4360,"26"},
- {"NumericString",1610620935,0},
- {0,4360,"18"},
- {"IA5String",1610620935,0},
- {0,4360,"22"},
- {"TeletexString",1610620935,0},
- {0,4360,"20"},
- {"PrintableString",1610620935,0},
- {0,4360,"19"},
- {"UniversalString",1610620935,0},
- {0,4360,"28"},
- {"BMPString",1610620935,0},
- {0,4360,"30"},
- {"UTF8String",1610620935,0},
- {0,4360,"12"},
- {"id-pkix",1879048204,0},
- {"iso",1073741825,"1"},
- {"identified-organization",1073741825,"3"},
- {"dod",1073741825,"6"},
- {"internet",1073741825,"1"},
- {"security",1073741825,"5"},
- {"mechanisms",1073741825,"5"},
- {"pkix",1,"7"},
- {"id-pe",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"1"},
- {"id-qt",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"2"},
- {"id-kp",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"3"},
- {"id-ad",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"48"},
- {"id-qt-cps",1879048204,0},
- {0,1073741825,"id-qt"},
- {0,1,"1"},
- {"id-qt-unotice",1879048204,0},
- {0,1073741825,"id-qt"},
- {0,1,"2"},
- {"id-ad-ocsp",1879048204,0},
- {0,1073741825,"id-ad"},
- {0,1,"1"},
- {"id-ad-caIssuers",1879048204,0},
- {0,1073741825,"id-ad"},
- {0,1,"2"},
- {"Attribute",1610612741,0},
- {"type",1073741826,"AttributeType"},
- {"values",536870927,0},
- {0,2,"AttributeValue"},
- {"AttributeType",1073741836,0},
- {"AttributeValue",1614807053,0},
- {"type",1,0},
- {"AttributeTypeAndValue",1610612741,0},
- {"type",1073741826,"AttributeType"},
- {"value",2,"AttributeValue"},
- {"id-at",1879048204,0},
- {"joint-iso-ccitt",1073741825,"2"},
- {"ds",1073741825,"5"},
- {0,1,"4"},
- {"id-at-initials",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"43"},
- {"X520initials",1073741826,"DirectoryString"},
- {"id-at-generationQualifier",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"44"},
- {"X520generationQualifier",1073741826,"DirectoryString"},
- {"id-at-surname",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"4"},
- {"X520surName",1073741826,"DirectoryString"},
- {"id-at-givenName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"42"},
- {"X520givenName",1073741826,"DirectoryString"},
- {"id-at-name",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"41"},
- {"X520name",1073741826,"DirectoryString"},
- {"id-at-commonName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"3"},
- {"X520CommonName",1073741826,"DirectoryString"},
- {"id-at-localityName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"7"},
- {"X520LocalityName",1073741826,"DirectoryString"},
- {"id-at-stateOrProvinceName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"8"},
- {"X520StateOrProvinceName",1073741826,"DirectoryString"},
- {"id-at-organizationName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"10"},
- {"X520OrganizationName",1073741826,"DirectoryString"},
- {"id-at-organizationalUnitName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"11"},
- {"X520OrganizationalUnitName",1073741826,"DirectoryString"},
- {"id-at-title",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"12"},
- {"X520Title",1073741826,"DirectoryString"},
- {"id-at-description",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"13"},
- {"X520Description",1073741826,"DirectoryString"},
- {"id-at-dnQualifier",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"46"},
- {"X520dnQualifier",1073741826,"PrintableString"},
- {"id-at-countryName",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"6"},
- {"X520countryName",1612709890,"PrintableString"},
- {0,1048586,"2"},
- {"id-at-serialNumber",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"5"},
- {"X520serialNumber",1073741826,"PrintableString"},
- {"id-at-telephoneNumber",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"20"},
- {"X520telephoneNumber",1073741826,"PrintableString"},
- {"id-at-facsimileTelephoneNumber",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"23"},
- {"X520facsimileTelephoneNumber",1073741826,"PrintableString"},
- {"id-at-pseudonym",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"65"},
- {"X520pseudonym",1073741826,"DirectoryString"},
- {"id-at-name",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"41"},
- {"X520name",1073741826,"DirectoryString"},
- {"id-at-streetAddress",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"9"},
- {"X520streetAddress",1073741826,"DirectoryString"},
- {"id-at-postalAddress",1880096780,"AttributeType"},
- {0,1073741825,"id-at"},
- {0,1,"16"},
- {"X520postalAddress",1073741826,"PostalAddress"},
- {"PostalAddress",1610612747,0},
- {0,2,"DirectoryString"},
- {"pkcs",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"rsadsi",1073741825,"113549"},
- {"pkcs",1,"1"},
- {"pkcs-9",1879048204,0},
- {0,1073741825,"pkcs"},
- {0,1,"9"},
- {"emailAddress",1880096780,"AttributeType"},
- {0,1073741825,"pkcs-9"},
- {0,1,"1"},
- {"Pkcs9email",1612709890,"IA5String"},
- {"ub-emailaddress-length",524298,"1"},
- {"Name",1610612754,0},
- {"rdnSequence",2,"RDNSequence"},
- {"RDNSequence",1610612747,0},
- {0,2,"RelativeDistinguishedName"},
- {"DistinguishedName",1073741826,"RDNSequence"},
- {"RelativeDistinguishedName",1612709903,0},
- {"MAX",1074266122,"1"},
- {0,2,"AttributeTypeAndValue"},
- {"Certificate",1610612741,0},
- {"tbsCertificate",1073741826,"TBSCertificate"},
- {"signatureAlgorithm",1073741826,"AlgorithmIdentifier"},
- {"signature",6,0},
- {"TBSCertificate",1610612741,0},
- {"version",1610653698,"Version"},
- {0,1073741833,"v1"},
- {0,2056,"0"},
- {"serialNumber",1073741826,"CertificateSerialNumber"},
- {"signature",1073741826,"AlgorithmIdentifier"},
- {"issuer",1073741826,"Name"},
- {"validity",1073741826,"Validity"},
- {"subject",1073741826,"Name"},
- {"subjectPublicKeyInfo",1073741826,"SubjectPublicKeyInfo"},
- {"issuerUniqueID",1610637314,"UniqueIdentifier"},
- {0,4104,"1"},
- {"subjectUniqueID",1610637314,"UniqueIdentifier"},
- {0,4104,"2"},
- {"extensions",536895490,"Extensions"},
- {0,2056,"3"},
- {"Version",1610874883,0},
- {"v1",1073741825,"0"},
- {"v2",1073741825,"1"},
- {"v3",1,"2"},
- {"CertificateSerialNumber",1073741827,0},
- {"Validity",1610612741,0},
- {"notBefore",1073741826,"Time"},
- {"notAfter",2,"Time"},
- {"Time",1610612754,0},
- {"utcTime",1090519057,0},
- {"generalTime",8388625,0},
- {"UniqueIdentifier",1073741830,0},
- {"SubjectPublicKeyInfo",1610612741,0},
- {"algorithm",1073741826,"AlgorithmIdentifier"},
- {"subjectPublicKey",6,0},
- {"Extensions",1612709899,0},
- {"MAX",1074266122,"1"},
- {0,2,"Extension"},
- {"Extension",1610612741,0},
- {"extnID",1073741836,0},
- {"critical",1610645508,0},
- {0,131081,0},
- {"extnValue",7,0},
- {"CertificateList",1610612741,0},
- {"tbsCertList",1073741826,"TBSCertList"},
- {"signatureAlgorithm",1073741826,"AlgorithmIdentifier"},
- {"signature",6,0},
- {"TBSCertList",1610612741,0},
- {"version",1073758210,"Version"},
- {"signature",1073741826,"AlgorithmIdentifier"},
- {"issuer",1073741826,"Name"},
- {"thisUpdate",1073741826,"Time"},
- {"nextUpdate",1073758210,"Time"},
- {"revokedCertificates",1610629131,0},
- {0,536870917,0},
- {"userCertificate",1073741826,"CertificateSerialNumber"},
- {"revocationDate",1073741826,"Time"},
- {"crlEntryExtensions",16386,"Extensions"},
- {"crlExtensions",536895490,"Extensions"},
- {0,2056,"0"},
- {"AlgorithmIdentifier",1610612741,0},
- {"algorithm",1073741836,0},
- {"parameters",541081613,0},
- {"algorithm",1,0},
- {"pkcs-1",1879048204,0},
- {0,1073741825,"pkcs"},
- {0,1,"1"},
- {"rsaEncryption",1879048204,0},
- {0,1073741825,"pkcs-1"},
- {0,1,"1"},
- {"md2WithRSAEncryption",1879048204,0},
- {0,1073741825,"pkcs-1"},
- {0,1,"2"},
- {"md5WithRSAEncryption",1879048204,0},
- {0,1073741825,"pkcs-1"},
- {0,1,"4"},
- {"sha1WithRSAEncryption",1879048204,0},
- {0,1073741825,"pkcs-1"},
- {0,1,"5"},
- {"id-dsa-with-sha1",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"x9-57",1073741825,"10040"},
- {"x9algorithm",1073741825,"4"},
- {0,1,"3"},
- {"Dss-Sig-Value",1610612741,0},
- {"r",1073741827,0},
- {"s",3,0},
- {"dhpublicnumber",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"ansi-x942",1073741825,"10046"},
- {"number-type",1073741825,"2"},
- {0,1,"1"},
- {"DomainParameters",1610612741,0},
- {"p",1073741827,0},
- {"g",1073741827,0},
- {"q",1073741827,0},
- {"j",1073758211,0},
- {"validationParms",16386,"ValidationParms"},
- {"ValidationParms",1610612741,0},
- {"seed",1073741830,0},
- {"pgenCounter",3,0},
- {"id-dsa",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"x9-57",1073741825,"10040"},
- {"x9algorithm",1073741825,"4"},
- {0,1,"1"},
- {"Dss-Parms",1610612741,0},
- {"p",1073741827,0},
- {"q",1073741827,0},
- {"g",3,0},
- {"ORAddress",1610612741,0},
- {"built-in-standard-attributes",1073741826,"BuiltInStandardAttributes"},
- {"built-in-domain-defined-attributes",1073758210,"BuiltInDomainDefinedAttributes"},
- {"extension-attributes",16386,"ExtensionAttributes"},
- {"BuiltInStandardAttributes",1610612741,0},
- {"country-name",1073758210,"CountryName"},
- {"administration-domain-name",1073758210,"AdministrationDomainName"},
- {"network-address",1610637314,"NetworkAddress"},
- {0,2056,"0"},
- {"terminal-identifier",1610637314,"TerminalIdentifier"},
- {0,2056,"1"},
- {"private-domain-name",1610637314,"PrivateDomainName"},
- {0,2056,"2"},
- {"organization-name",1610637314,"OrganizationName"},
- {0,2056,"3"},
- {"numeric-user-identifier",1610637314,"NumericUserIdentifier"},
- {0,2056,"4"},
- {"personal-name",1610637314,"PersonalName"},
- {0,2056,"5"},
- {"organizational-unit-names",536895490,"OrganizationalUnitNames"},
- {0,2056,"6"},
- {"CountryName",1610620946,0},
- {0,1073746952,"1"},
- {"x121-dcc-code",1612709890,"NumericString"},
- {0,1048586,"ub-country-name-numeric-length"},
- {"iso-3166-alpha2-code",538968066,"PrintableString"},
- {0,1048586,"ub-country-name-alpha-length"},
- {"AdministrationDomainName",1610620946,0},
- {0,1073744904,"2"},
- {"numeric",1612709890,"NumericString"},
- {"ub-domain-name-length",524298,"0"},
- {"printable",538968066,"PrintableString"},
- {"ub-domain-name-length",524298,"0"},
- {"NetworkAddress",1073741826,"X121Address"},
- {"X121Address",1612709890,"NumericString"},
- {"ub-x121-address-length",524298,"1"},
- {"TerminalIdentifier",1612709890,"PrintableString"},
- {"ub-terminal-id-length",524298,"1"},
- {"PrivateDomainName",1610612754,0},
- {"numeric",1612709890,"NumericString"},
- {"ub-domain-name-length",524298,"1"},
- {"printable",538968066,"PrintableString"},
- {"ub-domain-name-length",524298,"1"},
- {"OrganizationName",1612709890,"PrintableString"},
- {"ub-organization-name-length",524298,"1"},
- {"NumericUserIdentifier",1612709890,"NumericString"},
- {"ub-numeric-user-id-length",524298,"1"},
- {"PersonalName",1610612750,0},
- {"surname",1814044674,"PrintableString"},
- {0,1073745928,"0"},
- {"ub-surname-length",524298,"1"},
- {"given-name",1814061058,"PrintableString"},
- {0,1073745928,"1"},
- {"ub-given-name-length",524298,"1"},
- {"initials",1814061058,"PrintableString"},
- {0,1073745928,"2"},
- {"ub-initials-length",524298,"1"},
- {"generation-qualifier",740319234,"PrintableString"},
- {0,1073745928,"3"},
- {"ub-generation-qualifier-length",524298,"1"},
- {"OrganizationalUnitNames",1612709899,0},
- {"ub-organizational-units",1074266122,"1"},
- {0,2,"OrganizationalUnitName"},
- {"OrganizationalUnitName",1612709890,"PrintableString"},
- {"ub-organizational-unit-name-length",524298,"1"},
- {"BuiltInDomainDefinedAttributes",1612709899,0},
- {"ub-domain-defined-attributes",1074266122,"1"},
- {0,2,"BuiltInDomainDefinedAttribute"},
- {"BuiltInDomainDefinedAttribute",1610612741,0},
- {"type",1612709890,"PrintableString"},
- {"ub-domain-defined-attribute-type-length",524298,"1"},
- {"value",538968066,"PrintableString"},
- {"ub-domain-defined-attribute-value-length",524298,"1"},
- {"ExtensionAttributes",1612709903,0},
- {"ub-extension-attributes",1074266122,"1"},
- {0,2,"ExtensionAttribute"},
- {"ExtensionAttribute",1610612741,0},
- {"extension-attribute-type",1611145219,0},
- {0,1073743880,"0"},
- {"0",10,"ub-extension-attributes"},
- {"extension-attribute-value",541073421,0},
- {0,1073743880,"1"},
- {"extension-attribute-type",1,0},
- {"common-name",1342177283,"1"},
- {"CommonName",1612709890,"PrintableString"},
- {"ub-common-name-length",524298,"1"},
- {"teletex-common-name",1342177283,"2"},
- {"TeletexCommonName",1612709890,"TeletexString"},
- {"ub-common-name-length",524298,"1"},
- {"teletex-organization-name",1342177283,"3"},
- {"TeletexOrganizationName",1612709890,"TeletexString"},
- {"ub-organization-name-length",524298,"1"},
- {"teletex-personal-name",1342177283,"4"},
- {"TeletexPersonalName",1610612750,0},
- {"surname",1814044674,"TeletexString"},
- {0,1073743880,"0"},
- {"ub-surname-length",524298,"1"},
- {"given-name",1814061058,"TeletexString"},
- {0,1073743880,"1"},
- {"ub-given-name-length",524298,"1"},
- {"initials",1814061058,"TeletexString"},
- {0,1073743880,"2"},
- {"ub-initials-length",524298,"1"},
- {"generation-qualifier",740319234,"TeletexString"},
- {0,1073743880,"3"},
- {"ub-generation-qualifier-length",524298,"1"},
- {"teletex-organizational-unit-names",1342177283,"5"},
- {"TeletexOrganizationalUnitNames",1612709899,0},
- {"ub-organizational-units",1074266122,"1"},
- {0,2,"TeletexOrganizationalUnitName"},
- {"TeletexOrganizationalUnitName",1612709890,"TeletexString"},
- {"ub-organizational-unit-name-length",524298,"1"},
- {"pds-name",1342177283,"7"},
- {"PDSName",1612709890,"PrintableString"},
- {"ub-pds-name-length",524298,"1"},
- {"physical-delivery-country-name",1342177283,"8"},
- {"PhysicalDeliveryCountryName",1610612754,0},
- {"x121-dcc-code",1612709890,"NumericString"},
- {0,1048586,"ub-country-name-numeric-length"},
- {"iso-3166-alpha2-code",538968066,"PrintableString"},
- {0,1048586,"ub-country-name-alpha-length"},
- {"postal-code",1342177283,"9"},
- {"PostalCode",1610612754,0},
- {"numeric-code",1612709890,"NumericString"},
- {"ub-postal-code-length",524298,"1"},
- {"printable-code",538968066,"PrintableString"},
- {"ub-postal-code-length",524298,"1"},
- {"physical-delivery-office-name",1342177283,"10"},
- {"PhysicalDeliveryOfficeName",1073741826,"PDSParameter"},
- {"physical-delivery-office-number",1342177283,"11"},
- {"PhysicalDeliveryOfficeNumber",1073741826,"PDSParameter"},
- {"extension-OR-address-components",1342177283,"12"},
- {"ExtensionORAddressComponents",1073741826,"PDSParameter"},
- {"physical-delivery-personal-name",1342177283,"13"},
- {"PhysicalDeliveryPersonalName",1073741826,"PDSParameter"},
- {"physical-delivery-organization-name",1342177283,"14"},
- {"PhysicalDeliveryOrganizationName",1073741826,"PDSParameter"},
- {"extension-physical-delivery-address-components",1342177283,"15"},
- {"ExtensionPhysicalDeliveryAddressComponents",1073741826,"PDSParameter"},
- {"unformatted-postal-address",1342177283,"16"},
- {"UnformattedPostalAddress",1610612750,0},
- {"printable-address",1814052875,0},
- {"ub-pds-physical-address-lines",1074266122,"1"},
- {0,538968066,"PrintableString"},
- {"ub-pds-parameter-length",524298,"1"},
- {"teletex-string",740311042,"TeletexString"},
- {"ub-unformatted-address-length",524298,"1"},
- {"street-address",1342177283,"17"},
- {"StreetAddress",1073741826,"PDSParameter"},
- {"post-office-box-address",1342177283,"18"},
- {"PostOfficeBoxAddress",1073741826,"PDSParameter"},
- {"poste-restante-address",1342177283,"19"},
- {"PosteRestanteAddress",1073741826,"PDSParameter"},
- {"unique-postal-name",1342177283,"20"},
- {"UniquePostalName",1073741826,"PDSParameter"},
- {"local-postal-attributes",1342177283,"21"},
- {"LocalPostalAttributes",1073741826,"PDSParameter"},
- {"PDSParameter",1610612750,0},
- {"printable-string",1814052866,"PrintableString"},
- {"ub-pds-parameter-length",524298,"1"},
- {"teletex-string",740311042,"TeletexString"},
- {"ub-pds-parameter-length",524298,"1"},
- {"extended-network-address",1342177283,"22"},
- {"ExtendedNetworkAddress",1610612754,0},
- {"e163-4-address",1610612741,0},
- {"number",1612718082,"NumericString"},
- {0,1073743880,"0"},
- {"ub-e163-4-number-length",524298,"1"},
- {"sub-address",538992642,"NumericString"},
- {0,1073743880,"1"},
- {"ub-e163-4-sub-address-length",524298,"1"},
- {"psap-address",536879106,"PresentationAddress"},
- {0,2056,"0"},
- {"PresentationAddress",1610612741,0},
- {"pSelector",1610637319,0},
- {0,2056,"0"},
- {"sSelector",1610637319,0},
- {0,2056,"1"},
- {"tSelector",1610637319,0},
- {0,2056,"2"},
- {"nAddresses",538976271,0},
- {0,1073743880,"3"},
- {"MAX",1074266122,"1"},
- {0,7,0},
- {"terminal-type",1342177283,"23"},
- {"TerminalType",1610874883,0},
- {"telex",1073741825,"3"},
- {"teletex",1073741825,"4"},
- {"g3-facsimile",1073741825,"5"},
- {"g4-facsimile",1073741825,"6"},
- {"ia5-terminal",1073741825,"7"},
- {"videotex",1,"8"},
- {"teletex-domain-defined-attributes",1342177283,"6"},
- {"TeletexDomainDefinedAttributes",1612709899,0},
- {"ub-domain-defined-attributes",1074266122,"1"},
- {0,2,"TeletexDomainDefinedAttribute"},
- {"TeletexDomainDefinedAttribute",1610612741,0},
- {"type",1612709890,"TeletexString"},
- {"ub-domain-defined-attribute-type-length",524298,"1"},
- {"value",538968066,"TeletexString"},
- {"ub-domain-defined-attribute-value-length",524298,"1"},
- {"ub-name",1342177283,"32768"},
- {"ub-common-name",1342177283,"64"},
- {"ub-locality-name",1342177283,"128"},
- {"ub-state-name",1342177283,"128"},
- {"ub-organization-name",1342177283,"64"},
- {"ub-organizational-unit-name",1342177283,"64"},
- {"ub-title",1342177283,"64"},
- {"ub-match",1342177283,"128"},
- {"ub-emailaddress-length",1342177283,"128"},
- {"ub-common-name-length",1342177283,"64"},
- {"ub-country-name-alpha-length",1342177283,"2"},
- {"ub-country-name-numeric-length",1342177283,"3"},
- {"ub-domain-defined-attributes",1342177283,"4"},
- {"ub-domain-defined-attribute-type-length",1342177283,"8"},
- {"ub-domain-defined-attribute-value-length",1342177283,"128"},
- {"ub-domain-name-length",1342177283,"16"},
- {"ub-extension-attributes",1342177283,"256"},
- {"ub-e163-4-number-length",1342177283,"15"},
- {"ub-e163-4-sub-address-length",1342177283,"40"},
- {"ub-generation-qualifier-length",1342177283,"3"},
- {"ub-given-name-length",1342177283,"16"},
- {"ub-initials-length",1342177283,"5"},
- {"ub-integer-options",1342177283,"256"},
- {"ub-numeric-user-id-length",1342177283,"32"},
- {"ub-organization-name-length",1342177283,"64"},
- {"ub-organizational-unit-name-length",1342177283,"32"},
- {"ub-organizational-units",1342177283,"4"},
- {"ub-pds-name-length",1342177283,"16"},
- {"ub-pds-parameter-length",1342177283,"30"},
- {"ub-pds-physical-address-lines",1342177283,"6"},
- {"ub-postal-code-length",1342177283,"16"},
- {"ub-surname-length",1342177283,"40"},
- {"ub-terminal-id-length",1342177283,"24"},
- {"ub-unformatted-address-length",1342177283,"180"},
- {"ub-x121-address-length",1342177283,"16"},
- {"pkcs-7-ContentInfo",1610612741,0},
- {"contentType",1073741826,"pkcs-7-ContentType"},
- {"content",541073421,0},
- {0,1073743880,"0"},
- {"contentType",1,0},
- {"pkcs-7-DigestInfo",1610612741,0},
- {"digestAlgorithm",1073741826,"pkcs-7-DigestAlgorithmIdentifier"},
- {"digest",2,"pkcs-7-Digest"},
- {"pkcs-7-Digest",1073741831,0},
- {"pkcs-7-ContentType",1073741836,0},
- {"pkcs-7-SignedData",1610612741,0},
- {"version",1073741826,"pkcs-7-CMSVersion"},
- {"digestAlgorithms",1073741826,"pkcs-7-DigestAlgorithmIdentifiers"},
- {"encapContentInfo",1073741826,"pkcs-7-EncapsulatedContentInfo"},
- {"certificates",1610637314,"pkcs-7-CertificateSet"},
- {0,4104,"0"},
- {"crls",1610637314,"pkcs-7-CertificateRevocationLists"},
- {0,4104,"1"},
- {"signerInfos",2,"pkcs-7-SignerInfos"},
- {"pkcs-7-CMSVersion",1610874883,0},
- {"v0",1073741825,"0"},
- {"v1",1073741825,"1"},
- {"v2",1073741825,"2"},
- {"v3",1073741825,"3"},
- {"v4",1,"4"},
- {"pkcs-7-DigestAlgorithmIdentifiers",1610612751,0},
- {0,2,"pkcs-7-DigestAlgorithmIdentifier"},
- {"pkcs-7-DigestAlgorithmIdentifier",1073741826,"AlgorithmIdentifier"},
- {"pkcs-7-EncapsulatedContentInfo",1610612741,0},
- {"eContentType",1073741826,"pkcs-7-ContentType"},
- {"eContent",536895495,0},
- {0,2056,"0"},
- {"pkcs-7-CertificateRevocationLists",1610612751,0},
- {0,13,0},
- {"pkcs-7-CertificateChoices",1610612754,0},
- {"certificate",13,0},
- {"pkcs-7-CertificateSet",1610612751,0},
- {0,2,"pkcs-7-CertificateChoices"},
- {"pkcs-7-SignerInfos",1610612751,0},
- {0,13,0},
- {"pkcs-10-CertificationRequestInfo",1610612741,0},
- {"version",1610874883,0},
- {"v1",1,"0"},
- {"subject",1073741826,"Name"},
- {"subjectPKInfo",1073741826,"SubjectPublicKeyInfo"},
- {"attributes",536879106,"Attributes"},
- {0,4104,"0"},
- {"Attributes",1610612751,0},
- {0,2,"Attribute"},
- {"pkcs-10-CertificationRequest",1610612741,0},
- {"certificationRequestInfo",1073741826,"pkcs-10-CertificationRequestInfo"},
- {"signatureAlgorithm",1073741826,"AlgorithmIdentifier"},
- {"signature",6,0},
- {"pkcs-9-ub-challengePassword",1342177283,"255"},
- {"pkcs-9-certTypes",1879048204,0},
- {0,1073741825,"pkcs-9"},
- {0,1,"22"},
- {"pkcs-9-crlTypes",1879048204,0},
- {0,1073741825,"pkcs-9"},
- {0,1,"23"},
- {"pkcs-9-at-challengePassword",1879048204,0},
- {0,1073741825,"pkcs-9"},
- {0,1,"7"},
- {"pkcs-9-challengePassword",1610612754,0},
- {"printableString",1612709890,"PrintableString"},
- {"pkcs-9-ub-challengePassword",524298,"1"},
- {"utf8String",538968066,"UTF8String"},
- {"pkcs-9-ub-challengePassword",524298,"1"},
- {"pkcs-9-at-localKeyId",1879048204,0},
- {0,1073741825,"pkcs-9"},
- {0,1,"21"},
- {"pkcs-9-localKeyId",1073741831,0},
- {"pkcs-9-at-friendlyName",1879048204,0},
- {0,1073741825,"pkcs-9"},
- {0,1,"20"},
- {"pkcs-9-friendlyName",1612709890,"BMPString"},
- {"255",524298,"1"},
- {"pkcs-8-PrivateKeyInfo",1610612741,0},
- {"version",1073741826,"pkcs-8-Version"},
- {"privateKeyAlgorithm",1073741826,"AlgorithmIdentifier"},
- {"privateKey",1073741826,"pkcs-8-PrivateKey"},
- {"attributes",536895490,"Attributes"},
- {0,4104,"0"},
- {"pkcs-8-Version",1610874883,0},
- {"v1",1,"0"},
- {"pkcs-8-PrivateKey",1073741831,0},
- {"pkcs-8-Attributes",1610612751,0},
- {0,2,"Attribute"},
- {"pkcs-8-EncryptedPrivateKeyInfo",1610612741,0},
- {"encryptionAlgorithm",1073741826,"AlgorithmIdentifier"},
- {"encryptedData",2,"pkcs-8-EncryptedData"},
- {"pkcs-8-EncryptedData",1073741831,0},
- {"pkcs-5",1879048204,0},
- {0,1073741825,"pkcs"},
- {0,1,"5"},
- {"pkcs-5-encryptionAlgorithm",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"rsadsi",1073741825,"113549"},
- {0,1,"3"},
- {"pkcs-5-des-EDE3-CBC",1879048204,0},
- {0,1073741825,"pkcs-5-encryptionAlgorithm"},
- {0,1,"7"},
- {"pkcs-5-des-EDE3-CBC-params",1612709895,0},
- {0,1048586,"8"},
- {"pkcs-5-id-PBES2",1879048204,0},
- {0,1073741825,"pkcs-5"},
- {0,1,"13"},
- {"pkcs-5-PBES2-params",1610612741,0},
- {"keyDerivationFunc",1073741826,"AlgorithmIdentifier"},
- {"encryptionScheme",2,"AlgorithmIdentifier"},
- {"pkcs-5-id-PBKDF2",1879048204,0},
- {0,1073741825,"pkcs-5"},
- {0,1,"12"},
- {"pkcs-5-PBKDF2-params",1610612741,0},
- {"salt",1610612754,0},
- {"specified",1073741831,0},
- {"otherSource",2,"AlgorithmIdentifier"},
- {"iterationCount",1611137027,0},
- {"1",10,"MAX"},
- {"keyLength",1611153411,0},
- {"1",10,"MAX"},
- {"prf",16386,"AlgorithmIdentifier"},
- {"pkcs-12",1879048204,0},
- {0,1073741825,"pkcs"},
- {0,1,"12"},
- {"pkcs-12-PFX",1610612741,0},
- {"version",1610874883,0},
- {"v3",1,"3"},
- {"authSafe",1073741826,"pkcs-7-ContentInfo"},
- {"macData",16386,"pkcs-12-MacData"},
- {"pkcs-12-PbeParams",1610612741,0},
- {"salt",1073741831,0},
- {"iterations",3,0},
- {"pkcs-12-MacData",1610612741,0},
- {"mac",1073741826,"pkcs-7-DigestInfo"},
- {"macSalt",1073741831,0},
- {"iterations",536903683,0},
- {0,9,"1"},
- {"pkcs-12-AuthenticatedSafe",1610612747,0},
- {0,2,"pkcs-7-ContentInfo"},
- {"pkcs-12-SafeContents",1610612747,0},
- {0,2,"pkcs-12-SafeBag"},
- {"pkcs-12-SafeBag",1610612741,0},
- {"bagId",1073741836,0},
- {"bagValue",1614815245,0},
- {0,1073743880,"0"},
- {"badId",1,0},
- {"bagAttributes",536887311,0},
- {0,2,"pkcs-12-PKCS12Attribute"},
- {"pkcs-12-bagtypes",1879048204,0},
- {0,1073741825,"pkcs-12"},
- {0,1073741825,"10"},
- {0,1,"1"},
- {"pkcs-12-keyBag",1879048204,0},
- {0,1073741825,"pkcs-12-bagtypes"},
- {0,1,"1"},
- {"pkcs-12-pkcs8ShroudedKeyBag",1879048204,0},
- {0,1073741825,"pkcs-12-bagtypes"},
- {0,1,"2"},
- {"pkcs-12-certBag",1879048204,0},
- {0,1073741825,"pkcs-12-bagtypes"},
- {0,1,"3"},
- {"pkcs-12-crlBag",1879048204,0},
- {0,1073741825,"pkcs-12-bagtypes"},
- {0,1,"4"},
- {"pkcs-12-KeyBag",1073741826,"pkcs-8-PrivateKeyInfo"},
- {"pkcs-12-PKCS8ShroudedKeyBag",1073741826,"pkcs-8-EncryptedPrivateKeyInfo"},
- {"pkcs-12-CertBag",1610612741,0},
- {"certId",1073741836,0},
- {"certValue",541073421,0},
- {0,1073743880,"0"},
- {"certId",1,0},
- {"pkcs-12-CRLBag",1610612741,0},
- {"crlId",1073741836,0},
- {"crlValue",541073421,0},
- {0,1073743880,"0"},
- {"crlId",1,0},
- {"pkcs-12-PKCS12Attribute",1073741826,"Attribute"},
- {"pkcs-7-data",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"rsadsi",1073741825,"113549"},
- {"pkcs",1073741825,"1"},
- {"pkcs7",1073741825,"7"},
- {0,1,"1"},
- {"pkcs-7-encryptedData",1879048204,0},
- {"iso",1073741825,"1"},
- {"member-body",1073741825,"2"},
- {"us",1073741825,"840"},
- {"rsadsi",1073741825,"113549"},
- {"pkcs",1073741825,"1"},
- {"pkcs7",1073741825,"7"},
- {0,1,"6"},
- {"pkcs-7-Data",1073741831,0},
- {"pkcs-7-EncryptedData",1610612741,0},
- {"version",1073741826,"pkcs-7-CMSVersion"},
- {"encryptedContentInfo",1073741826,"pkcs-7-EncryptedContentInfo"},
- {"unprotectedAttrs",536895490,"pkcs-7-UnprotectedAttributes"},
- {0,4104,"1"},
- {"pkcs-7-EncryptedContentInfo",1610612741,0},
- {"contentType",1073741826,"pkcs-7-ContentType"},
- {"contentEncryptionAlgorithm",1073741826,"pkcs-7-ContentEncryptionAlgorithmIdentifier"},
- {"encryptedContent",536895490,"pkcs-7-EncryptedContent"},
- {0,4104,"0"},
- {"pkcs-7-ContentEncryptionAlgorithmIdentifier",1073741826,"AlgorithmIdentifier"},
- {"pkcs-7-EncryptedContent",1073741831,0},
- {"pkcs-7-UnprotectedAttributes",1612709903,0},
- {"MAX",1074266122,"1"},
- {0,2,"Attribute"},
- {"id-at-ldap-DC",1880096780,"AttributeType"},
- {0,1073741825,"0"},
- {0,1073741825,"9"},
- {0,1073741825,"2342"},
- {0,1073741825,"19200300"},
- {0,1073741825,"100"},
- {0,1073741825,"1"},
- {0,1,"25"},
- {"ldap-DC",1073741826,"IA5String"},
- {"id-at-ldap-UID",1880096780,"AttributeType"},
- {0,1073741825,"0"},
- {0,1073741825,"9"},
- {0,1073741825,"2342"},
- {0,1073741825,"19200300"},
- {0,1073741825,"100"},
- {0,1073741825,"1"},
- {0,1,"1"},
- {"ldap-UID",1073741826,"DirectoryString"},
- {"id-pda",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"9"},
- {"id-pda-dateOfBirth",1880096780,"AttributeType"},
- {0,1073741825,"id-pda"},
- {0,1,"1"},
- {"DateOfBirth",1082130449,0},
- {"id-pda-placeOfBirth",1880096780,"AttributeType"},
- {0,1073741825,"id-pda"},
- {0,1,"2"},
- {"PlaceOfBirth",1073741826,"DirectoryString"},
- {"id-pda-gender",1880096780,"AttributeType"},
- {0,1073741825,"id-pda"},
- {0,1,"3"},
- {"Gender",1612709890,"PrintableString"},
- {0,1048586,"1"},
- {"id-pda-countryOfCitizenship",1880096780,"AttributeType"},
- {0,1073741825,"id-pda"},
- {0,1,"4"},
- {"CountryOfCitizenship",1612709890,"PrintableString"},
- {0,1048586,"2"},
- {"id-pda-countryOfResidence",1880096780,"AttributeType"},
- {0,1073741825,"id-pda"},
- {0,1,"5"},
- {"CountryOfResidence",1612709890,"PrintableString"},
- {0,1048586,"2"},
- {"id-pe-proxyCertInfo",1879048204,0},
- {0,1073741825,"id-pe"},
- {0,1,"14"},
- {"id-ppl-inheritAll",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1073741825,"21"},
- {0,1,"1"},
- {"id-ppl-independent",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1073741825,"21"},
- {0,1,"2"},
- {"ProxyCertInfo",1610612741,0},
- {"pCPathLenConstraint",1611153411,0},
- {"0",10,"MAX"},
- {"proxyPolicy",2,"ProxyPolicy"},
- {"ProxyPolicy",1610612741,0},
- {"policyLanguage",1073741836,0},
- {"policy",16391,0},
- {"id-on",1879048204,0},
- {0,1073741825,"id-pkix"},
- {0,1,"8"},
- {"id-on-xmppAddr",1879048204,0},
- {0,1073741825,"id-on"},
- {0,1,"5"},
- {"XmppAddr",2,"UTF8String"},
- {0,0,0}
+const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
+ { "PKIX1", 536875024, NULL },
+ { NULL, 1073741836, NULL },
+ { "id-ce", 1879048204, NULL },
+ { "joint-iso-ccitt", 1073741825, "2"},
+ { "ds", 1073741825, "5"},
+ { NULL, 1, "29"},
+ { "id-ce-authorityKeyIdentifier", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "35"},
+ { "AuthorityKeyIdentifier", 1610612741, NULL },
+ { "keyIdentifier", 1610637314, "KeyIdentifier"},
+ { NULL, 4104, "0"},
+ { "authorityCertIssuer", 1610637314, "GeneralNames"},
+ { NULL, 4104, "1"},
+ { "authorityCertSerialNumber", 536895490, "CertificateSerialNumber"},
+ { NULL, 4104, "2"},
+ { "KeyIdentifier", 1073741831, NULL },
+ { "id-ce-subjectKeyIdentifier", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "14"},
+ { "SubjectKeyIdentifier", 1073741826, "KeyIdentifier"},
+ { "id-ce-keyUsage", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "15"},
+ { "KeyUsage", 1610874886, NULL },
+ { "digitalSignature", 1073741825, "0"},
+ { "nonRepudiation", 1073741825, "1"},
+ { "keyEncipherment", 1073741825, "2"},
+ { "dataEncipherment", 1073741825, "3"},
+ { "keyAgreement", 1073741825, "4"},
+ { "keyCertSign", 1073741825, "5"},
+ { "cRLSign", 1073741825, "6"},
+ { "encipherOnly", 1073741825, "7"},
+ { "decipherOnly", 1, "8"},
+ { "id-ce-privateKeyUsagePeriod", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "16"},
+ { "PrivateKeyUsagePeriod", 1610612741, NULL },
+ { "notBefore", 1619025937, NULL },
+ { NULL, 4104, "0"},
+ { "notAfter", 545284113, NULL },
+ { NULL, 4104, "1"},
+ { "id-ce-certificatePolicies", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "32"},
+ { "CertificatePolicies", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "PolicyInformation"},
+ { "PolicyInformation", 1610612741, NULL },
+ { "policyIdentifier", 1073741826, "CertPolicyId"},
+ { "policyQualifiers", 538984459, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "PolicyQualifierInfo"},
+ { "CertPolicyId", 1073741836, NULL },
+ { "PolicyQualifierInfo", 1610612741, NULL },
+ { "policyQualifierId", 1073741826, "PolicyQualifierId"},
+ { "qualifier", 541065229, NULL },
+ { "policyQualifierId", 1, NULL },
+ { "PolicyQualifierId", 1073741836, NULL },
+ { "CPSuri", 1073741826, "IA5String"},
+ { "UserNotice", 1610612741, NULL },
+ { "noticeRef", 1073758210, "NoticeReference"},
+ { "explicitText", 16386, "DisplayText"},
+ { "NoticeReference", 1610612741, NULL },
+ { "organization", 1073741826, "DisplayText"},
+ { "noticeNumbers", 536870923, NULL },
+ { NULL, 3, NULL },
+ { "DisplayText", 1610612754, NULL },
+ { "visibleString", 1612709890, "VisibleString"},
+ { "200", 524298, "1"},
+ { "bmpString", 1612709890, "BMPString"},
+ { "200", 524298, "1"},
+ { "utf8String", 538968066, "UTF8String"},
+ { "200", 524298, "1"},
+ { "id-ce-policyMappings", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "33"},
+ { "PolicyMappings", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 536870917, NULL },
+ { "issuerDomainPolicy", 1073741826, "CertPolicyId"},
+ { "subjectDomainPolicy", 2, "CertPolicyId"},
+ { "DirectoryString", 1610612754, NULL },
+ { "teletexString", 1612709890, "TeletexString"},
+ { "MAX", 524298, "1"},
+ { "printableString", 1612709890, "PrintableString"},
+ { "MAX", 524298, "1"},
+ { "universalString", 1612709890, "UniversalString"},
+ { "MAX", 524298, "1"},
+ { "utf8String", 1612709890, "UTF8String"},
+ { "MAX", 524298, "1"},
+ { "bmpString", 1612709890, "BMPString"},
+ { "MAX", 524298, "1"},
+ { "ia5String", 538968066, "IA5String"},
+ { "MAX", 524298, "1"},
+ { "id-ce-subjectAltName", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "17"},
+ { "SubjectAltName", 1073741826, "GeneralNames"},
+ { "GeneralNames", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "GeneralName"},
+ { "GeneralName", 1610612754, NULL },
+ { "otherName", 1610620930, "AnotherName"},
+ { NULL, 4104, "0"},
+ { "rfc822Name", 1610620930, "IA5String"},
+ { NULL, 4104, "1"},
+ { "dNSName", 1610620930, "IA5String"},
+ { NULL, 4104, "2"},
+ { "x400Address", 1610620930, "ORAddress"},
+ { NULL, 4104, "3"},
+ { "directoryName", 1610620930, "RDNSequence"},
+ { NULL, 2056, "4"},
+ { "ediPartyName", 1610620930, "EDIPartyName"},
+ { NULL, 4104, "5"},
+ { "uniformResourceIdentifier", 1610620930, "IA5String"},
+ { NULL, 4104, "6"},
+ { "iPAddress", 1610620935, NULL },
+ { NULL, 4104, "7"},
+ { "registeredID", 536879116, NULL },
+ { NULL, 4104, "8"},
+ { "AnotherName", 1610612741, NULL },
+ { "type-id", 1073741836, NULL },
+ { "value", 541073421, NULL },
+ { NULL, 1073743880, "0"},
+ { "type-id", 1, NULL },
+ { "EDIPartyName", 1610612741, NULL },
+ { "nameAssigner", 1610637314, "DirectoryString"},
+ { NULL, 4104, "0"},
+ { "partyName", 536879106, "DirectoryString"},
+ { NULL, 4104, "1"},
+ { "id-ce-issuerAltName", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "18"},
+ { "IssuerAltName", 1073741826, "GeneralNames"},
+ { "id-ce-subjectDirectoryAttributes", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "9"},
+ { "SubjectDirectoryAttributes", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "Attribute"},
+ { "id-ce-basicConstraints", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "19"},
+ { "BasicConstraints", 1610612741, NULL },
+ { "cA", 1610645508, NULL },
+ { NULL, 131081, NULL },
+ { "pathLenConstraint", 537411587, NULL },
+ { "0", 10, "MAX"},
+ { "id-ce-nameConstraints", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "30"},
+ { "NameConstraints", 1610612741, NULL },
+ { "permittedSubtrees", 1610637314, "GeneralSubtrees"},
+ { NULL, 4104, "0"},
+ { "excludedSubtrees", 536895490, "GeneralSubtrees"},
+ { NULL, 4104, "1"},
+ { "GeneralSubtrees", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "GeneralSubtree"},
+ { "GeneralSubtree", 1610612741, NULL },
+ { "base", 1073741826, "GeneralName"},
+ { "minimum", 1610653698, "BaseDistance"},
+ { NULL, 1073741833, "0"},
+ { NULL, 4104, "0"},
+ { "maximum", 536895490, "BaseDistance"},
+ { NULL, 4104, "1"},
+ { "BaseDistance", 1611137027, NULL },
+ { "0", 10, "MAX"},
+ { "id-ce-policyConstraints", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "36"},
+ { "PolicyConstraints", 1610612741, NULL },
+ { "requireExplicitPolicy", 1610637314, "SkipCerts"},
+ { NULL, 4104, "0"},
+ { "inhibitPolicyMapping", 536895490, "SkipCerts"},
+ { NULL, 4104, "1"},
+ { "SkipCerts", 1611137027, NULL },
+ { "0", 10, "MAX"},
+ { "id-ce-cRLDistributionPoints", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "31"},
+ { "CRLDistributionPoints", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "DistributionPoint"},
+ { "DistributionPoint", 1610612741, NULL },
+ { "distributionPoint", 1610637314, "DistributionPointName"},
+ { NULL, 2056, "0"},
+ { "reasons", 1610637314, "ReasonFlags"},
+ { NULL, 4104, "1"},
+ { "cRLIssuer", 536895490, "GeneralNames"},
+ { NULL, 4104, "2"},
+ { "DistributionPointName", 1610612754, NULL },
+ { "fullName", 1610620930, "GeneralNames"},
+ { NULL, 4104, "0"},
+ { "nameRelativeToCRLIssuer", 536879106, "RelativeDistinguishedName"},
+ { NULL, 4104, "1"},
+ { "ReasonFlags", 1610874886, NULL },
+ { "unused", 1073741825, "0"},
+ { "keyCompromise", 1073741825, "1"},
+ { "cACompromise", 1073741825, "2"},
+ { "affiliationChanged", 1073741825, "3"},
+ { "superseded", 1073741825, "4"},
+ { "cessationOfOperation", 1073741825, "5"},
+ { "certificateHold", 1073741825, "6"},
+ { "privilegeWithdrawn", 1073741825, "7"},
+ { "aACompromise", 1, "8"},
+ { "id-ce-extKeyUsage", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "37"},
+ { "ExtKeyUsageSyntax", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "KeyPurposeId"},
+ { "KeyPurposeId", 1073741836, NULL },
+ { "id-kp-serverAuth", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "1"},
+ { "id-kp-clientAuth", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "2"},
+ { "id-kp-codeSigning", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "3"},
+ { "id-kp-emailProtection", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "4"},
+ { "id-kp-ipsecEndSystem", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "5"},
+ { "id-kp-ipsecTunnel", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "6"},
+ { "id-kp-ipsecUser", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "7"},
+ { "id-kp-timeStamping", 1879048204, NULL },
+ { NULL, 1073741825, "id-kp"},
+ { NULL, 1, "8"},
+ { "id-pe-authorityInfoAccess", 1879048204, NULL },
+ { NULL, 1073741825, "id-pe"},
+ { NULL, 1, "1"},
+ { "AuthorityInfoAccessSyntax", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "AccessDescription"},
+ { "AccessDescription", 1610612741, NULL },
+ { "accessMethod", 1073741836, NULL },
+ { "accessLocation", 2, "GeneralName"},
+ { "id-ce-cRLNumber", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "20"},
+ { "CRLNumber", 1611137027, NULL },
+ { "0", 10, "MAX"},
+ { "id-ce-issuingDistributionPoint", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "28"},
+ { "IssuingDistributionPoint", 1610612741, NULL },
+ { "distributionPoint", 1610637314, "DistributionPointName"},
+ { NULL, 4104, "0"},
+ { "onlyContainsUserCerts", 1610653700, NULL },
+ { NULL, 1073872905, NULL },
+ { NULL, 4104, "1"},
+ { "onlyContainsCACerts", 1610653700, NULL },
+ { NULL, 1073872905, NULL },
+ { NULL, 4104, "2"},
+ { "onlySomeReasons", 1610637314, "ReasonFlags"},
+ { NULL, 4104, "3"},
+ { "indirectCRL", 536911876, NULL },
+ { NULL, 1073872905, NULL },
+ { NULL, 4104, "4"},
+ { "id-ce-deltaCRLIndicator", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "27"},
+ { "BaseCRLNumber", 1073741826, "CRLNumber"},
+ { "id-ce-cRLReasons", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "21"},
+ { "CRLReason", 1610874901, NULL },
+ { "unspecified", 1073741825, "0"},
+ { "keyCompromise", 1073741825, "1"},
+ { "cACompromise", 1073741825, "2"},
+ { "affiliationChanged", 1073741825, "3"},
+ { "superseded", 1073741825, "4"},
+ { "cessationOfOperation", 1073741825, "5"},
+ { "certificateHold", 1073741825, "6"},
+ { "removeFromCRL", 1, "8"},
+ { "id-ce-certificateIssuer", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "29"},
+ { "CertificateIssuer", 1073741826, "GeneralNames"},
+ { "id-ce-holdInstructionCode", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "23"},
+ { "HoldInstructionCode", 1073741836, NULL },
+ { "holdInstruction", 1879048204, NULL },
+ { "joint-iso-itu-t", 1073741825, "2"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "x9cm", 1073741825, "10040"},
+ { NULL, 1, "2"},
+ { "id-holdinstruction-none", 1879048204, NULL },
+ { NULL, 1073741825, "holdInstruction"},
+ { NULL, 1, "1"},
+ { "id-holdinstruction-callissuer", 1879048204, NULL },
+ { NULL, 1073741825, "holdInstruction"},
+ { NULL, 1, "2"},
+ { "id-holdinstruction-reject", 1879048204, NULL },
+ { NULL, 1073741825, "holdInstruction"},
+ { NULL, 1, "3"},
+ { "id-ce-invalidityDate", 1879048204, NULL },
+ { NULL, 1073741825, "id-ce"},
+ { NULL, 1, "24"},
+ { "InvalidityDate", 1082130449, NULL },
+ { "VisibleString", 1610620935, NULL },
+ { NULL, 4360, "26"},
+ { "NumericString", 1610620935, NULL },
+ { NULL, 4360, "18"},
+ { "IA5String", 1610620935, NULL },
+ { NULL, 4360, "22"},
+ { "TeletexString", 1610620935, NULL },
+ { NULL, 4360, "20"},
+ { "PrintableString", 1610620935, NULL },
+ { NULL, 4360, "19"},
+ { "UniversalString", 1610620935, NULL },
+ { NULL, 4360, "28"},
+ { "BMPString", 1610620935, NULL },
+ { NULL, 4360, "30"},
+ { "UTF8String", 1610620935, NULL },
+ { NULL, 4360, "12"},
+ { "id-pkix", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "identified-organization", 1073741825, "3"},
+ { "dod", 1073741825, "6"},
+ { "internet", 1073741825, "1"},
+ { "security", 1073741825, "5"},
+ { "mechanisms", 1073741825, "5"},
+ { "pkix", 1, "7"},
+ { "id-pe", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "1"},
+ { "id-qt", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "2"},
+ { "id-kp", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "3"},
+ { "id-ad", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "48"},
+ { "id-qt-cps", 1879048204, NULL },
+ { NULL, 1073741825, "id-qt"},
+ { NULL, 1, "1"},
+ { "id-qt-unotice", 1879048204, NULL },
+ { NULL, 1073741825, "id-qt"},
+ { NULL, 1, "2"},
+ { "id-ad-ocsp", 1879048204, NULL },
+ { NULL, 1073741825, "id-ad"},
+ { NULL, 1, "1"},
+ { "id-ad-caIssuers", 1879048204, NULL },
+ { NULL, 1073741825, "id-ad"},
+ { NULL, 1, "2"},
+ { "Attribute", 1610612741, NULL },
+ { "type", 1073741826, "AttributeType"},
+ { "values", 536870927, NULL },
+ { NULL, 2, "AttributeValue"},
+ { "AttributeType", 1073741836, NULL },
+ { "AttributeValue", 1614807053, NULL },
+ { "type", 1, NULL },
+ { "AttributeTypeAndValue", 1610612741, NULL },
+ { "type", 1073741826, "AttributeType"},
+ { "value", 2, "AttributeValue"},
+ { "id-at", 1879048204, NULL },
+ { "joint-iso-ccitt", 1073741825, "2"},
+ { "ds", 1073741825, "5"},
+ { NULL, 1, "4"},
+ { "id-at-initials", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "43"},
+ { "X520initials", 1073741826, "DirectoryString"},
+ { "id-at-generationQualifier", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "44"},
+ { "X520generationQualifier", 1073741826, "DirectoryString"},
+ { "id-at-surname", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "4"},
+ { "X520surName", 1073741826, "DirectoryString"},
+ { "id-at-givenName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "42"},
+ { "X520givenName", 1073741826, "DirectoryString"},
+ { "id-at-name", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "41"},
+ { "X520name", 1073741826, "DirectoryString"},
+ { "id-at-commonName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "3"},
+ { "X520CommonName", 1073741826, "DirectoryString"},
+ { "id-at-localityName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "7"},
+ { "X520LocalityName", 1073741826, "DirectoryString"},
+ { "id-at-stateOrProvinceName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "8"},
+ { "X520StateOrProvinceName", 1073741826, "DirectoryString"},
+ { "id-at-organizationName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "10"},
+ { "X520OrganizationName", 1073741826, "DirectoryString"},
+ { "id-at-organizationalUnitName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "11"},
+ { "X520OrganizationalUnitName", 1073741826, "DirectoryString"},
+ { "id-at-title", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "12"},
+ { "X520Title", 1073741826, "DirectoryString"},
+ { "id-at-description", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "13"},
+ { "X520Description", 1073741826, "DirectoryString"},
+ { "id-at-dnQualifier", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "46"},
+ { "X520dnQualifier", 1073741826, "PrintableString"},
+ { "id-at-countryName", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "6"},
+ { "X520countryName", 1612709890, "PrintableString"},
+ { NULL, 1048586, "2"},
+ { "id-at-serialNumber", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "5"},
+ { "X520serialNumber", 1073741826, "PrintableString"},
+ { "id-at-telephoneNumber", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "20"},
+ { "X520telephoneNumber", 1073741826, "PrintableString"},
+ { "id-at-facsimileTelephoneNumber", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "23"},
+ { "X520facsimileTelephoneNumber", 1073741826, "PrintableString"},
+ { "id-at-pseudonym", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "65"},
+ { "X520pseudonym", 1073741826, "DirectoryString"},
+ { "id-at-name", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "41"},
+ { "X520name", 1073741826, "DirectoryString"},
+ { "id-at-streetAddress", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "9"},
+ { "X520streetAddress", 1073741826, "DirectoryString"},
+ { "id-at-postalAddress", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-at"},
+ { NULL, 1, "16"},
+ { "X520postalAddress", 1073741826, "PostalAddress"},
+ { "PostalAddress", 1610612747, NULL },
+ { NULL, 2, "DirectoryString"},
+ { "pkcs", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "rsadsi", 1073741825, "113549"},
+ { "pkcs", 1, "1"},
+ { "pkcs-9", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs"},
+ { NULL, 1, "9"},
+ { "emailAddress", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "1"},
+ { "Pkcs9email", 1612709890, "IA5String"},
+ { "ub-emailaddress-length", 524298, "1"},
+ { "Name", 1610612754, NULL },
+ { "rdnSequence", 2, "RDNSequence"},
+ { "RDNSequence", 1610612747, NULL },
+ { NULL, 2, "RelativeDistinguishedName"},
+ { "DistinguishedName", 1073741826, "RDNSequence"},
+ { "RelativeDistinguishedName", 1612709903, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "AttributeTypeAndValue"},
+ { "Certificate", 1610612741, NULL },
+ { "tbsCertificate", 1073741826, "TBSCertificate"},
+ { "signatureAlgorithm", 1073741826, "AlgorithmIdentifier"},
+ { "signature", 6, NULL },
+ { "TBSCertificate", 1610612741, NULL },
+ { "version", 1610653698, "Version"},
+ { NULL, 1073741833, "v1"},
+ { NULL, 2056, "0"},
+ { "serialNumber", 1073741826, "CertificateSerialNumber"},
+ { "signature", 1073741826, "AlgorithmIdentifier"},
+ { "issuer", 1073741826, "Name"},
+ { "validity", 1073741826, "Validity"},
+ { "subject", 1073741826, "Name"},
+ { "subjectPublicKeyInfo", 1073741826, "SubjectPublicKeyInfo"},
+ { "issuerUniqueID", 1610637314, "UniqueIdentifier"},
+ { NULL, 4104, "1"},
+ { "subjectUniqueID", 1610637314, "UniqueIdentifier"},
+ { NULL, 4104, "2"},
+ { "extensions", 536895490, "Extensions"},
+ { NULL, 2056, "3"},
+ { "Version", 1610874883, NULL },
+ { "v1", 1073741825, "0"},
+ { "v2", 1073741825, "1"},
+ { "v3", 1, "2"},
+ { "CertificateSerialNumber", 1073741827, NULL },
+ { "Validity", 1610612741, NULL },
+ { "notBefore", 1073741826, "Time"},
+ { "notAfter", 2, "Time"},
+ { "Time", 1610612754, NULL },
+ { "utcTime", 1090519057, NULL },
+ { "generalTime", 8388625, NULL },
+ { "UniqueIdentifier", 1073741830, NULL },
+ { "SubjectPublicKeyInfo", 1610612741, NULL },
+ { "algorithm", 1073741826, "AlgorithmIdentifier"},
+ { "subjectPublicKey", 6, NULL },
+ { "Extensions", 1612709899, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "Extension"},
+ { "Extension", 1610612741, NULL },
+ { "extnID", 1073741836, NULL },
+ { "critical", 1610645508, NULL },
+ { NULL, 131081, NULL },
+ { "extnValue", 7, NULL },
+ { "CertificateList", 1610612741, NULL },
+ { "tbsCertList", 1073741826, "TBSCertList"},
+ { "signatureAlgorithm", 1073741826, "AlgorithmIdentifier"},
+ { "signature", 6, NULL },
+ { "TBSCertList", 1610612741, NULL },
+ { "version", 1073758210, "Version"},
+ { "signature", 1073741826, "AlgorithmIdentifier"},
+ { "issuer", 1073741826, "Name"},
+ { "thisUpdate", 1073741826, "Time"},
+ { "nextUpdate", 1073758210, "Time"},
+ { "revokedCertificates", 1610629131, NULL },
+ { NULL, 536870917, NULL },
+ { "userCertificate", 1073741826, "CertificateSerialNumber"},
+ { "revocationDate", 1073741826, "Time"},
+ { "crlEntryExtensions", 16386, "Extensions"},
+ { "crlExtensions", 536895490, "Extensions"},
+ { NULL, 2056, "0"},
+ { "AlgorithmIdentifier", 1610612741, NULL },
+ { "algorithm", 1073741836, NULL },
+ { "parameters", 541081613, NULL },
+ { "algorithm", 1, NULL },
+ { "pkcs-1", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs"},
+ { NULL, 1, "1"},
+ { "rsaEncryption", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-1"},
+ { NULL, 1, "1"},
+ { "md2WithRSAEncryption", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-1"},
+ { NULL, 1, "2"},
+ { "md5WithRSAEncryption", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-1"},
+ { NULL, 1, "4"},
+ { "sha1WithRSAEncryption", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-1"},
+ { NULL, 1, "5"},
+ { "id-dsa-with-sha1", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "x9-57", 1073741825, "10040"},
+ { "x9algorithm", 1073741825, "4"},
+ { NULL, 1, "3"},
+ { "Dss-Sig-Value", 1610612741, NULL },
+ { "r", 1073741827, NULL },
+ { "s", 3, NULL },
+ { "dhpublicnumber", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "ansi-x942", 1073741825, "10046"},
+ { "number-type", 1073741825, "2"},
+ { NULL, 1, "1"},
+ { "DomainParameters", 1610612741, NULL },
+ { "p", 1073741827, NULL },
+ { "g", 1073741827, NULL },
+ { "q", 1073741827, NULL },
+ { "j", 1073758211, NULL },
+ { "validationParms", 16386, "ValidationParms"},
+ { "ValidationParms", 1610612741, NULL },
+ { "seed", 1073741830, NULL },
+ { "pgenCounter", 3, NULL },
+ { "id-dsa", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "x9-57", 1073741825, "10040"},
+ { "x9algorithm", 1073741825, "4"},
+ { NULL, 1, "1"},
+ { "Dss-Parms", 1610612741, NULL },
+ { "p", 1073741827, NULL },
+ { "q", 1073741827, NULL },
+ { "g", 3, NULL },
+ { "ORAddress", 1610612741, NULL },
+ { "built-in-standard-attributes", 1073741826, "BuiltInStandardAttributes"},
+ { "built-in-domain-defined-attributes", 1073758210, "BuiltInDomainDefinedAttributes"},
+ { "extension-attributes", 16386, "ExtensionAttributes"},
+ { "BuiltInStandardAttributes", 1610612741, NULL },
+ { "country-name", 1073758210, "CountryName"},
+ { "administration-domain-name", 1073758210, "AdministrationDomainName"},
+ { "network-address", 1610637314, "NetworkAddress"},
+ { NULL, 2056, "0"},
+ { "terminal-identifier", 1610637314, "TerminalIdentifier"},
+ { NULL, 2056, "1"},
+ { "private-domain-name", 1610637314, "PrivateDomainName"},
+ { NULL, 2056, "2"},
+ { "organization-name", 1610637314, "OrganizationName"},
+ { NULL, 2056, "3"},
+ { "numeric-user-identifier", 1610637314, "NumericUserIdentifier"},
+ { NULL, 2056, "4"},
+ { "personal-name", 1610637314, "PersonalName"},
+ { NULL, 2056, "5"},
+ { "organizational-unit-names", 536895490, "OrganizationalUnitNames"},
+ { NULL, 2056, "6"},
+ { "CountryName", 1610620946, NULL },
+ { NULL, 1073746952, "1"},
+ { "x121-dcc-code", 1612709890, "NumericString"},
+ { NULL, 1048586, "ub-country-name-numeric-length"},
+ { "iso-3166-alpha2-code", 538968066, "PrintableString"},
+ { NULL, 1048586, "ub-country-name-alpha-length"},
+ { "AdministrationDomainName", 1610620946, NULL },
+ { NULL, 1073744904, "2"},
+ { "numeric", 1612709890, "NumericString"},
+ { "ub-domain-name-length", 524298, "0"},
+ { "printable", 538968066, "PrintableString"},
+ { "ub-domain-name-length", 524298, "0"},
+ { "NetworkAddress", 1073741826, "X121Address"},
+ { "X121Address", 1612709890, "NumericString"},
+ { "ub-x121-address-length", 524298, "1"},
+ { "TerminalIdentifier", 1612709890, "PrintableString"},
+ { "ub-terminal-id-length", 524298, "1"},
+ { "PrivateDomainName", 1610612754, NULL },
+ { "numeric", 1612709890, "NumericString"},
+ { "ub-domain-name-length", 524298, "1"},
+ { "printable", 538968066, "PrintableString"},
+ { "ub-domain-name-length", 524298, "1"},
+ { "OrganizationName", 1612709890, "PrintableString"},
+ { "ub-organization-name-length", 524298, "1"},
+ { "NumericUserIdentifier", 1612709890, "NumericString"},
+ { "ub-numeric-user-id-length", 524298, "1"},
+ { "PersonalName", 1610612750, NULL },
+ { "surname", 1814044674, "PrintableString"},
+ { NULL, 1073745928, "0"},
+ { "ub-surname-length", 524298, "1"},
+ { "given-name", 1814061058, "PrintableString"},
+ { NULL, 1073745928, "1"},
+ { "ub-given-name-length", 524298, "1"},
+ { "initials", 1814061058, "PrintableString"},
+ { NULL, 1073745928, "2"},
+ { "ub-initials-length", 524298, "1"},
+ { "generation-qualifier", 740319234, "PrintableString"},
+ { NULL, 1073745928, "3"},
+ { "ub-generation-qualifier-length", 524298, "1"},
+ { "OrganizationalUnitNames", 1612709899, NULL },
+ { "ub-organizational-units", 1074266122, "1"},
+ { NULL, 2, "OrganizationalUnitName"},
+ { "OrganizationalUnitName", 1612709890, "PrintableString"},
+ { "ub-organizational-unit-name-length", 524298, "1"},
+ { "BuiltInDomainDefinedAttributes", 1612709899, NULL },
+ { "ub-domain-defined-attributes", 1074266122, "1"},
+ { NULL, 2, "BuiltInDomainDefinedAttribute"},
+ { "BuiltInDomainDefinedAttribute", 1610612741, NULL },
+ { "type", 1612709890, "PrintableString"},
+ { "ub-domain-defined-attribute-type-length", 524298, "1"},
+ { "value", 538968066, "PrintableString"},
+ { "ub-domain-defined-attribute-value-length", 524298, "1"},
+ { "ExtensionAttributes", 1612709903, NULL },
+ { "ub-extension-attributes", 1074266122, "1"},
+ { NULL, 2, "ExtensionAttribute"},
+ { "ExtensionAttribute", 1610612741, NULL },
+ { "extension-attribute-type", 1611145219, NULL },
+ { NULL, 1073743880, "0"},
+ { "0", 10, "ub-extension-attributes"},
+ { "extension-attribute-value", 541073421, NULL },
+ { NULL, 1073743880, "1"},
+ { "extension-attribute-type", 1, NULL },
+ { "common-name", 1342177283, "1"},
+ { "CommonName", 1612709890, "PrintableString"},
+ { "ub-common-name-length", 524298, "1"},
+ { "teletex-common-name", 1342177283, "2"},
+ { "TeletexCommonName", 1612709890, "TeletexString"},
+ { "ub-common-name-length", 524298, "1"},
+ { "teletex-organization-name", 1342177283, "3"},
+ { "TeletexOrganizationName", 1612709890, "TeletexString"},
+ { "ub-organization-name-length", 524298, "1"},
+ { "teletex-personal-name", 1342177283, "4"},
+ { "TeletexPersonalName", 1610612750, NULL },
+ { "surname", 1814044674, "TeletexString"},
+ { NULL, 1073743880, "0"},
+ { "ub-surname-length", 524298, "1"},
+ { "given-name", 1814061058, "TeletexString"},
+ { NULL, 1073743880, "1"},
+ { "ub-given-name-length", 524298, "1"},
+ { "initials", 1814061058, "TeletexString"},
+ { NULL, 1073743880, "2"},
+ { "ub-initials-length", 524298, "1"},
+ { "generation-qualifier", 740319234, "TeletexString"},
+ { NULL, 1073743880, "3"},
+ { "ub-generation-qualifier-length", 524298, "1"},
+ { "teletex-organizational-unit-names", 1342177283, "5"},
+ { "TeletexOrganizationalUnitNames", 1612709899, NULL },
+ { "ub-organizational-units", 1074266122, "1"},
+ { NULL, 2, "TeletexOrganizationalUnitName"},
+ { "TeletexOrganizationalUnitName", 1612709890, "TeletexString"},
+ { "ub-organizational-unit-name-length", 524298, "1"},
+ { "pds-name", 1342177283, "7"},
+ { "PDSName", 1612709890, "PrintableString"},
+ { "ub-pds-name-length", 524298, "1"},
+ { "physical-delivery-country-name", 1342177283, "8"},
+ { "PhysicalDeliveryCountryName", 1610612754, NULL },
+ { "x121-dcc-code", 1612709890, "NumericString"},
+ { NULL, 1048586, "ub-country-name-numeric-length"},
+ { "iso-3166-alpha2-code", 538968066, "PrintableString"},
+ { NULL, 1048586, "ub-country-name-alpha-length"},
+ { "postal-code", 1342177283, "9"},
+ { "PostalCode", 1610612754, NULL },
+ { "numeric-code", 1612709890, "NumericString"},
+ { "ub-postal-code-length", 524298, "1"},
+ { "printable-code", 538968066, "PrintableString"},
+ { "ub-postal-code-length", 524298, "1"},
+ { "physical-delivery-office-name", 1342177283, "10"},
+ { "PhysicalDeliveryOfficeName", 1073741826, "PDSParameter"},
+ { "physical-delivery-office-number", 1342177283, "11"},
+ { "PhysicalDeliveryOfficeNumber", 1073741826, "PDSParameter"},
+ { "extension-OR-address-components", 1342177283, "12"},
+ { "ExtensionORAddressComponents", 1073741826, "PDSParameter"},
+ { "physical-delivery-personal-name", 1342177283, "13"},
+ { "PhysicalDeliveryPersonalName", 1073741826, "PDSParameter"},
+ { "physical-delivery-organization-name", 1342177283, "14"},
+ { "PhysicalDeliveryOrganizationName", 1073741826, "PDSParameter"},
+ { "extension-physical-delivery-address-components", 1342177283, "15"},
+ { "ExtensionPhysicalDeliveryAddressComponents", 1073741826, "PDSParameter"},
+ { "unformatted-postal-address", 1342177283, "16"},
+ { "UnformattedPostalAddress", 1610612750, NULL },
+ { "printable-address", 1814052875, NULL },
+ { "ub-pds-physical-address-lines", 1074266122, "1"},
+ { NULL, 538968066, "PrintableString"},
+ { "ub-pds-parameter-length", 524298, "1"},
+ { "teletex-string", 740311042, "TeletexString"},
+ { "ub-unformatted-address-length", 524298, "1"},
+ { "street-address", 1342177283, "17"},
+ { "StreetAddress", 1073741826, "PDSParameter"},
+ { "post-office-box-address", 1342177283, "18"},
+ { "PostOfficeBoxAddress", 1073741826, "PDSParameter"},
+ { "poste-restante-address", 1342177283, "19"},
+ { "PosteRestanteAddress", 1073741826, "PDSParameter"},
+ { "unique-postal-name", 1342177283, "20"},
+ { "UniquePostalName", 1073741826, "PDSParameter"},
+ { "local-postal-attributes", 1342177283, "21"},
+ { "LocalPostalAttributes", 1073741826, "PDSParameter"},
+ { "PDSParameter", 1610612750, NULL },
+ { "printable-string", 1814052866, "PrintableString"},
+ { "ub-pds-parameter-length", 524298, "1"},
+ { "teletex-string", 740311042, "TeletexString"},
+ { "ub-pds-parameter-length", 524298, "1"},
+ { "extended-network-address", 1342177283, "22"},
+ { "ExtendedNetworkAddress", 1610612754, NULL },
+ { "e163-4-address", 1610612741, NULL },
+ { "number", 1612718082, "NumericString"},
+ { NULL, 1073743880, "0"},
+ { "ub-e163-4-number-length", 524298, "1"},
+ { "sub-address", 538992642, "NumericString"},
+ { NULL, 1073743880, "1"},
+ { "ub-e163-4-sub-address-length", 524298, "1"},
+ { "psap-address", 536879106, "PresentationAddress"},
+ { NULL, 2056, "0"},
+ { "PresentationAddress", 1610612741, NULL },
+ { "pSelector", 1610637319, NULL },
+ { NULL, 2056, "0"},
+ { "sSelector", 1610637319, NULL },
+ { NULL, 2056, "1"},
+ { "tSelector", 1610637319, NULL },
+ { NULL, 2056, "2"},
+ { "nAddresses", 538976271, NULL },
+ { NULL, 1073743880, "3"},
+ { "MAX", 1074266122, "1"},
+ { NULL, 7, NULL },
+ { "terminal-type", 1342177283, "23"},
+ { "TerminalType", 1610874883, NULL },
+ { "telex", 1073741825, "3"},
+ { "teletex", 1073741825, "4"},
+ { "g3-facsimile", 1073741825, "5"},
+ { "g4-facsimile", 1073741825, "6"},
+ { "ia5-terminal", 1073741825, "7"},
+ { "videotex", 1, "8"},
+ { "teletex-domain-defined-attributes", 1342177283, "6"},
+ { "TeletexDomainDefinedAttributes", 1612709899, NULL },
+ { "ub-domain-defined-attributes", 1074266122, "1"},
+ { NULL, 2, "TeletexDomainDefinedAttribute"},
+ { "TeletexDomainDefinedAttribute", 1610612741, NULL },
+ { "type", 1612709890, "TeletexString"},
+ { "ub-domain-defined-attribute-type-length", 524298, "1"},
+ { "value", 538968066, "TeletexString"},
+ { "ub-domain-defined-attribute-value-length", 524298, "1"},
+ { "ub-name", 1342177283, "32768"},
+ { "ub-common-name", 1342177283, "64"},
+ { "ub-locality-name", 1342177283, "128"},
+ { "ub-state-name", 1342177283, "128"},
+ { "ub-organization-name", 1342177283, "64"},
+ { "ub-organizational-unit-name", 1342177283, "64"},
+ { "ub-title", 1342177283, "64"},
+ { "ub-match", 1342177283, "128"},
+ { "ub-emailaddress-length", 1342177283, "128"},
+ { "ub-common-name-length", 1342177283, "64"},
+ { "ub-country-name-alpha-length", 1342177283, "2"},
+ { "ub-country-name-numeric-length", 1342177283, "3"},
+ { "ub-domain-defined-attributes", 1342177283, "4"},
+ { "ub-domain-defined-attribute-type-length", 1342177283, "8"},
+ { "ub-domain-defined-attribute-value-length", 1342177283, "128"},
+ { "ub-domain-name-length", 1342177283, "16"},
+ { "ub-extension-attributes", 1342177283, "256"},
+ { "ub-e163-4-number-length", 1342177283, "15"},
+ { "ub-e163-4-sub-address-length", 1342177283, "40"},
+ { "ub-generation-qualifier-length", 1342177283, "3"},
+ { "ub-given-name-length", 1342177283, "16"},
+ { "ub-initials-length", 1342177283, "5"},
+ { "ub-integer-options", 1342177283, "256"},
+ { "ub-numeric-user-id-length", 1342177283, "32"},
+ { "ub-organization-name-length", 1342177283, "64"},
+ { "ub-organizational-unit-name-length", 1342177283, "32"},
+ { "ub-organizational-units", 1342177283, "4"},
+ { "ub-pds-name-length", 1342177283, "16"},
+ { "ub-pds-parameter-length", 1342177283, "30"},
+ { "ub-pds-physical-address-lines", 1342177283, "6"},
+ { "ub-postal-code-length", 1342177283, "16"},
+ { "ub-surname-length", 1342177283, "40"},
+ { "ub-terminal-id-length", 1342177283, "24"},
+ { "ub-unformatted-address-length", 1342177283, "180"},
+ { "ub-x121-address-length", 1342177283, "16"},
+ { "pkcs-7-ContentInfo", 1610612741, NULL },
+ { "contentType", 1073741826, "pkcs-7-ContentType"},
+ { "content", 541073421, NULL },
+ { NULL, 1073743880, "0"},
+ { "contentType", 1, NULL },
+ { "pkcs-7-DigestInfo", 1610612741, NULL },
+ { "digestAlgorithm", 1073741826, "pkcs-7-DigestAlgorithmIdentifier"},
+ { "digest", 2, "pkcs-7-Digest"},
+ { "pkcs-7-Digest", 1073741831, NULL },
+ { "pkcs-7-ContentType", 1073741836, NULL },
+ { "pkcs-7-SignedData", 1610612741, NULL },
+ { "version", 1073741826, "pkcs-7-CMSVersion"},
+ { "digestAlgorithms", 1073741826, "pkcs-7-DigestAlgorithmIdentifiers"},
+ { "encapContentInfo", 1073741826, "pkcs-7-EncapsulatedContentInfo"},
+ { "certificates", 1610637314, "pkcs-7-CertificateSet"},
+ { NULL, 4104, "0"},
+ { "crls", 1610637314, "pkcs-7-CertificateRevocationLists"},
+ { NULL, 4104, "1"},
+ { "signerInfos", 2, "pkcs-7-SignerInfos"},
+ { "pkcs-7-CMSVersion", 1610874883, NULL },
+ { "v0", 1073741825, "0"},
+ { "v1", 1073741825, "1"},
+ { "v2", 1073741825, "2"},
+ { "v3", 1073741825, "3"},
+ { "v4", 1, "4"},
+ { "pkcs-7-DigestAlgorithmIdentifiers", 1610612751, NULL },
+ { NULL, 2, "pkcs-7-DigestAlgorithmIdentifier"},
+ { "pkcs-7-DigestAlgorithmIdentifier", 1073741826, "AlgorithmIdentifier"},
+ { "pkcs-7-EncapsulatedContentInfo", 1610612741, NULL },
+ { "eContentType", 1073741826, "pkcs-7-ContentType"},
+ { "eContent", 536895495, NULL },
+ { NULL, 2056, "0"},
+ { "pkcs-7-CertificateRevocationLists", 1610612751, NULL },
+ { NULL, 13, NULL },
+ { "pkcs-7-CertificateChoices", 1610612754, NULL },
+ { "certificate", 13, NULL },
+ { "pkcs-7-CertificateSet", 1610612751, NULL },
+ { NULL, 2, "pkcs-7-CertificateChoices"},
+ { "pkcs-7-SignerInfos", 1610612751, NULL },
+ { NULL, 13, NULL },
+ { "pkcs-10-CertificationRequestInfo", 1610612741, NULL },
+ { "version", 1610874883, NULL },
+ { "v1", 1, "0"},
+ { "subject", 1073741826, "Name"},
+ { "subjectPKInfo", 1073741826, "SubjectPublicKeyInfo"},
+ { "attributes", 536879106, "Attributes"},
+ { NULL, 4104, "0"},
+ { "Attributes", 1610612751, NULL },
+ { NULL, 2, "Attribute"},
+ { "pkcs-10-CertificationRequest", 1610612741, NULL },
+ { "certificationRequestInfo", 1073741826, "pkcs-10-CertificationRequestInfo"},
+ { "signatureAlgorithm", 1073741826, "AlgorithmIdentifier"},
+ { "signature", 6, NULL },
+ { "pkcs-9-ub-challengePassword", 1342177283, "255"},
+ { "pkcs-9-certTypes", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "22"},
+ { "pkcs-9-crlTypes", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "23"},
+ { "pkcs-9-at-challengePassword", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "7"},
+ { "pkcs-9-challengePassword", 1610612754, NULL },
+ { "printableString", 1612709890, "PrintableString"},
+ { "pkcs-9-ub-challengePassword", 524298, "1"},
+ { "utf8String", 538968066, "UTF8String"},
+ { "pkcs-9-ub-challengePassword", 524298, "1"},
+ { "pkcs-9-at-localKeyId", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "21"},
+ { "pkcs-9-localKeyId", 1073741831, NULL },
+ { "pkcs-9-at-friendlyName", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-9"},
+ { NULL, 1, "20"},
+ { "pkcs-9-friendlyName", 1612709890, "BMPString"},
+ { "255", 524298, "1"},
+ { "pkcs-8-PrivateKeyInfo", 1610612741, NULL },
+ { "version", 1073741826, "pkcs-8-Version"},
+ { "privateKeyAlgorithm", 1073741826, "AlgorithmIdentifier"},
+ { "privateKey", 1073741826, "pkcs-8-PrivateKey"},
+ { "attributes", 536895490, "Attributes"},
+ { NULL, 4104, "0"},
+ { "pkcs-8-Version", 1610874883, NULL },
+ { "v1", 1, "0"},
+ { "pkcs-8-PrivateKey", 1073741831, NULL },
+ { "pkcs-8-Attributes", 1610612751, NULL },
+ { NULL, 2, "Attribute"},
+ { "pkcs-8-EncryptedPrivateKeyInfo", 1610612741, NULL },
+ { "encryptionAlgorithm", 1073741826, "AlgorithmIdentifier"},
+ { "encryptedData", 2, "pkcs-8-EncryptedData"},
+ { "pkcs-8-EncryptedData", 1073741831, NULL },
+ { "pkcs-5", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs"},
+ { NULL, 1, "5"},
+ { "pkcs-5-encryptionAlgorithm", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "rsadsi", 1073741825, "113549"},
+ { NULL, 1, "3"},
+ { "pkcs-5-des-EDE3-CBC", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-5-encryptionAlgorithm"},
+ { NULL, 1, "7"},
+ { "pkcs-5-des-EDE3-CBC-params", 1612709895, NULL },
+ { NULL, 1048586, "8"},
+ { "pkcs-5-id-PBES2", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-5"},
+ { NULL, 1, "13"},
+ { "pkcs-5-PBES2-params", 1610612741, NULL },
+ { "keyDerivationFunc", 1073741826, "AlgorithmIdentifier"},
+ { "encryptionScheme", 2, "AlgorithmIdentifier"},
+ { "pkcs-5-id-PBKDF2", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-5"},
+ { NULL, 1, "12"},
+ { "pkcs-5-PBKDF2-params", 1610612741, NULL },
+ { "salt", 1610612754, NULL },
+ { "specified", 1073741831, NULL },
+ { "otherSource", 2, "AlgorithmIdentifier"},
+ { "iterationCount", 1611137027, NULL },
+ { "1", 10, "MAX"},
+ { "keyLength", 1611153411, NULL },
+ { "1", 10, "MAX"},
+ { "prf", 16386, "AlgorithmIdentifier"},
+ { "pkcs-12", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs"},
+ { NULL, 1, "12"},
+ { "pkcs-12-PFX", 1610612741, NULL },
+ { "version", 1610874883, NULL },
+ { "v3", 1, "3"},
+ { "authSafe", 1073741826, "pkcs-7-ContentInfo"},
+ { "macData", 16386, "pkcs-12-MacData"},
+ { "pkcs-12-PbeParams", 1610612741, NULL },
+ { "salt", 1073741831, NULL },
+ { "iterations", 3, NULL },
+ { "pkcs-12-MacData", 1610612741, NULL },
+ { "mac", 1073741826, "pkcs-7-DigestInfo"},
+ { "macSalt", 1073741831, NULL },
+ { "iterations", 536903683, NULL },
+ { NULL, 9, "1"},
+ { "pkcs-12-AuthenticatedSafe", 1610612747, NULL },
+ { NULL, 2, "pkcs-7-ContentInfo"},
+ { "pkcs-12-SafeContents", 1610612747, NULL },
+ { NULL, 2, "pkcs-12-SafeBag"},
+ { "pkcs-12-SafeBag", 1610612741, NULL },
+ { "bagId", 1073741836, NULL },
+ { "bagValue", 1614815245, NULL },
+ { NULL, 1073743880, "0"},
+ { "badId", 1, NULL },
+ { "bagAttributes", 536887311, NULL },
+ { NULL, 2, "pkcs-12-PKCS12Attribute"},
+ { "pkcs-12-bagtypes", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-12"},
+ { NULL, 1073741825, "10"},
+ { NULL, 1, "1"},
+ { "pkcs-12-keyBag", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-12-bagtypes"},
+ { NULL, 1, "1"},
+ { "pkcs-12-pkcs8ShroudedKeyBag", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-12-bagtypes"},
+ { NULL, 1, "2"},
+ { "pkcs-12-certBag", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-12-bagtypes"},
+ { NULL, 1, "3"},
+ { "pkcs-12-crlBag", 1879048204, NULL },
+ { NULL, 1073741825, "pkcs-12-bagtypes"},
+ { NULL, 1, "4"},
+ { "pkcs-12-KeyBag", 1073741826, "pkcs-8-PrivateKeyInfo"},
+ { "pkcs-12-PKCS8ShroudedKeyBag", 1073741826, "pkcs-8-EncryptedPrivateKeyInfo"},
+ { "pkcs-12-CertBag", 1610612741, NULL },
+ { "certId", 1073741836, NULL },
+ { "certValue", 541073421, NULL },
+ { NULL, 1073743880, "0"},
+ { "certId", 1, NULL },
+ { "pkcs-12-CRLBag", 1610612741, NULL },
+ { "crlId", 1073741836, NULL },
+ { "crlValue", 541073421, NULL },
+ { NULL, 1073743880, "0"},
+ { "crlId", 1, NULL },
+ { "pkcs-12-PKCS12Attribute", 1073741826, "Attribute"},
+ { "pkcs-7-data", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "rsadsi", 1073741825, "113549"},
+ { "pkcs", 1073741825, "1"},
+ { "pkcs7", 1073741825, "7"},
+ { NULL, 1, "1"},
+ { "pkcs-7-encryptedData", 1879048204, NULL },
+ { "iso", 1073741825, "1"},
+ { "member-body", 1073741825, "2"},
+ { "us", 1073741825, "840"},
+ { "rsadsi", 1073741825, "113549"},
+ { "pkcs", 1073741825, "1"},
+ { "pkcs7", 1073741825, "7"},
+ { NULL, 1, "6"},
+ { "pkcs-7-Data", 1073741831, NULL },
+ { "pkcs-7-EncryptedData", 1610612741, NULL },
+ { "version", 1073741826, "pkcs-7-CMSVersion"},
+ { "encryptedContentInfo", 1073741826, "pkcs-7-EncryptedContentInfo"},
+ { "unprotectedAttrs", 536895490, "pkcs-7-UnprotectedAttributes"},
+ { NULL, 4104, "1"},
+ { "pkcs-7-EncryptedContentInfo", 1610612741, NULL },
+ { "contentType", 1073741826, "pkcs-7-ContentType"},
+ { "contentEncryptionAlgorithm", 1073741826, "pkcs-7-ContentEncryptionAlgorithmIdentifier"},
+ { "encryptedContent", 536895490, "pkcs-7-EncryptedContent"},
+ { NULL, 4104, "0"},
+ { "pkcs-7-ContentEncryptionAlgorithmIdentifier", 1073741826, "AlgorithmIdentifier"},
+ { "pkcs-7-EncryptedContent", 1073741831, NULL },
+ { "pkcs-7-UnprotectedAttributes", 1612709903, NULL },
+ { "MAX", 1074266122, "1"},
+ { NULL, 2, "Attribute"},
+ { "id-at-ldap-DC", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "0"},
+ { NULL, 1073741825, "9"},
+ { NULL, 1073741825, "2342"},
+ { NULL, 1073741825, "19200300"},
+ { NULL, 1073741825, "100"},
+ { NULL, 1073741825, "1"},
+ { NULL, 1, "25"},
+ { "ldap-DC", 1073741826, "IA5String"},
+ { "id-at-ldap-UID", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "0"},
+ { NULL, 1073741825, "9"},
+ { NULL, 1073741825, "2342"},
+ { NULL, 1073741825, "19200300"},
+ { NULL, 1073741825, "100"},
+ { NULL, 1073741825, "1"},
+ { NULL, 1, "1"},
+ { "ldap-UID", 1073741826, "DirectoryString"},
+ { "id-pda", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "9"},
+ { "id-pda-dateOfBirth", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-pda"},
+ { NULL, 1, "1"},
+ { "DateOfBirth", 1082130449, NULL },
+ { "id-pda-placeOfBirth", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-pda"},
+ { NULL, 1, "2"},
+ { "PlaceOfBirth", 1073741826, "DirectoryString"},
+ { "id-pda-gender", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-pda"},
+ { NULL, 1, "3"},
+ { "Gender", 1612709890, "PrintableString"},
+ { NULL, 1048586, "1"},
+ { "id-pda-countryOfCitizenship", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-pda"},
+ { NULL, 1, "4"},
+ { "CountryOfCitizenship", 1612709890, "PrintableString"},
+ { NULL, 1048586, "2"},
+ { "id-pda-countryOfResidence", 1880096780, "AttributeType"},
+ { NULL, 1073741825, "id-pda"},
+ { NULL, 1, "5"},
+ { "CountryOfResidence", 1612709890, "PrintableString"},
+ { NULL, 1048586, "2"},
+ { "id-pe-proxyCertInfo", 1879048204, NULL },
+ { NULL, 1073741825, "id-pe"},
+ { NULL, 1, "14"},
+ { "id-ppl-inheritAll", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1073741825, "21"},
+ { NULL, 1, "1"},
+ { "id-ppl-independent", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1073741825, "21"},
+ { NULL, 1, "2"},
+ { "ProxyCertInfo", 1610612741, NULL },
+ { "pCPathLenConstraint", 1611153411, NULL },
+ { "0", 10, "MAX"},
+ { "proxyPolicy", 2, "ProxyPolicy"},
+ { "ProxyPolicy", 1610612741, NULL },
+ { "policyLanguage", 1073741836, NULL },
+ { "policy", 16391, NULL },
+ { "id-on", 1879048204, NULL },
+ { NULL, 1073741825, "id-pkix"},
+ { NULL, 1, "8"},
+ { "id-on-xmppAddr", 1879048204, NULL },
+ { NULL, 1073741825, "id-on"},
+ { NULL, 1, "5"},
+ { "XmppAddr", 2, "UTF8String"},
+ { NULL, 0, NULL }
};
diff --git a/lib/random.c b/lib/random.c
new file mode 100644
index 0000000000..25353cabac
--- /dev/null
+++ b/lib/random.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2008 Free Software Foundation
+ *
+ * Author: Nikos Mavrogiannopoulos
+ *
+ * This file is part of GNUTLS.
+ *
+ * The GNUTLS library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA
+ *
+ */
+
+/* This file handles all the internal functions that cope with random data.
+ */
+
+#include <gnutls_int.h>
+#include <gnutls_errors.h>
+#include <random.h>
+
+static gnutls_crypto_rnd_st * cc = NULL;
+static void * rnd_ctx;
+
+int
+_gnutls_rnd_init ()
+{
+ int result;
+
+ /* check if a digest has been registered
+ */
+ cc = _gnutls_get_crypto_rnd();
+ if (cc != NULL) {
+ if (cc->init(& rnd_ctx) < 0) {
+ gnutls_assert();
+ return GNUTLS_E_RANDOM_FAILED;
+ }
+ } else {
+ char c;
+ gc_pseudo_random (&c, 1);
+ }
+
+ return 0;
+}
+
+void
+_gnutls_rnd_deinit ()
+{
+ if (cc != NULL) {
+ cc->deinit( rnd_ctx);
+ }
+
+ return;
+}
+
+int
+_gnutls_rnd (int level, void *data, int len)
+{
+int ret = GC_OK;
+
+ if (len > 0) {
+ if (cc != NULL) {
+ return cc->rnd( rnd_ctx, level, data, len);
+ }
+
+ if (level == RND_NONCE)
+ ret = gc_nonce (data, len);
+ else
+ ret = gc_pseudo_random( data, len);
+
+ }
+
+ if (ret == GC_OK) return 0;
+ else return GNUTLS_E_RANDOM_FAILED;
+}
+
diff --git a/lib/random.h b/lib/random.h
new file mode 100644
index 0000000000..5178b92712
--- /dev/null
+++ b/lib/random.h
@@ -0,0 +1,14 @@
+#ifndef RANDOM_H
+# define RANDOM_H
+
+#include <gnutls/crypto.h>
+
+#define RND_RANDOM GNUTLS_RND_RANDOM
+#define RND_NONCE GNUTLS_RND_NONCE
+#define RND_KEY GNUTLS_RND_KEY
+
+int _gnutls_rnd (int level, void *data, int len);
+void _gnutls_rnd_deinit (void);
+int _gnutls_rnd_init (void);
+
+#endif
diff --git a/lib/x509/crl.c b/lib/x509/crl.c
index 4beea257ad..5f130c1ec0 100644
--- a/lib/x509/crl.c
+++ b/lib/x509/crl.c
@@ -669,7 +669,7 @@ _gnutls_x509_crl_cpy (gnutls_x509_crl_t dest, gnutls_x509_crl_t src)
return ret;
}
- der = gnutls_alloca (der_size);
+ der = gnutls_malloc (der_size);
if (der == NULL)
{
gnutls_assert ();
@@ -680,7 +680,7 @@ _gnutls_x509_crl_cpy (gnutls_x509_crl_t dest, gnutls_x509_crl_t src)
if (ret < 0)
{
gnutls_assert ();
- gnutls_afree (der);
+ gnutls_free (der);
return ret;
}
@@ -688,7 +688,7 @@ _gnutls_x509_crl_cpy (gnutls_x509_crl_t dest, gnutls_x509_crl_t src)
tmp.size = der_size;
ret = gnutls_x509_crl_import (dest, &tmp, GNUTLS_X509_FMT_DER);
- gnutls_afree (der);
+ gnutls_free (der);
if (ret < 0)
{
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index b06489959f..9201709ca4 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -717,22 +717,26 @@ gnutls_x509_crq_set_challenge_password (gnutls_x509_crq_t crq,
}
/**
- * gnutls_x509_crq_sign2 - This function will sign a Certificate request with a key
- * @crq: should contain a gnutls_x509_crq_t structure
- * @key: holds a private key
- * @dig: The message digest to use. GNUTLS_DIG_SHA1 is the safe choice unless you know what you're doing.
- * @flags: must be 0
- *
- * This function will sign the certificate request with a private key.
- * This must be the same key as the one used in gnutls_x509_crt_set_key() since a
- * certificate request is self signed.
- *
- * This must be the last step in a certificate request generation since all
- * the previously set parameters are now signed.
- *
- * Returns 0 on success.
- *
- **/
+ * gnutls_x509_crq_sign2 - Sign a Certificate request with a key
+ * @crq: should contain a #gnutls_x509_crq_t structure
+ * @key: holds a private key
+ * @dig: The message digest to use, %GNUTLS_DIG_SHA1 is the safe choice unless you know what you're doing.
+ * @flags: must be 0
+ *
+ * This function will sign the certificate request with a private key.
+ * This must be the same key as the one used in
+ * gnutls_x509_crt_set_key() since a certificate request is self
+ * signed.
+ *
+ * This must be the last step in a certificate request generation
+ * since all the previously set parameters are now signed.
+ *
+ * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
+ * %GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all
+ * information in the certificate request (e.g., the version using
+ * gnutls_x509_crq_set_version()).
+ *
+ **/
int
gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key,
gnutls_digest_algorithm_t dig, unsigned int flags)
@@ -746,6 +750,17 @@ gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key,
return GNUTLS_E_INVALID_REQUEST;
}
+ /* Make sure version field is set. */
+ if (gnutls_x509_crq_get_version (crq) == GNUTLS_E_ASN1_VALUE_NOT_FOUND)
+ {
+ result = gnutls_x509_crq_set_version (crq, 1);
+ if (result < 0)
+ {
+ gnutls_assert ();
+ return result;
+ }
+ }
+
/* Step 1. Self sign the request.
*/
result =
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index 74334aa1e8..247ea543c1 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -588,7 +588,7 @@ _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, unsigned int *ret)
return _gnutls_asn2err (result);
}
- tmpstr = gnutls_alloca (len);
+ tmpstr = gnutls_malloc (len);
if (tmpstr == NULL)
{
gnutls_assert ();
@@ -600,7 +600,7 @@ _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, unsigned int *ret)
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return _gnutls_asn2err (result);
}
@@ -615,11 +615,11 @@ _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, unsigned int *ret)
else
{
gnutls_assert ();
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return GNUTLS_E_INTERNAL_ERROR;
}
- gnutls_afree (tmpstr);
+ gnutls_free (tmpstr);
return 0;
}
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 42e709f947..27a0fdae9e 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -560,7 +560,7 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned)
if (gmtime_r (&tim, &t) == NULL)
addf (str, "error: gmtime_r (%d)\n", t);
- else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0)
+ else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0)
addf (str, "error: strftime (%d)\n", t);
else
addf (str, _("\t\tNot Before: %s\n"), s);
@@ -574,7 +574,7 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned)
if (gmtime_r (&tim, &t) == NULL)
addf (str, "error: gmtime_r (%d)\n", t);
- else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0)
+ else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0)
addf (str, "error: strftime (%d)\n", t);
else
addf (str, _("\t\tNot After: %s\n"), s);
@@ -1207,7 +1207,7 @@ print_crl (gnutls_string *str,
if (gmtime_r (&tim, &t) == NULL)
addf (str, "error: gmtime_r (%d)\n", t);
- else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0)
+ else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0)
addf (str, "error: strftime (%d)\n", t);
else
addf (str, _("\t\tIssued: %s\n"), s);
@@ -1223,7 +1223,7 @@ print_crl (gnutls_string *str,
addf (str, "\t\tNo next update time.\n");
else if (gmtime_r (&tim, &t) == NULL)
addf (str, "error: gmtime_r (%d)\n", t);
- else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0)
+ else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0)
addf (str, "error: strftime (%d)\n", t);
else
addf (str, _("\t\tNext at: %s\n"), s);
@@ -1263,7 +1263,7 @@ print_crl (gnutls_string *str,
if (gmtime_r (&tim, &t) == NULL)
addf (str, "error: gmtime_r (%d)\n", t);
- else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0)
+ else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0)
addf (str, "error: strftime (%d)\n", t);
else
addf (str, _("\t\tRevoked at: %s\n"), s);
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c
index e5e443c09f..15e13c36fb 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -37,7 +37,7 @@
#include <common.h>
#include <x509_b64.h>
#include "x509_int.h"
-#include <gc.h>
+#include <random.h>
/* Decodes the PKCS #12 auth_safe, and returns the allocated raw data,
@@ -869,10 +869,11 @@ gnutls_pkcs12_generate_mac (gnutls_pkcs12_t pkcs12, const char *pass)
/* Generate the salt.
*/
- if (gc_nonce (salt, sizeof (salt)) != GC_OK)
+ result = _gnutls_rnd (RND_NONCE, salt, sizeof (salt));
+ if (result < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return result;
}
/* Write the salt into the structure.
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index 7304a7569f..0f5989d47a 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -37,6 +37,7 @@
#include <gnutls_algorithms.h>
#include <gnutls_num.h>
#include <gc.h>
+#include <random.h>
#define PBES2_OID "1.2.840.113549.1.5.13"
@@ -1476,7 +1477,7 @@ decrypt_data (schema_id schema, ASN1_TYPE pkcs8_asn,
else
key_size = kdf_params->key_size;
- key = gnutls_alloca (key_size);
+ key = gnutls_malloc (key_size);
if (key == NULL)
{
gnutls_assert ();
@@ -1523,7 +1524,7 @@ decrypt_data (schema_id schema, ASN1_TYPE pkcs8_asn,
d_iv.size = enc_params->iv_size;
result = _gnutls_cipher_init (&ch, enc_params->cipher, &dkey, &d_iv);
- gnutls_afree (key);
+ gnutls_free (key);
key = NULL;
if (result < 0)
@@ -1554,7 +1555,7 @@ decrypt_data (schema_id schema, ASN1_TYPE pkcs8_asn,
error:
gnutls_free (data);
- gnutls_afree (key);
+ gnutls_free (key);
if (ch_init != 0)
_gnutls_cipher_deinit (&ch);
return result;
@@ -1752,10 +1753,11 @@ generate_key (schema_id schema,
else if (schema == PKCS12_RC2_40_SHA1)
enc_params->cipher = GNUTLS_CIPHER_RC2_40_CBC;
- if (gc_pseudo_random (rnd, 2) != GC_OK)
+ ret = _gnutls_rnd( RND_RANDOM, rnd, 2);
+ if (ret < 0)
{
gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
+ return ret;
}
/* generate salt */
@@ -1766,7 +1768,8 @@ generate_key (schema_id schema,
else
kdf_params->salt_size = 8;
- if (gc_pseudo_random (kdf_params->salt, kdf_params->salt_size) != GC_OK)
+ ret = _gnutls_rnd ( RND_RANDOM, kdf_params->salt, kdf_params->salt_size);
+ if ( ret < 0)
{
gnutls_assert ();
return GNUTLS_E_RANDOM_FAILED;
@@ -1801,12 +1804,15 @@ generate_key (schema_id schema,
return GNUTLS_E_ENCRYPTION_FAILED;
}
- if (enc_params->iv_size &&
- gc_nonce (enc_params->iv, enc_params->iv_size) != GC_OK)
- {
- gnutls_assert ();
- return GNUTLS_E_RANDOM_FAILED;
- }
+ if (enc_params->iv_size)
+ {
+ ret = _gnutls_rnd (RND_NONCE, enc_params->iv, enc_params->iv_size);
+ if (ret < 0)
+ {
+ gnutls_assert ();
+ return ret;
+ }
+ }
}
else
{ /* PKCS12 schemas */
diff --git a/lib/x509/sign.c b/lib/x509/sign.c
index ff87573614..0337ffdb2b 100644
--- a/lib/x509/sign.c
+++ b/lib/x509/sign.c
@@ -268,7 +268,7 @@ _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name,
buf_size = 0;
asn1_der_coding (cert, tbs_name, NULL, &buf_size, NULL);
- buf = gnutls_alloca (buf_size);
+ buf = gnutls_malloc (buf_size);
if (buf == NULL)
{
gnutls_assert ();
@@ -280,7 +280,7 @@ _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name,
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
- gnutls_afree (buf);
+ gnutls_free (buf);
return _gnutls_asn2err (result);
}
@@ -288,7 +288,7 @@ _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name,
tbs.size = buf_size;
result = _gnutls_x509_sign (&tbs, hash, signer, signature);
- gnutls_afree (buf);
+ gnutls_free (buf);
return result;
}
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index 6b79560d27..572dd667c0 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -92,7 +92,7 @@ _gnutls_x509_crt_cpy (gnutls_x509_crt_t dest, gnutls_x509_crt_t src)
return ret;
}
- der = gnutls_alloca (der_size);
+ der = gnutls_malloc (der_size);
if (der == NULL)
{
gnutls_assert ();
@@ -103,7 +103,7 @@ _gnutls_x509_crt_cpy (gnutls_x509_crt_t dest, gnutls_x509_crt_t src)
if (ret < 0)
{
gnutls_assert ();
- gnutls_afree (der);
+ gnutls_free (der);
return ret;
}
@@ -111,7 +111,7 @@ _gnutls_x509_crt_cpy (gnutls_x509_crt_t dest, gnutls_x509_crt_t src)
tmp.size = der_size;
ret = gnutls_x509_crt_import (dest, &tmp, GNUTLS_X509_FMT_DER);
- gnutls_afree (der);
+ gnutls_free (der);
if (ret < 0)
{
@@ -1962,7 +1962,7 @@ gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert,
cert_buf_size = 0;
asn1_der_coding (cert->cert, "", NULL, &cert_buf_size, NULL);
- cert_buf = gnutls_alloca (cert_buf_size);
+ cert_buf = gnutls_malloc (cert_buf_size);
if (cert_buf == NULL)
{
gnutls_assert ();
@@ -1974,7 +1974,7 @@ gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert,
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
- gnutls_afree (cert_buf);
+ gnutls_free (cert_buf);
return _gnutls_asn2err (result);
}
@@ -1982,7 +1982,7 @@ gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert,
tmp.size = cert_buf_size;
result = gnutls_fingerprint (algo, &tmp, buf, sizeof_buf);
- gnutls_afree (cert_buf);
+ gnutls_free (cert_buf);
return result;
}
@@ -2157,7 +2157,7 @@ gnutls_x509_crt_get_key_id (gnutls_x509_crt_t crt, unsigned int flags,
return _gnutls_asn2err (result);
}
- pubkey.data = gnutls_alloca (pubkey.size);
+ pubkey.data = gnutls_malloc (pubkey.size);
if (pubkey.data == NULL)
{
gnutls_assert ();
@@ -2169,14 +2169,14 @@ gnutls_x509_crt_get_key_id (gnutls_x509_crt_t crt, unsigned int flags,
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
- gnutls_afree (pubkey.data);
+ gnutls_free (pubkey.data);
return _gnutls_asn2err (result);
}
result = gnutls_fingerprint (GNUTLS_DIG_SHA1, &pubkey,
output_data, output_data_size);
- gnutls_afree (pubkey.data);
+ gnutls_free (pubkey.data);
return result;
}
diff --git a/build-aux/maint.mk b/maint.mk
index 662b37174f..662b37174f 100644
--- a/build-aux/maint.mk
+++ b/maint.mk
diff --git a/po/Makevars b/po/Makevars
index 174a350842..6487d53ac7 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -39,8 +39,3 @@ MSGID_BUGS_ADDRESS = bug-gnutls@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
-
-# Avoid line numbers in *.po, but keep them in *.pot.
-MSGMERGE = msgmerge --no-location
-MSGMERGE_UPDATE = msgmerge --no-location --update
-MSGFILTER = msgfilter --no-location
diff --git a/po/de.po b/po/de.po.in
index d30467b83e..d30467b83e 100644
--- a/po/de.po
+++ b/po/de.po.in
diff --git a/po/ms.po b/po/ms.po.in
index 7b89b7e43c..7b89b7e43c 100644
--- a/po/ms.po
+++ b/po/ms.po.in
diff --git a/po/nl.po b/po/nl.po.in
index 1ee5990018..1ee5990018 100644
--- a/po/nl.po
+++ b/po/nl.po.in
diff --git a/po/pl.po b/po/pl.po.in
index be71de6f11..be71de6f11 100644
--- a/po/pl.po
+++ b/po/pl.po.in
diff --git a/po/sv.po b/po/sv.po.in
index 1669ad0732..1669ad0732 100644
--- a/po/sv.po
+++ b/po/sv.po.in
diff --git a/src/certtool.c b/src/certtool.c
index a6d0c9d578..e8a96c9db3 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -1752,10 +1752,6 @@ generate_request (void)
get_uid_crq_set (crq);
get_oid_crq_set (crq);
- ret = gnutls_x509_crq_set_version (crq, 1);
- if (ret < 0)
- error (EXIT_FAILURE, 0, "set_version: %s", gnutls_strerror (ret));
-
pass = get_challenge_pass ();
if (pass != NULL)
diff --git a/src/cli.c b/src/cli.c
index 674f346768..be8d0cff2e 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <sys/time.h>
#include <sys/stat.h>
+#include <sys/socket.h>
#include <unistd.h>
#include <fcntl.h>
@@ -46,14 +47,6 @@
#define select _win_select
#endif
-#ifndef SHUT_WR
-# define SHUT_WR 1
-#endif
-
-#ifndef SHUT_RDWR
-# define SHUT_RDWR 2
-#endif
-
#define SA struct sockaddr
#define ERR(err,s) do { if (err==-1) {perror(s);return(1);} } while (0)
#define MAX_BUF 4096
@@ -306,7 +299,7 @@ load_keys (void)
if (strcasecmp(info.pgp_subkey, "auto")==0)
{
- ret = gnutls_openpgp_crt_get_auth_subkey( pgp_crt, keyid);
+ ret = gnutls_openpgp_crt_get_auth_subkey( pgp_crt, keyid, 1);
if (ret < 0)
{
fprintf (stderr,
diff --git a/src/tls_test.c b/src/tls_test.c
index 1422a46a91..fc2efcca08 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000,2001,2002,2003,2006,2007 Nikos Mavrogiannopoulos
- * Copyright (C) 2004,2005 Free Software Foundation
+ * Copyright (C) 2004,2005, 2008 Free Software Foundation
*
* This file is part of GNUTLS.
*
@@ -27,18 +27,11 @@
#include <gnutls/gnutls.h>
#include <gnutls/extra.h>
#include <sys/time.h>
+#include <sys/socket.h>
#include <tests.h>
#include <common.h>
#include <tls_test-gaa.h>
-#ifndef SHUT_WR
-# define SHUT_WR 1
-#endif
-
-#ifndef SHUT_RDWR
-# define SHUT_RDWR 2
-#endif
-
#define SA struct sockaddr
#define ERR(err,s) if (err==-1) {perror(s);return(1);}
#define MAX_BUF 4096
diff --git a/tests/pathlen/pathlen b/tests/pathlen/pathlen
index 236e372edd..6db6c8ed47 100755
--- a/tests/pathlen/pathlen
+++ b/tests/pathlen/pathlen
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2006, 2007 Free Software Foundation
+# Copyright (C) 2006, 2007, 2008 Free Software Foundation
#
# Author: Simon Josefsson
#
@@ -30,9 +30,9 @@ $CERTTOOL --certificate-info --infile $srcdir/ca-no-pathlen.pem \
$CERTTOOL --certificate-info --infile $srcdir/no-ca-or-pathlen.pem \
--outfile new-no-ca-or-pathlen.pem
-diff -ur $srcdir/ca-no-pathlen.pem new-ca-no-pathlen.pem
+diff $srcdir/ca-no-pathlen.pem new-ca-no-pathlen.pem
rc1=$?
-diff -ur $srcdir/no-ca-or-pathlen.pem new-no-ca-or-pathlen.pem
+diff $srcdir/no-ca-or-pathlen.pem new-no-ca-or-pathlen.pem
rc2=$?
rm -f new-ca-no-pathlen.pem new-no-ca-or-pathlen.pem