source code open - openssl master 2.0_alpha submit/master/20120920.151108
authorKidong Kim <kd0228.kim@samsung.com>
Wed, 22 Aug 2012 04:30:38 +0000 (13:30 +0900)
committerKidong Kim <kd0228.kim@samsung.com>
Wed, 22 Aug 2012 04:30:38 +0000 (13:30 +0900)
apps/md4.c [changed from file to symlink]
config.guess [deleted file]
config.sub [deleted file]
debian/changelog
include/openssl/dtls1.h [changed from file to symlink]
include/openssl/ssl.h [changed from file to symlink]
include/openssl/ssl3.h [changed from file to symlink]
include/openssl/tls1.h [changed from file to symlink]
packaging/unused [deleted file]

deleted file mode 100644 (file)
index 141415ad4df6731283b322f831ab01bc82e34b2f..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/* crypto/md4/md4.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <openssl/md4.h>
-
-#define BUFSIZE        1024*16
-
-void do_fp(FILE *f);
-void pt(unsigned char *md);
-#if !defined(_OSD_POSIX) && !defined(__DJGPP__)
-int read(int, void *, unsigned int);
-#endif
-
-int main(int argc, char **argv)
-       {
-       int i,err=0;
-       FILE *IN;
-
-       if (argc == 1)
-               {
-               do_fp(stdin);
-               }
-       else
-               {
-               for (i=1; i<argc; i++)
-                       {
-                       IN=fopen(argv[i],"r");
-                       if (IN == NULL)
-                               {
-                               perror(argv[i]);
-                               err++;
-                               continue;
-                               }
-                       printf("MD4(%s)= ",argv[i]);
-                       do_fp(IN);
-                       fclose(IN);
-                       }
-               }
-       exit(err);
-       }
-
-void do_fp(FILE *f)
-       {
-       MD4_CTX c;
-       unsigned char md[MD4_DIGEST_LENGTH];
-       int fd;
-       int i;
-       static unsigned char buf[BUFSIZE];
-
-       fd=fileno(f);
-       MD4_Init(&c);
-       for (;;)
-               {
-               i=read(fd,buf,sizeof buf);
-               if (i <= 0) break;
-               MD4_Update(&c,buf,(unsigned long)i);
-               }
-       MD4_Final(&(md[0]),&c);
-       pt(md);
-       }
-
-void pt(unsigned char *md)
-       {
-       int i;
-
-       for (i=0; i<MD4_DIGEST_LENGTH; i++)
-               printf("%02x",md[i]);
-       printf("\n");
-       }
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..7f457b2ab1e120a05801927bd6cd3936c330ea69
--- /dev/null
@@ -0,0 +1 @@
+../crypto/md4/md4.c
\ No newline at end of file
diff --git a/config.guess b/config.guess
deleted file mode 100755 (executable)
index 40eaed4..0000000
+++ /dev/null
@@ -1,1517 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-05-11'
-
-# This file 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 2 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, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           sh5el) machine=sh5le-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep -q __ELF__
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-       exitcode=$?
-       trap '' 0
-       exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-       echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    s390x:SunOS:*:*)
-       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-       echo i386-pc-auroraux${UNAME_RELEASE}
-       exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       eval $set_cc_for_build
-       SUN_ARCH="i386"
-       # If there is a compiler, see if it is configured for 64-bit objects.
-       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-       # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
-               SUN_ARCH="x86_64"
-           fi
-       fi
-       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-       echo m68k-milan-mint${UNAME_RELEASE}
-       exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-       echo m68k-hades-mint${UNAME_RELEASE}
-       exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-       echo m68k-unknown-mint${UNAME_RELEASE}
-       exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-       # DG/UX returns AViiON for all architectures
-       UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[4567])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                   case "${sc_cpu_version}" in
-                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                     532)                      # CPU_PA_RISC2_0
-                       case "${sc_kernel_bits}" in
-                         32) HP_ARCH="hppa2.0n" ;;
-                         64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                       esac ;;
-                   esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^            //' << EOF >$dummy.c
-
-               #define _HPUX_SOURCE
-               #include <stdlib.h>
-               #include <unistd.h>
-
-               int main ()
-               {
-               #if defined(_SC_KERNEL_BITS)
-                   long bits = sysconf(_SC_KERNEL_BITS);
-               #endif
-                   long cpu  = sysconf (_SC_CPU_VERSION);
-
-                   switch (cpu)
-                       {
-                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-                       case CPU_PA_RISC2_0:
-               #if defined(_SC_KERNEL_BITS)
-                           switch (bits)
-                               {
-                               case 64: puts ("hppa2.0w"); break;
-                               case 32: puts ("hppa2.0n"); break;
-                               default: puts ("hppa2.0"); break;
-                               } break;
-               #else  /* !defined(_SC_KERNEL_BITS) */
-                           puts ("hppa2.0"); break;
-               #endif
-                       default: puts ("hppa1.0"); break;
-                       }
-                   exit (0);
-               }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep -q __LP64__
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-       exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-       exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-       exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-       exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    *:Interix*:*)
-       case ${UNAME_MACHINE} in
-           x86)
-               echo i586-pc-interix${UNAME_RELEASE}
-               exit ;;
-           authenticamd | genuineintel | EM64T)
-               echo x86_64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-           IA64)
-               echo ia64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-       esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    8664:Windows_NT:*)
-       echo x86_64-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-       esac
-       objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    arm*:Linux:*:*)
-       eval $set_cc_for_build
-       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-           | grep -q __ARM_EABI__
-       then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
-       else
-           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-               | grep -q __ARM_PCS_VFP
-           then
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-           else
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-           fi
-       fi
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef ${UNAME_MACHINE}
-       #undef ${UNAME_MACHINE}el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=${UNAME_MACHINE}el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=${UNAME_MACHINE}
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-tilera-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-       # Unixware is an offshoot of SVR4, but it has its own version
-       # number series starting with 2...
-       # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-       # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-       # uname -m prints for DJGPP always 'pc', but it prints nothing about
-       # the processor, so we play safe by assuming i586.
-       # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
-       # this is a cross-build.
-       echo i586-pc-msdosdjgpp
-       exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-       OS_REL='.3'
-       test -r /etc/.relid \
-           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                       # says <Richard.M.Bartel@ccMail.Census.GOV>
-       echo i586-unisys-sysv4
-       exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-       exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
-       echo i586-pc-haiku
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-       echo neo-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-       echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-    i*86:AROS:*:*)
-       echo ${UNAME_MACHINE}-pc-aros
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config.sub b/config.sub
deleted file mode 100755 (executable)
index 30fdca8..0000000
+++ /dev/null
@@ -1,1760 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
-
-timestamp='2011-03-23'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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 2 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, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray | -microblaze)
-               os=
-               basic_machine=$1
-               ;;
-       -bluegene*)
-               os=-cnk
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fido | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | lm32 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep | metag \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64octeon | mips64octeonel \
-       | mips64orion | mips64orionel \
-       | mips64r5900 | mips64r5900el \
-       | mips64vr | mips64vrel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | moxie \
-       | mt \
-       | msp430 \
-       | nds32 | nds32le | nds32be \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | open8 \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle \
-       | pyramid \
-       | rx \
-       | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu \
-       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-       | ubicom32 \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xc16x | xstormy16 | xtensa \
-       | z8k | z80)
-               basic_machine=$basic_machine-unknown
-               ;;
-       c54x)
-               basic_machine=tic54x-unknown
-               ;;
-       c55x)
-               basic_machine=tic55x-unknown
-               ;;
-       c6x)
-               basic_machine=tic6x-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       strongarm | thumb | xscale)
-               basic_machine=arm-unknown
-               ;;
-
-       xscaleeb)
-               basic_machine=armeb-unknown
-               ;;
-
-       xscaleel)
-               basic_machine=armel-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | lm32-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64octeon-* | mips64octeonel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64r5900-* | mips64r5900el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | open8-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-       | pyramid-* \
-       | romp-* | rs6000-* | rx-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
-       | tahoe-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tile-* | tilegx-* \
-       | tron-* \
-       | ubicom32-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* \
-       | xstormy16-* | xtensa*-* \
-       | ymp-* \
-       | z8k-* | z80-*)
-               ;;
-       # Recognize the basic CPU types without company name, with glob match.
-       xtensa*)
-               basic_machine=$basic_machine-unknown
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aros)
-               basic_machine=i386-pc
-               os=-aros
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       blackfin)
-               basic_machine=bfin-unknown
-               os=-linux
-               ;;
-       blackfin-*)
-               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       bluegene*)
-               basic_machine=powerpc-ibm
-               os=-cnk
-               ;;
-       c54x-*)
-               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c55x-*)
-               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c6x-*)
-               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       cegcc)
-               basic_machine=arm-unknown
-               os=-cegcc
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16 | cr16-*)
-               basic_machine=cr16-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       dicos)
-               basic_machine=i686-pc
-               os=-dicos
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m68knommu)
-               basic_machine=m68k-unknown
-               os=-linux
-               ;;
-       m68knommu-*)
-               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       microblaze)
-               basic_machine=microblaze-xilinx
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       mingw32ce)
-               basic_machine=arm-unknown
-               os=-mingw32ce
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       neo-tandem)
-               basic_machine=neo-tandem
-               ;;
-       nse-tandem)
-               basic_machine=nse-tandem
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       parisc)
-               basic_machine=hppa-unknown
-               os=-linux
-               ;;
-       parisc-*)
-               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc | ppcbe)    basic_machine=powerpc-unknown
-               ;;
-       ppc-* | ppcbe-*)
-               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sde)
-               basic_machine=mipsisa32-sde
-               os=-elf
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh5el)
-               basic_machine=sh5le-unknown
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       strongarm-* | thumb-*)
-               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       # This must be matched before tile*.
-       tilegx*)
-               basic_machine=tilegx-unknown
-               os=-linux-gnu
-               ;;
-       tile*)
-               basic_machine=tile-unknown
-               os=-linux-gnu
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       xscale-* | xscalee[bl]-*)
-               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       z80-*-coff)
-               basic_machine=z80-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-       # First match some system type aliases
-       # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -auroraux)
-               os=-auroraux
-               ;;
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-android* \
-             | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-       -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-       -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -dicos*)
-               os=-dicos
-               ;;
-       -nacl*)
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-       score-*)
-               os=-elf
-               ;;
-       spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-       c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       tic54x-*)
-               os=-coff
-               ;;
-       tic55x-*)
-               os=-coff
-               ;;
-       tic6x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mep-*)
-               os=-elf
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -cnk*|-aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
index 33309b9..9f17be7 100644 (file)
@@ -1,24 +1,93 @@
 openssl (1.0.0f-2) unstable; urgency=low
 
   * exclude rc5, idea and camellia because of patent issue
-  * Git: unmodified/openssl
+  * Git: slp/unmodified/openssl
   * Tag: openssl_1.0.0f-2
 
  -- Kidong Kim <kd0228.kim@samsung.com>  Thu, 09 Feb 2012 17:54:12 +0900
 
+openssl (1.0.0f-1) unstable; urgency=low
+
+  * update version - fix some security vulnerabilities
+  * Git: slp/unmodified/openssl
+  * Tag: openssl_1.0.0f-1
+
+ -- Kidong Kim <kd0228.kim@samsung.com>  Tue, 10 Jan 2012 15:15:59 +0900
+
 openssl (1.0.0e-6) unstable; urgency=low
 
   * 11/12/21
   *  - remove unnecessary file - debian/copyright
-  * Git: unmodified/openssl
+  * Git: slp/unmodified/openssl
   * Tag: openssl_1.0.0e-6
 
- -- Kidong Kim <kd0228.kim@samsung.com>  Wed, 21 Dec 2011 11:35:28 +0900
+ -- Kidong Kim <kd0228.kim@samsung.com>  Wed, 21 Dec 2011 11:32:37 +0900
 
 openssl (1.0.0e-5) unstable; urgency=low
 
   * changelog update
-  * Git: unmodified/openssl
+  * Git: 165.213.180.234:slp/unmodified/openssl
   * Tag: openssl_1.0.0e-5
 
  -- Howon Jung <howon.jung@samsung.com>  Tue, 22 Nov 2011 19:12:35 +0900
+
+openssl (1.0.0e-4) unstable; urgency=low
+
+  * changelog update
+  * Git: 165.213.180.234:slp/unmodified/openssl
+  * Tag: openssl_1.0.0e-4
+
+ -- Howon Jung <howon.jung@samsung.com>  Tue, 22 Nov 2011 16:28:06 +0900
+
+openssl (1.0.0e-3) unstable; urgency=low
+
+  * changelog update
+  * Git: 165.213.180.234:slp/unmodified/openssl
+  * Tag: openssl_1.0.0e-3 
+
+ -- Howon Jung <howon.jung@samsung.com>  Tue, 22 Nov 2011 16:09:53 +0900
+
+openssl (1.0.0e-2) unstable; urgency=low
+
+  * Enable the md2 cipher
+
+ -- Mike McCormack <mj.mccormack@samsung.com>  Fri, 16 Sep 2011 11:45:19 +0900
+
+openssl (1.0.0e-1) unstable; urgency=low
+
+  * Upgrade to 1.0.0e
+
+ -- Mike McCormack <mj.mccormack@samsung.com>  Wed, 14 Sep 2011 12:06:40 +0900
+
+openssl (0.9.8s-5) unstable; urgency=low
+
+  * upgrade
+  * tweak build and packaging
+  * Git: 165.213.180.234:slp/unmodified/openssl
+  * Tag: openssl_0.9.8s-5
+
+ -- Mike McCormack <mj.mccormack@samsung.com>  Fri, 03 Dec 2010 11:26:01 +0900
+
+openssl (0.9.8i-4) unstable; urgency=low
+
+  * remove .git directory
+
+ -- Semun Lee <semun.lee@samsung.com>  Fri, 20 Nov 2009 16:03:43 +0900
+
+openssl (0.9.8i-3) unstable; urgency=low
+
+  * add shlibs
+
+ -- Semun Lee <semun.lee@samsung.com>  Mon, 16 Nov 2009 11:30:22 +0900
+
+openssl (0.9.8i-2) unstable; urgency=low
+
+  * fix dev package not to install *.so files
+
+ -- Semun Lee <semun.lee@samsung.com>  Fri, 13 Nov 2009 09:28:22 +0900
+
+openssl (0.9.8i) unstable; urgency=low
+
+  * Initial Release.
+
+ -- unknown <semun.lee@samsung.com>  Thu, 12 Nov 2009 11:02:22 +0900
deleted file mode 100644 (file)
index 2900d1d8ae85fd22303ae48b316f4295740c5c6f..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/* ssl/dtls1.h */
-/* 
- * DTLS implementation written by Nagendra Modadugu
- * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.  
- */
-/* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core@OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-
-#ifndef HEADER_DTLS1_H 
-#define HEADER_DTLS1_H 
-
-#include <openssl/buffer.h>
-#include <openssl/pqueue.h>
-#ifdef OPENSSL_SYS_VMS
-#include <resource.h>
-#include <sys/timeb.h>
-#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Needed for struct timeval */
-#include <winsock.h>
-#elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
-#include <sys/timeval.h>
-#else
-#include <sys/time.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define DTLS1_VERSION                  0xFEFF
-#define DTLS1_BAD_VER                  0x0100
-
-#if 0
-/* this alert description is not specified anywhere... */
-#define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE    110
-#endif
-
-/* lengths of messages */
-#define DTLS1_COOKIE_LENGTH                     256
-
-#define DTLS1_RT_HEADER_LENGTH                  13
-
-#define DTLS1_HM_HEADER_LENGTH                  12
-
-#define DTLS1_HM_BAD_FRAGMENT                   -2
-#define DTLS1_HM_FRAGMENT_RETRY                 -3
-
-#define DTLS1_CCS_HEADER_LENGTH                  1
-
-#ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE
-#define DTLS1_AL_HEADER_LENGTH                   7
-#else
-#define DTLS1_AL_HEADER_LENGTH                   2
-#endif
-
-
-typedef struct dtls1_bitmap_st
-       {
-       unsigned long map;              /* track 32 packets on 32-bit systems
-                                          and 64 - on 64-bit systems */
-       unsigned char max_seq_num[8];   /* max record number seen so far,
-                                          64-bit value in big-endian
-                                          encoding */
-       } DTLS1_BITMAP;
-
-struct dtls1_retransmit_state
-       {
-       EVP_CIPHER_CTX *enc_write_ctx;  /* cryptographic state */
-       EVP_MD_CTX *write_hash;                 /* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-       COMP_CTX *compress;                             /* compression */
-#else
-       char *compress; 
-#endif
-       SSL_SESSION *session;
-       unsigned short epoch;
-       };
-
-struct hm_header_st
-       {
-       unsigned char type;
-       unsigned long msg_len;
-       unsigned short seq;
-       unsigned long frag_off;
-       unsigned long frag_len;
-       unsigned int is_ccs;
-       struct dtls1_retransmit_state saved_retransmit_state;
-       };
-
-struct ccs_header_st
-       {
-       unsigned char type;
-       unsigned short seq;
-       };
-
-struct dtls1_timeout_st
-       {
-       /* Number of read timeouts so far */
-       unsigned int read_timeouts;
-       
-       /* Number of write timeouts so far */
-       unsigned int write_timeouts;
-       
-       /* Number of alerts received so far */
-       unsigned int num_alerts;
-       };
-
-typedef struct record_pqueue_st
-       {
-       unsigned short epoch;
-       pqueue q;
-       } record_pqueue;
-
-typedef struct hm_fragment_st
-       {
-       struct hm_header_st msg_header;
-       unsigned char *fragment;
-       unsigned char *reassembly;
-       } hm_fragment;
-
-typedef struct dtls1_state_st
-       {
-       unsigned int send_cookie;
-       unsigned char cookie[DTLS1_COOKIE_LENGTH];
-       unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH];
-       unsigned int cookie_len;
-
-       /* 
-        * The current data and handshake epoch.  This is initially
-        * undefined, and starts at zero once the initial handshake is
-        * completed 
-        */
-       unsigned short r_epoch;
-       unsigned short w_epoch;
-
-       /* records being received in the current epoch */
-       DTLS1_BITMAP bitmap;
-
-       /* renegotiation starts a new set of sequence numbers */
-       DTLS1_BITMAP next_bitmap;
-
-       /* handshake message numbers */
-       unsigned short handshake_write_seq;
-       unsigned short next_handshake_write_seq;
-
-       unsigned short handshake_read_seq;
-
-       /* save last sequence number for retransmissions */
-       unsigned char last_write_sequence[8];
-
-       /* Received handshake records (processed and unprocessed) */
-       record_pqueue unprocessed_rcds;
-       record_pqueue processed_rcds;
-
-       /* Buffered handshake messages */
-       pqueue buffered_messages;
-
-       /* Buffered (sent) handshake records */
-       pqueue sent_messages;
-
-       /* Buffered application records.
-        * Only for records between CCS and Finished
-        * to prevent either protocol violation or
-        * unnecessary message loss.
-        */
-       record_pqueue buffered_app_data;
-
-       /* Is set when listening for new connections with dtls1_listen() */
-       unsigned int listen;
-
-       unsigned int mtu; /* max DTLS packet size */
-
-       struct hm_header_st w_msg_hdr;
-       struct hm_header_st r_msg_hdr;
-
-       struct dtls1_timeout_st timeout;
-
-       /* Indicates when the last handshake msg sent will timeout */
-       struct timeval next_timeout;
-
-       /* Timeout duration */
-       unsigned short timeout_duration;
-
-       /* storage for Alert/Handshake protocol data received but not
-        * yet processed by ssl3_read_bytes: */
-       unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH];
-       unsigned int alert_fragment_len;
-       unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH];
-       unsigned int handshake_fragment_len;
-
-       unsigned int retransmitting;
-       unsigned int change_cipher_spec_ok;
-
-       } DTLS1_STATE;
-
-typedef struct dtls1_record_data_st
-       {
-       unsigned char *packet;
-       unsigned int   packet_length;
-       SSL3_BUFFER    rbuf;
-       SSL3_RECORD    rrec;
-       } DTLS1_RECORD_DATA;
-
-
-/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */
-#define DTLS1_TMO_READ_COUNT                      2
-#define DTLS1_TMO_WRITE_COUNT                     2
-
-#define DTLS1_TMO_ALERT_COUNT                     12
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..95aef9913ab0f60ded514babbd92499bd7bf360b
--- /dev/null
@@ -0,0 +1 @@
+../../ssl/dtls1.h
\ No newline at end of file
deleted file mode 100644 (file)
index 8f922eea72a04b523a69e6b986e1507085eb4781..0000000000000000000000000000000000000000
+++ /dev/null
-/* ssl/ssl.h */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2007 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECC cipher suite support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-/* ====================================================================
- * Copyright 2005 Nokia. All rights reserved.
- *
- * The portions of the attached software ("Contribution") is developed by
- * Nokia Corporation and is licensed pursuant to the OpenSSL open source
- * license.
- *
- * The Contribution, originally written by Mika Kousa and Pasi Eronen of
- * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
- * support (see RFC 4279) to OpenSSL.
- *
- * No patent licenses or other rights except those expressly stated in
- * the OpenSSL open source license shall be deemed granted or received
- * expressly, by implication, estoppel, or otherwise.
- *
- * No assurances are provided by Nokia that the Contribution does not
- * infringe the patent or other intellectual property rights of any third
- * party or that the license provides you with all the necessary rights
- * to make use of the Contribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
- * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
- * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
- * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
- * OTHERWISE.
- */
-
-#ifndef HEADER_SSL_H 
-#define HEADER_SSL_H 
-
-#include <openssl/e_os2.h>
-
-#ifndef OPENSSL_NO_COMP
-#include <openssl/comp.h>
-#endif
-#ifndef OPENSSL_NO_BIO
-#include <openssl/bio.h>
-#endif
-#ifndef OPENSSL_NO_DEPRECATED
-#ifndef OPENSSL_NO_X509
-#include <openssl/x509.h>
-#endif
-#include <openssl/crypto.h>
-#include <openssl/lhash.h>
-#include <openssl/buffer.h>
-#endif
-#include <openssl/pem.h>
-#include <openssl/hmac.h>
-
-#include <openssl/kssl.h>
-#include <openssl/safestack.h>
-#include <openssl/symhacks.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* SSLeay version number for ASN.1 encoding of the session information */
-/* Version 0 - initial version
- * Version 1 - added the optional peer certificate
- */
-#define SSL_SESSION_ASN1_VERSION 0x0001
-
-/* text strings for the ciphers */
-#define SSL_TXT_NULL_WITH_MD5          SSL2_TXT_NULL_WITH_MD5                  
-#define SSL_TXT_RC4_128_WITH_MD5       SSL2_TXT_RC4_128_WITH_MD5               
-#define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5   
-#define SSL_TXT_RC2_128_CBC_WITH_MD5   SSL2_TXT_RC2_128_CBC_WITH_MD5           
-#define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5   
-#define SSL_TXT_IDEA_128_CBC_WITH_MD5  SSL2_TXT_IDEA_128_CBC_WITH_MD5          
-#define SSL_TXT_DES_64_CBC_WITH_MD5    SSL2_TXT_DES_64_CBC_WITH_MD5            
-#define SSL_TXT_DES_64_CBC_WITH_SHA    SSL2_TXT_DES_64_CBC_WITH_SHA            
-#define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5   
-#define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA   
-
-/*    VRS Additional Kerberos5 entries
- */
-#define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA
-#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
-#define SSL_TXT_KRB5_RC4_128_SHA      SSL3_TXT_KRB5_RC4_128_SHA
-#define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA
-#define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5       
-#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5       
-#define SSL_TXT_KRB5_RC4_128_MD5      SSL3_TXT_KRB5_RC4_128_MD5
-#define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5 
-
-#define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA 
-#define SSL_TXT_KRB5_RC2_40_CBC_SHA   SSL3_TXT_KRB5_RC2_40_CBC_SHA 
-#define SSL_TXT_KRB5_RC4_40_SHA              SSL3_TXT_KRB5_RC4_40_SHA
-#define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5 
-#define SSL_TXT_KRB5_RC2_40_CBC_MD5   SSL3_TXT_KRB5_RC2_40_CBC_MD5 
-#define SSL_TXT_KRB5_RC4_40_MD5              SSL3_TXT_KRB5_RC4_40_MD5
-
-#define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA
-#define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5
-#define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA
-#define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5
-#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
-#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
-#define SSL_MAX_KRB5_PRINCIPAL_LENGTH  256
-
-#define SSL_MAX_SSL_SESSION_ID_LENGTH          32
-#define SSL_MAX_SID_CTX_LENGTH                 32
-
-#define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES    (512/8)
-#define SSL_MAX_KEY_ARG_LENGTH                 8
-#define SSL_MAX_MASTER_KEY_LENGTH              48
-
-
-/* These are used to specify which ciphers to use and not to use */
-
-#define SSL_TXT_EXP40          "EXPORT40"
-#define SSL_TXT_EXP56          "EXPORT56"
-#define SSL_TXT_LOW            "LOW"
-#define SSL_TXT_MEDIUM         "MEDIUM"
-#define SSL_TXT_HIGH           "HIGH"
-#define SSL_TXT_FIPS           "FIPS"
-
-#define SSL_TXT_kFZA           "kFZA" /* unused! */
-#define        SSL_TXT_aFZA            "aFZA" /* unused! */
-#define SSL_TXT_eFZA           "eFZA" /* unused! */
-#define SSL_TXT_FZA            "FZA"  /* unused! */
-
-#define        SSL_TXT_aNULL           "aNULL"
-#define        SSL_TXT_eNULL           "eNULL"
-#define        SSL_TXT_NULL            "NULL"
-
-#define SSL_TXT_kRSA           "kRSA"
-#define SSL_TXT_kDHr           "kDHr" /* no such ciphersuites supported! */
-#define SSL_TXT_kDHd           "kDHd" /* no such ciphersuites supported! */
-#define SSL_TXT_kDH            "kDH"  /* no such ciphersuites supported! */
-#define SSL_TXT_kEDH           "kEDH"
-#define SSL_TXT_kKRB5          "kKRB5"
-#define SSL_TXT_kECDHr         "kECDHr"
-#define SSL_TXT_kECDHe         "kECDHe"
-#define SSL_TXT_kECDH          "kECDH"
-#define SSL_TXT_kEECDH         "kEECDH"
-#define SSL_TXT_kPSK            "kPSK"
-#define SSL_TXT_kGOST          "kGOST"
-
-#define        SSL_TXT_aRSA            "aRSA"
-#define        SSL_TXT_aDSS            "aDSS"
-#define        SSL_TXT_aDH             "aDH" /* no such ciphersuites supported! */
-#define        SSL_TXT_aECDH           "aECDH"
-#define SSL_TXT_aKRB5          "aKRB5"
-#define SSL_TXT_aECDSA         "aECDSA"
-#define SSL_TXT_aPSK            "aPSK"
-#define SSL_TXT_aGOST94        "aGOST94"
-#define SSL_TXT_aGOST01 "aGOST01"
-#define SSL_TXT_aGOST  "aGOST"
-
-#define        SSL_TXT_DSS             "DSS"
-#define SSL_TXT_DH             "DH"
-#define SSL_TXT_EDH            "EDH" /* same as "kEDH:-ADH" */
-#define SSL_TXT_ADH            "ADH"
-#define SSL_TXT_RSA            "RSA"
-#define SSL_TXT_ECDH           "ECDH"
-#define SSL_TXT_EECDH          "EECDH" /* same as "kEECDH:-AECDH" */
-#define SSL_TXT_AECDH          "AECDH"
-#define SSL_TXT_ECDSA          "ECDSA"
-#define SSL_TXT_KRB5           "KRB5"
-#define SSL_TXT_PSK             "PSK"
-
-#define SSL_TXT_DES            "DES"
-#define SSL_TXT_3DES           "3DES"
-#define SSL_TXT_RC4            "RC4"
-#define SSL_TXT_RC2            "RC2"
-#define SSL_TXT_IDEA           "IDEA"
-#define SSL_TXT_SEED           "SEED"
-#define SSL_TXT_AES128         "AES128"
-#define SSL_TXT_AES256         "AES256"
-#define SSL_TXT_AES            "AES"
-#define SSL_TXT_CAMELLIA128    "CAMELLIA128"
-#define SSL_TXT_CAMELLIA256    "CAMELLIA256"
-#define SSL_TXT_CAMELLIA       "CAMELLIA"
-
-#define SSL_TXT_MD5            "MD5"
-#define SSL_TXT_SHA1           "SHA1"
-#define SSL_TXT_SHA            "SHA" /* same as "SHA1" */
-#define SSL_TXT_GOST94         "GOST94" 
-#define SSL_TXT_GOST89MAC              "GOST89MAC" 
-
-#define SSL_TXT_SSLV2          "SSLv2"
-#define SSL_TXT_SSLV3          "SSLv3"
-#define SSL_TXT_TLSV1          "TLSv1"
-
-#define SSL_TXT_EXP            "EXP"
-#define SSL_TXT_EXPORT         "EXPORT"
-
-#define SSL_TXT_ALL            "ALL"
-
-/*
- * COMPLEMENTOF* definitions. These identifiers are used to (de-select)
- * ciphers normally not being used.
- * Example: "RC4" will activate all ciphers using RC4 including ciphers
- * without authentication, which would normally disabled by DEFAULT (due
- * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT"
- * will make sure that it is also disabled in the specific selection.
- * COMPLEMENTOF* identifiers are portable between version, as adjustments
- * to the default cipher setup will also be included here.
- *
- * COMPLEMENTOFDEFAULT does not experience the same special treatment that
- * DEFAULT gets, as only selection is being done and no sorting as needed
- * for DEFAULT.
- */
-#define SSL_TXT_CMPALL         "COMPLEMENTOFALL"
-#define SSL_TXT_CMPDEF         "COMPLEMENTOFDEFAULT"
-
-/* The following cipher list is used by default.
- * It also is substituted when an application-defined cipher list string
- * starts with 'DEFAULT'. */
-#define SSL_DEFAULT_CIPHER_LIST        "ALL:!aNULL:!eNULL:!SSLv2"
-/* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
- * starts with a reasonable order, and all we have to do for DEFAULT is
- * throwing out anonymous and unencrypted ciphersuites!
- * (The latter are not actually enabled by ALL, but "ALL:RSA" would enable
- * some of them.)
- */
-
-/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
-#define SSL_SENT_SHUTDOWN      1
-#define SSL_RECEIVED_SHUTDOWN  2
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2)
-#define OPENSSL_NO_SSL2
-#endif
-
-#define SSL_FILETYPE_ASN1      X509_FILETYPE_ASN1
-#define SSL_FILETYPE_PEM       X509_FILETYPE_PEM
-
-/* This is needed to stop compilers complaining about the
- * 'struct ssl_st *' function parameters used to prototype callbacks
- * in SSL_CTX. */
-typedef struct ssl_st *ssl_crock_st;
-typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT;
-
-/* used to hold info on the particular ciphers used */
-typedef struct ssl_cipher_st
-       {
-       int valid;
-       const char *name;               /* text name */
-       unsigned long id;               /* id, 4 bytes, first is version */
-
-       /* changed in 0.9.9: these four used to be portions of a single value 'algorithms' */
-       unsigned long algorithm_mkey;   /* key exchange algorithm */
-       unsigned long algorithm_auth;   /* server authentication */
-       unsigned long algorithm_enc;    /* symmetric encryption */
-       unsigned long algorithm_mac;    /* symmetric authentication */
-       unsigned long algorithm_ssl;    /* (major) protocol version */
-
-       unsigned long algo_strength;    /* strength and export flags */
-       unsigned long algorithm2;       /* Extra flags */
-       int strength_bits;              /* Number of bits really used */
-       int alg_bits;                   /* Number of bits for algorithm */
-       } SSL_CIPHER;
-
-DECLARE_STACK_OF(SSL_CIPHER)
-
-typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data, int len, void *arg);
-typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, STACK_OF(SSL_CIPHER) *peer_ciphers, SSL_CIPHER **cipher, void *arg);
-
-/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
-typedef struct ssl_method_st
-       {
-       int version;
-       int (*ssl_new)(SSL *s);
-       void (*ssl_clear)(SSL *s);
-       void (*ssl_free)(SSL *s);
-       int (*ssl_accept)(SSL *s);
-       int (*ssl_connect)(SSL *s);
-       int (*ssl_read)(SSL *s,void *buf,int len);
-       int (*ssl_peek)(SSL *s,void *buf,int len);
-       int (*ssl_write)(SSL *s,const void *buf,int len);
-       int (*ssl_shutdown)(SSL *s);
-       int (*ssl_renegotiate)(SSL *s);
-       int (*ssl_renegotiate_check)(SSL *s);
-       long (*ssl_get_message)(SSL *s, int st1, int stn, int mt, long
-               max, int *ok);
-       int (*ssl_read_bytes)(SSL *s, int type, unsigned char *buf, int len, 
-               int peek);
-       int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
-       int (*ssl_dispatch_alert)(SSL *s);
-       long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg);
-       long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg);
-       const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
-       int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr);
-       int (*ssl_pending)(const SSL *s);
-       int (*num_ciphers)(void);
-       const SSL_CIPHER *(*get_cipher)(unsigned ncipher);
-       const struct ssl_method_st *(*get_ssl_method)(int version);
-       long (*get_timeout)(void);
-       struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
-       int (*ssl_version)(void);
-       long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void));
-       long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void));
-       } SSL_METHOD;
-
-/* Lets make this into an ASN.1 type structure as follows
- * SSL_SESSION_ID ::= SEQUENCE {
- *     version                 INTEGER,        -- structure version number
- *     SSLversion              INTEGER,        -- SSL version number
- *     Cipher                  OCTET STRING,   -- the 3 byte cipher ID
- *     Session_ID              OCTET STRING,   -- the Session ID
- *     Master_key              OCTET STRING,   -- the master key
- *     KRB5_principal          OCTET STRING    -- optional Kerberos principal
- *     Key_Arg [ 0 ] IMPLICIT  OCTET STRING,   -- the optional Key argument
- *     Time [ 1 ] EXPLICIT     INTEGER,        -- optional Start Time
- *     Timeout [ 2 ] EXPLICIT  INTEGER,        -- optional Timeout ins seconds
- *     Peer [ 3 ] EXPLICIT     X509,           -- optional Peer Certificate
- *     Session_ID_context [ 4 ] EXPLICIT OCTET STRING,   -- the Session ID context
- *     Verify_result [ 5 ] EXPLICIT INTEGER,   -- X509_V_... code for `Peer'
- *     HostName [ 6 ] EXPLICIT OCTET STRING,   -- optional HostName from servername TLS extension 
- *     ECPointFormatList [ 7 ] OCTET STRING,     -- optional EC point format list from TLS extension
- *     PSK_identity_hint [ 8 ] EXPLICIT OCTET STRING, -- optional PSK identity hint
- *     PSK_identity [ 9 ] EXPLICIT OCTET STRING -- optional PSK identity
- *     }
- * Look in ssl/ssl_asn1.c for more details
- * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).
- */
-typedef struct ssl_session_st
-       {
-       int ssl_version;        /* what ssl version session info is
-                                * being kept in here? */
-
-       /* only really used in SSLv2 */
-       unsigned int key_arg_length;
-       unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH];
-       int master_key_length;
-       unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
-       /* session_id - valid? */
-       unsigned int session_id_length;
-       unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH];
-       /* this is used to determine whether the session is being reused in
-        * the appropriate context. It is up to the application to set this,
-        * via SSL_new */
-       unsigned int sid_ctx_length;
-       unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-
-#ifndef OPENSSL_NO_KRB5
-        unsigned int krb5_client_princ_len;
-        unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH];
-#endif /* OPENSSL_NO_KRB5 */
-#ifndef OPENSSL_NO_PSK
-       char *psk_identity_hint;
-       char *psk_identity;
-#endif
-       int not_resumable;
-
-       /* The cert is the certificate used to establish this connection */
-       struct sess_cert_st /* SESS_CERT */ *sess_cert;
-
-       /* This is the cert for the other end.
-        * On clients, it will be the same as sess_cert->peer_key->x509
-        * (the latter is not enough as sess_cert is not retained
-        * in the external representation of sessions, see ssl_asn1.c). */
-       X509 *peer;
-       /* when app_verify_callback accepts a session where the peer's certificate
-        * is not ok, we must remember the error for session reuse: */
-       long verify_result; /* only for servers */
-
-       int references;
-       long timeout;
-       long time;
-
-       unsigned int compress_meth;     /* Need to lookup the method */
-
-       const SSL_CIPHER *cipher;
-       unsigned long cipher_id;        /* when ASN.1 loaded, this
-                                        * needs to be used to load
-                                        * the 'cipher' structure */
-
-       STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */
-
-       CRYPTO_EX_DATA ex_data; /* application specific data */
-
-       /* These are used to make removal of session-ids more
-        * efficient and to implement a maximum cache size. */
-       struct ssl_session_st *prev,*next;
-#ifndef OPENSSL_NO_TLSEXT
-       char *tlsext_hostname;
-#ifndef OPENSSL_NO_EC
-       size_t tlsext_ecpointformatlist_length;
-       unsigned char *tlsext_ecpointformatlist; /* peer's list */
-       size_t tlsext_ellipticcurvelist_length;
-       unsigned char *tlsext_ellipticcurvelist; /* peer's list */
-#endif /* OPENSSL_NO_EC */
-       /* RFC4507 info */
-       unsigned char *tlsext_tick;     /* Session ticket */
-       size_t  tlsext_ticklen;         /* Session ticket length */     
-       long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */
-#endif
-       } SSL_SESSION;
-
-
-#define SSL_OP_MICROSOFT_SESS_ID_BUG                   0x00000001L
-#define SSL_OP_NETSCAPE_CHALLENGE_BUG                  0x00000002L
-/* Allow initial connection to servers that don't support RI */
-#define SSL_OP_LEGACY_SERVER_CONNECT                   0x00000004L
-#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG                0x00000008L
-#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG             0x00000010L
-#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER              0x00000020L
-#define SSL_OP_MSIE_SSLV2_RSA_PADDING                  0x00000040L /* no effect since 0.9.7h and 0.9.8b */
-#define SSL_OP_SSLEAY_080_CLIENT_DH_BUG                        0x00000080L
-#define SSL_OP_TLS_D5_BUG                              0x00000100L
-#define SSL_OP_TLS_BLOCK_PADDING_BUG                   0x00000200L
-
-/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added
- * in OpenSSL 0.9.6d.  Usually (depending on the application protocol)
- * the workaround is not needed.  Unfortunately some broken SSL/TLS
- * implementations cannot handle it at all, which is why we include
- * it in SSL_OP_ALL. */
-#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS              0x00000800L /* added in 0.9.6e */
-
-/* SSL_OP_ALL: various bug workarounds that should be rather harmless.
- *             This used to be 0x000FFFFFL before 0.9.7. */
-#define SSL_OP_ALL                                     0x80000FFFL
-
-/* DTLS options */
-#define SSL_OP_NO_QUERY_MTU                 0x00001000L
-/* Turn on Cookie Exchange (on relevant for servers) */
-#define SSL_OP_COOKIE_EXCHANGE              0x00002000L
-/* Don't use RFC4507 ticket extension */
-#define SSL_OP_NO_TICKET                   0x00004000L
-/* Use Cisco's "speshul" version of DTLS_BAD_VER (as client)  */
-#define SSL_OP_CISCO_ANYCONNECT                    0x00008000L
-
-/* As server, disallow session resumption on renegotiation */
-#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION  0x00010000L
-/* Don't use compression even if supported */
-#define SSL_OP_NO_COMPRESSION                          0x00020000L
-/* Permit unsafe legacy renegotiation */
-#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION       0x00040000L
-/* If set, always create a new key when using tmp_ecdh parameters */
-#define SSL_OP_SINGLE_ECDH_USE                         0x00080000L
-/* If set, always create a new key when using tmp_dh parameters */
-#define SSL_OP_SINGLE_DH_USE                           0x00100000L
-/* Set to always use the tmp_rsa key when doing RSA operations,
- * even when this violates protocol specs */
-#define SSL_OP_EPHEMERAL_RSA                           0x00200000L
-/* Set on servers to choose the cipher according to the server's
- * preferences */
-#define SSL_OP_CIPHER_SERVER_PREFERENCE                        0x00400000L
-/* If set, a server will allow a client to issue a SSLv3.0 version number
- * as latest version supported in the premaster secret, even when TLSv1.0
- * (version 3.1) was announced in the client hello. Normally this is
- * forbidden to prevent version rollback attacks. */
-#define SSL_OP_TLS_ROLLBACK_BUG                                0x00800000L
-
-#define SSL_OP_NO_SSLv2                                        0x01000000L
-#define SSL_OP_NO_SSLv3                                        0x02000000L
-#define SSL_OP_NO_TLSv1                                        0x04000000L
-
-/* The next flag deliberately changes the ciphertest, this is a check
- * for the PKCS#1 attack */
-#define SSL_OP_PKCS1_CHECK_1                           0x08000000L
-#define SSL_OP_PKCS1_CHECK_2                           0x10000000L
-#define SSL_OP_NETSCAPE_CA_DN_BUG                      0x20000000L
-#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG         0x40000000L
-/* Make server add server-hello extension from early version of
- * cryptopro draft, when GOST ciphersuite is negotiated. 
- * Required for interoperability with CryptoPro CSP 3.x 
- */
-#define SSL_OP_CRYPTOPRO_TLSEXT_BUG                    0x80000000L
-
-/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success
- * when just a single record has been written): */
-#define SSL_MODE_ENABLE_PARTIAL_WRITE       0x00000001L
-/* Make it possible to retry SSL_write() with changed buffer location
- * (buffer contents must stay the same!); this is not the default to avoid
- * the misconception that non-blocking SSL_write() behaves like
- * non-blocking write(): */
-#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
-/* Never bother the application with retries if the transport
- * is blocking: */
-#define SSL_MODE_AUTO_RETRY 0x00000004L
-/* Don't attempt to automatically build certificate chain */
-#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L
-/* Save RAM by releasing read and write buffers when they're empty. (SSL3 and
- * TLS only.)  "Released" buffers are put onto a free-list in the context
- * or just freed (depending on the context's setting for freelist_max_len). */
-#define SSL_MODE_RELEASE_BUFFERS 0x00000010L
-
-/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
- * they cannot be used to clear bits. */
-
-#define SSL_CTX_set_options(ctx,op) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
-#define SSL_CTX_clear_options(ctx,op) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)
-#define SSL_CTX_get_options(ctx) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)
-#define SSL_set_options(ssl,op) \
-       SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL)
-#define SSL_clear_options(ssl,op) \
-       SSL_ctrl((ssl),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)
-#define SSL_get_options(ssl) \
-        SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL)
-
-#define SSL_CTX_set_mode(ctx,op) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
-#define SSL_CTX_clear_mode(ctx,op) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL)
-#define SSL_CTX_get_mode(ctx) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)
-#define SSL_clear_mode(ssl,op) \
-       SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL)
-#define SSL_set_mode(ssl,op) \
-       SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)
-#define SSL_get_mode(ssl) \
-        SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
-#define SSL_set_mtu(ssl, mtu) \
-        SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)
-
-#define SSL_get_secure_renegotiation_support(ssl) \
-       SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL)
-
-void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
-void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
-#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
-#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
-
-
-
-#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
-#define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */
-#else
-#define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */
-#endif
-
-#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT     (1024*20)
-
-/* This callback type is used inside SSL_CTX, SSL, and in the functions that set
- * them. It is used to override the generation of SSL/TLS session IDs in a
- * server. Return value should be zero on an error, non-zero to proceed. Also,
- * callbacks should themselves check if the id they generate is unique otherwise
- * the SSL handshake will fail with an error - callbacks can do this using the
- * 'ssl' value they're passed by;
- *      SSL_has_matching_session_id(ssl, id, *id_len)
- * The length value passed in is set at the maximum size the session ID can be.
- * In SSLv2 this is 16 bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback
- * can alter this length to be less if desired, but under SSLv2 session IDs are
- * supposed to be fixed at 16 bytes so the id will be padded after the callback
- * returns in this case. It is also an error for the callback to set the size to
- * zero. */
-typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id,
-                               unsigned int *id_len);
-
-typedef struct ssl_comp_st
-       {
-       int id;
-       const char *name;
-#ifndef OPENSSL_NO_COMP
-       COMP_METHOD *method;
-#else
-       char *method;
-#endif
-       } SSL_COMP;
-
-DECLARE_STACK_OF(SSL_COMP)
-DECLARE_LHASH_OF(SSL_SESSION);
-
-struct ssl_ctx_st
-       {
-       const SSL_METHOD *method;
-
-       STACK_OF(SSL_CIPHER) *cipher_list;
-       /* same as above but sorted for lookup */
-       STACK_OF(SSL_CIPHER) *cipher_list_by_id;
-
-       struct x509_store_st /* X509_STORE */ *cert_store;
-       LHASH_OF(SSL_SESSION) *sessions;
-       /* Most session-ids that will be cached, default is
-        * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. */
-       unsigned long session_cache_size;
-       struct ssl_session_st *session_cache_head;
-       struct ssl_session_st *session_cache_tail;
-
-       /* This can have one of 2 values, ored together,
-        * SSL_SESS_CACHE_CLIENT,
-        * SSL_SESS_CACHE_SERVER,
-        * Default is SSL_SESSION_CACHE_SERVER, which means only
-        * SSL_accept which cache SSL_SESSIONS. */
-       int session_cache_mode;
-
-       /* If timeout is not 0, it is the default timeout value set
-        * when SSL_new() is called.  This has been put in to make
-        * life easier to set things up */
-       long session_timeout;
-
-       /* If this callback is not null, it will be called each
-        * time a session id is added to the cache.  If this function
-        * returns 1, it means that the callback will do a
-        * SSL_SESSION_free() when it has finished using it.  Otherwise,
-        * on 0, it means the callback has finished with it.
-        * If remove_session_cb is not null, it will be called when
-        * a session-id is removed from the cache.  After the call,
-        * OpenSSL will SSL_SESSION_free() it. */
-       int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess);
-       void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess);
-       SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl,
-               unsigned char *data,int len,int *copy);
-
-       struct
-               {
-               int sess_connect;       /* SSL new conn - started */
-               int sess_connect_renegotiate;/* SSL reneg - requested */
-               int sess_connect_good;  /* SSL new conne/reneg - finished */
-               int sess_accept;        /* SSL new accept - started */
-               int sess_accept_renegotiate;/* SSL reneg - requested */
-               int sess_accept_good;   /* SSL accept/reneg - finished */
-               int sess_miss;          /* session lookup misses  */
-               int sess_timeout;       /* reuse attempt on timeouted session */
-               int sess_cache_full;    /* session removed due to full cache */
-               int sess_hit;           /* session reuse actually done */
-               int sess_cb_hit;        /* session-id that was not
-                                        * in the cache was
-                                        * passed back via the callback.  This
-                                        * indicates that the application is
-                                        * supplying session-id's from other
-                                        * processes - spooky :-) */
-               } stats;
-
-       int references;
-
-       /* if defined, these override the X509_verify_cert() calls */
-       int (*app_verify_callback)(X509_STORE_CTX *, void *);
-       void *app_verify_arg;
-       /* before OpenSSL 0.9.7, 'app_verify_arg' was ignored
-        * ('app_verify_callback' was called with just one argument) */
-
-       /* Default password callback. */
-       pem_password_cb *default_passwd_callback;
-
-       /* Default password callback user data. */
-       void *default_passwd_callback_userdata;
-
-       /* get client cert callback */
-       int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
-
-    /* cookie generate callback */
-    int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, 
-        unsigned int *cookie_len);
-
-    /* verify cookie callback */
-    int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, 
-        unsigned int cookie_len);
-
-       CRYPTO_EX_DATA ex_data;
-
-       const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */
-       const EVP_MD *md5;      /* For SSLv3/TLSv1 'ssl3-md5' */
-       const EVP_MD *sha1;   /* For SSLv3/TLSv1 'ssl3->sha1' */
-
-       STACK_OF(X509) *extra_certs;
-       STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */
-
-
-       /* Default values used when no per-SSL value is defined follow */
-
-       void (*info_callback)(const SSL *ssl,int type,int val); /* used if SSL's info_callback is NULL */
-
-       /* what we put in client cert requests */
-       STACK_OF(X509_NAME) *client_CA;
-
-
-       /* Default values to use in SSL structures follow (these are copied by SSL_new) */
-
-       unsigned long options;
-       unsigned long mode;
-       long max_cert_list;
-
-       struct cert_st /* CERT */ *cert;
-       int read_ahead;
-
-       /* callback that allows applications to peek at protocol messages */
-       void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
-       void *msg_callback_arg;
-
-       int verify_mode;
-       unsigned int sid_ctx_length;
-       unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-       int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
-
-       /* Default generate session ID callback. */
-       GEN_SESSION_CB generate_session_id;
-
-       X509_VERIFY_PARAM *param;
-
-#if 0
-       int purpose;            /* Purpose setting */
-       int trust;              /* Trust setting */
-#endif
-
-       int quiet_shutdown;
-
-       /* Maximum amount of data to send in one fragment.
-        * actual record size can be more than this due to
-        * padding and MAC overheads.
-        */
-       unsigned int max_send_fragment;
-
-#ifndef OPENSSL_ENGINE
-       /* Engine to pass requests for client certs to
-        */
-       ENGINE *client_cert_engine;
-#endif
-
-#ifndef OPENSSL_NO_TLSEXT
-       /* TLS extensions servername callback */
-       int (*tlsext_servername_callback)(SSL*, int *, void *);
-       void *tlsext_servername_arg;
-       /* RFC 4507 session ticket keys */
-       unsigned char tlsext_tick_key_name[16];
-       unsigned char tlsext_tick_hmac_key[16];
-       unsigned char tlsext_tick_aes_key[16];
-       /* Callback to support customisation of ticket key setting */
-       int (*tlsext_ticket_key_cb)(SSL *ssl,
-                                       unsigned char *name, unsigned char *iv,
-                                       EVP_CIPHER_CTX *ectx,
-                                       HMAC_CTX *hctx, int enc);
-
-       /* certificate status request info */
-       /* Callback for status request */
-       int (*tlsext_status_cb)(SSL *ssl, void *arg);
-       void *tlsext_status_arg;
-
-       /* draft-rescorla-tls-opaque-prf-input-00.txt information */
-       int (*tlsext_opaque_prf_input_callback)(SSL *, void *peerinput, size_t len, void *arg);
-       void *tlsext_opaque_prf_input_callback_arg;
-#endif
-
-#ifndef OPENSSL_NO_PSK
-       char *psk_identity_hint;
-       unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, char *identity,
-               unsigned int max_identity_len, unsigned char *psk,
-               unsigned int max_psk_len);
-       unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-               unsigned char *psk, unsigned int max_psk_len);
-#endif
-
-#ifndef OPENSSL_NO_BUF_FREELISTS
-#define SSL_MAX_BUF_FREELIST_LEN_DEFAULT 32
-       unsigned int freelist_max_len;
-       struct ssl3_buf_freelist_st *wbuf_freelist;
-       struct ssl3_buf_freelist_st *rbuf_freelist;
-#endif
-       };
-
-#define SSL_SESS_CACHE_OFF                     0x0000
-#define SSL_SESS_CACHE_CLIENT                  0x0001
-#define SSL_SESS_CACHE_SERVER                  0x0002
-#define SSL_SESS_CACHE_BOTH    (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER)
-#define SSL_SESS_CACHE_NO_AUTO_CLEAR           0x0080
-/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */
-#define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP      0x0100
-#define SSL_SESS_CACHE_NO_INTERNAL_STORE       0x0200
-#define SSL_SESS_CACHE_NO_INTERNAL \
-       (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE)
-
-LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx);
-#define SSL_CTX_sess_number(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)
-#define SSL_CTX_sess_connect(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)
-#define SSL_CTX_sess_connect_good(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)
-#define SSL_CTX_sess_connect_renegotiate(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)
-#define SSL_CTX_sess_accept(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)
-#define SSL_CTX_sess_accept_renegotiate(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)
-#define SSL_CTX_sess_accept_good(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)
-#define SSL_CTX_sess_hits(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)
-#define SSL_CTX_sess_cb_hits(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)
-#define SSL_CTX_sess_misses(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)
-#define SSL_CTX_sess_timeouts(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)
-#define SSL_CTX_sess_cache_full(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
-
-void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess));
-int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess);
-void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess));
-void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
-void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy));
-SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *Data, int len, int *copy);
-void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,int val));
-void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val);
-void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
-int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
-#ifndef OPENSSL_NO_ENGINE
-int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e);
-#endif
-void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len));
-void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len));
-
-#ifndef OPENSSL_NO_PSK
-/* the maximum length of the buffer given to callbacks containing the
- * resulting identity/psk */
-#define PSK_MAX_IDENTITY_LEN 128
-#define PSK_MAX_PSK_LEN 256
-void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, 
-       unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, 
-               char *identity, unsigned int max_identity_len, unsigned char *psk,
-               unsigned int max_psk_len));
-void SSL_set_psk_client_callback(SSL *ssl, 
-       unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, 
-               char *identity, unsigned int max_identity_len, unsigned char *psk,
-               unsigned int max_psk_len));
-void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, 
-       unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-               unsigned char *psk, unsigned int max_psk_len));
-void SSL_set_psk_server_callback(SSL *ssl,
-       unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-               unsigned char *psk, unsigned int max_psk_len));
-int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint);
-int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint);
-const char *SSL_get_psk_identity_hint(const SSL *s);
-const char *SSL_get_psk_identity(const SSL *s);
-#endif
-
-#define SSL_NOTHING    1
-#define SSL_WRITING    2
-#define SSL_READING    3
-#define SSL_X509_LOOKUP        4
-
-/* These will only be used when doing non-blocking IO */
-#define SSL_want_nothing(s)    (SSL_want(s) == SSL_NOTHING)
-#define SSL_want_read(s)       (SSL_want(s) == SSL_READING)
-#define SSL_want_write(s)      (SSL_want(s) == SSL_WRITING)
-#define SSL_want_x509_lookup(s)        (SSL_want(s) == SSL_X509_LOOKUP)
-
-#define SSL_MAC_FLAG_READ_MAC_STREAM 1
-#define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
-
-struct ssl_st
-       {
-       /* protocol version
-        * (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION)
-        */
-       int version;
-       int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
-
-       const SSL_METHOD *method; /* SSLv3 */
-
-       /* There are 2 BIO's even though they are normally both the
-        * same.  This is so data can be read and written to different
-        * handlers */
-
-#ifndef OPENSSL_NO_BIO
-       BIO *rbio; /* used by SSL_read */
-       BIO *wbio; /* used by SSL_write */
-       BIO *bbio; /* used during session-id reuse to concatenate
-                   * messages */
-#else
-       char *rbio; /* used by SSL_read */
-       char *wbio; /* used by SSL_write */
-       char *bbio;
-#endif
-       /* This holds a variable that indicates what we were doing
-        * when a 0 or -1 is returned.  This is needed for
-        * non-blocking IO so we know what request needs re-doing when
-        * in SSL_accept or SSL_connect */
-       int rwstate;
-
-       /* true when we are actually in SSL_accept() or SSL_connect() */
-       int in_handshake;
-       int (*handshake_func)(SSL *);
-
-       /* Imagine that here's a boolean member "init" that is
-        * switched as soon as SSL_set_{accept/connect}_state
-        * is called for the first time, so that "state" and
-        * "handshake_func" are properly initialized.  But as
-        * handshake_func is == 0 until then, we use this
-        * test instead of an "init" member.
-        */
-
-       int server;     /* are we the server side? - mostly used by SSL_clear*/
-
-       int new_session;/* 1 if we are to use a new session.
-                        * 2 if we are a server and are inside a handshake
-                        *   (i.e. not just sending a HelloRequest)
-                        * NB: For servers, the 'new' session may actually be a previously
-                        * cached session or even the previous session unless
-                        * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
-       int quiet_shutdown;/* don't send shutdown packets */
-       int shutdown;   /* we have shut things down, 0x01 sent, 0x02
-                        * for received */
-       int state;      /* where we are */
-       int rstate;     /* where we are when reading */
-
-       BUF_MEM *init_buf;      /* buffer used during init */
-       void *init_msg;         /* pointer to handshake message body, set by ssl3_get_message() */
-       int init_num;           /* amount read/written */
-       int init_off;           /* amount read/written */
-
-       /* used internally to point at a raw packet */
-       unsigned char *packet;
-       unsigned int packet_length;
-
-       struct ssl2_state_st *s2; /* SSLv2 variables */
-       struct ssl3_state_st *s3; /* SSLv3 variables */
-       struct dtls1_state_st *d1; /* DTLSv1 variables */
-
-       int read_ahead;         /* Read as many input bytes as possible
-                                * (for non-blocking reads) */
-
-       /* callback that allows applications to peek at protocol messages */
-       void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
-       void *msg_callback_arg;
-
-       int hit;                /* reusing a previous session */
-
-       X509_VERIFY_PARAM *param;
-
-#if 0
-       int purpose;            /* Purpose setting */
-       int trust;              /* Trust setting */
-#endif
-
-       /* crypto */
-       STACK_OF(SSL_CIPHER) *cipher_list;
-       STACK_OF(SSL_CIPHER) *cipher_list_by_id;
-
-       /* These are the ones being used, the ones in SSL_SESSION are
-        * the ones to be 'copied' into these ones */
-       int mac_flags; 
-       EVP_CIPHER_CTX *enc_read_ctx;           /* cryptographic state */
-       EVP_MD_CTX *read_hash;          /* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-       COMP_CTX *expand;                       /* uncompress */
-#else
-       char *expand;
-#endif
-
-       EVP_CIPHER_CTX *enc_write_ctx;          /* cryptographic state */
-       EVP_MD_CTX *write_hash;         /* used for mac generation */
-#ifndef OPENSSL_NO_COMP
-       COMP_CTX *compress;                     /* compression */
-#else
-       char *compress; 
-#endif
-
-       /* session info */
-
-       /* client cert? */
-       /* This is used to hold the server certificate used */
-       struct cert_st /* CERT */ *cert;
-
-       /* the session_id_context is used to ensure sessions are only reused
-        * in the appropriate context */
-       unsigned int sid_ctx_length;
-       unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
-
-       /* This can also be in the session once a session is established */
-       SSL_SESSION *session;
-
-       /* Default generate session ID callback. */
-       GEN_SESSION_CB generate_session_id;
-
-       /* Used in SSL2 and SSL3 */
-       int verify_mode;        /* 0 don't care about verify failure.
-                                * 1 fail if verify fails */
-       int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
-
-       void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */
-
-       int error;              /* error bytes to be written */
-       int error_code;         /* actual code */
-
-#ifndef OPENSSL_NO_KRB5
-       KSSL_CTX *kssl_ctx;     /* Kerberos 5 context */
-#endif /* OPENSSL_NO_KRB5 */
-
-#ifndef OPENSSL_NO_PSK
-       unsigned int (*psk_client_callback)(SSL *ssl, const char *hint, char *identity,
-               unsigned int max_identity_len, unsigned char *psk,
-               unsigned int max_psk_len);
-       unsigned int (*psk_server_callback)(SSL *ssl, const char *identity,
-               unsigned char *psk, unsigned int max_psk_len);
-#endif
-
-       SSL_CTX *ctx;
-       /* set this flag to 1 and a sleep(1) is put into all SSL_read()
-        * and SSL_write() calls, good for nbio debuging :-) */
-       int debug;      
-
-       /* extra application data */
-       long verify_result;
-       CRYPTO_EX_DATA ex_data;
-
-       /* for server side, keep the list of CA_dn we can use */
-       STACK_OF(X509_NAME) *client_CA;
-
-       int references;
-       unsigned long options; /* protocol behaviour */
-       unsigned long mode; /* API behaviour */
-       long max_cert_list;
-       int first_packet;
-       int client_version;     /* what was passed, used for
-                                * SSLv3/TLS rollback check */
-       unsigned int max_send_fragment;
-#ifndef OPENSSL_NO_TLSEXT
-       /* TLS extension debug callback */
-       void (*tlsext_debug_cb)(SSL *s, int client_server, int type,
-                                       unsigned char *data, int len,
-                                       void *arg);
-       void *tlsext_debug_arg;
-       char *tlsext_hostname;
-       int servername_done;   /* no further mod of servername 
-                                 0 : call the servername extension callback.
-                                 1 : prepare 2, allow last ack just after in server callback.
-                                 2 : don't call servername callback, no ack in server hello
-                              */
-       /* certificate status request info */
-       /* Status type or -1 if no status type */
-       int tlsext_status_type;
-       /* Expect OCSP CertificateStatus message */
-       int tlsext_status_expected;
-       /* OCSP status request only */
-       STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids;
-       X509_EXTENSIONS *tlsext_ocsp_exts;
-       /* OCSP response received or to be sent */
-       unsigned char *tlsext_ocsp_resp;
-       int tlsext_ocsp_resplen;
-
-       /* RFC4507 session ticket expected to be received or sent */
-       int tlsext_ticket_expected;
-#ifndef OPENSSL_NO_EC
-       size_t tlsext_ecpointformatlist_length;
-       unsigned char *tlsext_ecpointformatlist; /* our list */
-       size_t tlsext_ellipticcurvelist_length;
-       unsigned char *tlsext_ellipticcurvelist; /* our list */
-#endif /* OPENSSL_NO_EC */
-
-       /* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */
-       void *tlsext_opaque_prf_input;
-       size_t tlsext_opaque_prf_input_len;
-
-       /* TLS Session Ticket extension override */
-       TLS_SESSION_TICKET_EXT *tlsext_session_ticket;
-
-       /* TLS Session Ticket extension callback */
-       tls_session_ticket_ext_cb_fn tls_session_ticket_ext_cb;
-       void *tls_session_ticket_ext_cb_arg;
-
-       /* TLS pre-shared secret session resumption */
-       tls_session_secret_cb_fn tls_session_secret_cb;
-       void *tls_session_secret_cb_arg;
-
-       SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */
-#define session_ctx initial_ctx
-#else
-#define session_ctx ctx
-#endif /* OPENSSL_NO_TLSEXT */
-       };
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <openssl/ssl2.h>
-#include <openssl/ssl3.h>
-#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
-#include <openssl/dtls1.h> /* Datagram TLS */
-#include <openssl/ssl23.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* compatibility */
-#define SSL_set_app_data(s,arg)                (SSL_set_ex_data(s,0,(char *)arg))
-#define SSL_get_app_data(s)            (SSL_get_ex_data(s,0))
-#define SSL_SESSION_set_app_data(s,a)  (SSL_SESSION_set_ex_data(s,0,(char *)a))
-#define SSL_SESSION_get_app_data(s)    (SSL_SESSION_get_ex_data(s,0))
-#define SSL_CTX_get_app_data(ctx)      (SSL_CTX_get_ex_data(ctx,0))
-#define SSL_CTX_set_app_data(ctx,arg)  (SSL_CTX_set_ex_data(ctx,0,(char *)arg))
-
-/* The following are the possible values for ssl->state are are
- * used to indicate where we are up to in the SSL connection establishment.
- * The macros that follow are about the only things you should need to use
- * and even then, only when using non-blocking IO.
- * It can also be useful to work out where you were when the connection
- * failed */
-
-#define SSL_ST_CONNECT                 0x1000
-#define SSL_ST_ACCEPT                  0x2000
-#define SSL_ST_MASK                    0x0FFF
-#define SSL_ST_INIT                    (SSL_ST_CONNECT|SSL_ST_ACCEPT)
-#define SSL_ST_BEFORE                  0x4000
-#define SSL_ST_OK                      0x03
-#define SSL_ST_RENEGOTIATE             (0x04|SSL_ST_INIT)
-
-#define SSL_CB_LOOP                    0x01
-#define SSL_CB_EXIT                    0x02
-#define SSL_CB_READ                    0x04
-#define SSL_CB_WRITE                   0x08
-#define SSL_CB_ALERT                   0x4000 /* used in callback */
-#define SSL_CB_READ_ALERT              (SSL_CB_ALERT|SSL_CB_READ)
-#define SSL_CB_WRITE_ALERT             (SSL_CB_ALERT|SSL_CB_WRITE)
-#define SSL_CB_ACCEPT_LOOP             (SSL_ST_ACCEPT|SSL_CB_LOOP)
-#define SSL_CB_ACCEPT_EXIT             (SSL_ST_ACCEPT|SSL_CB_EXIT)
-#define SSL_CB_CONNECT_LOOP            (SSL_ST_CONNECT|SSL_CB_LOOP)
-#define SSL_CB_CONNECT_EXIT            (SSL_ST_CONNECT|SSL_CB_EXIT)
-#define SSL_CB_HANDSHAKE_START         0x10
-#define SSL_CB_HANDSHAKE_DONE          0x20
-
-/* Is the SSL_connection established? */
-#define SSL_get_state(a)               SSL_state(a)
-#define SSL_is_init_finished(a)                (SSL_state(a) == SSL_ST_OK)
-#define SSL_in_init(a)                 (SSL_state(a)&SSL_ST_INIT)
-#define SSL_in_before(a)               (SSL_state(a)&SSL_ST_BEFORE)
-#define SSL_in_connect_init(a)         (SSL_state(a)&SSL_ST_CONNECT)
-#define SSL_in_accept_init(a)          (SSL_state(a)&SSL_ST_ACCEPT)
-
-/* The following 2 states are kept in ssl->rstate when reads fail,
- * you should not need these */
-#define SSL_ST_READ_HEADER                     0xF0
-#define SSL_ST_READ_BODY                       0xF1
-#define SSL_ST_READ_DONE                       0xF2
-
-/* Obtain latest Finished message
- *   -- that we sent (SSL_get_finished)
- *   -- that we expected from peer (SSL_get_peer_finished).
- * Returns length (0 == no Finished so far), copies up to 'count' bytes. */
-size_t SSL_get_finished(const SSL *s, void *buf, size_t count);
-size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
-
-/* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
- * are 'ored' with SSL_VERIFY_PEER if they are desired */
-#define SSL_VERIFY_NONE                        0x00
-#define SSL_VERIFY_PEER                        0x01
-#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT        0x02
-#define SSL_VERIFY_CLIENT_ONCE         0x04
-
-#define OpenSSL_add_ssl_algorithms()   SSL_library_init()
-#define SSLeay_add_ssl_algorithms()    SSL_library_init()
-
-/* this is for backward compatibility */
-#if 0 /* NEW_SSLEAY */
-#define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)
-#define SSL_set_pref_cipher(c,n)       SSL_set_cipher_list(c,n)
-#define SSL_add_session(a,b)            SSL_CTX_add_session((a),(b))
-#define SSL_remove_session(a,b)                SSL_CTX_remove_session((a),(b))
-#define SSL_flush_sessions(a,b)                SSL_CTX_flush_sessions((a),(b))
-#endif
-/* More backward compatibility */
-#define SSL_get_cipher(s) \
-               SSL_CIPHER_get_name(SSL_get_current_cipher(s))
-#define SSL_get_cipher_bits(s,np) \
-               SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
-#define SSL_get_cipher_version(s) \
-               SSL_CIPHER_get_version(SSL_get_current_cipher(s))
-#define SSL_get_cipher_name(s) \
-               SSL_CIPHER_get_name(SSL_get_current_cipher(s))
-#define SSL_get_time(a)                SSL_SESSION_get_time(a)
-#define SSL_set_time(a,b)      SSL_SESSION_set_time((a),(b))
-#define SSL_get_timeout(a)     SSL_SESSION_get_timeout(a)
-#define SSL_set_timeout(a,b)   SSL_SESSION_set_timeout((a),(b))
-
-#define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id)
-#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id)
-
-DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
-
-#define SSL_AD_REASON_OFFSET           1000 /* offset to get SSL_R_... value from SSL_AD_... */
-
-/* These alert types are for SSLv3 and TLSv1 */
-#define SSL_AD_CLOSE_NOTIFY            SSL3_AD_CLOSE_NOTIFY
-#define SSL_AD_UNEXPECTED_MESSAGE      SSL3_AD_UNEXPECTED_MESSAGE /* fatal */
-#define SSL_AD_BAD_RECORD_MAC          SSL3_AD_BAD_RECORD_MAC     /* fatal */
-#define SSL_AD_DECRYPTION_FAILED       TLS1_AD_DECRYPTION_FAILED
-#define SSL_AD_RECORD_OVERFLOW         TLS1_AD_RECORD_OVERFLOW
-#define SSL_AD_DECOMPRESSION_FAILURE   SSL3_AD_DECOMPRESSION_FAILURE/* fatal */
-#define SSL_AD_HANDSHAKE_FAILURE       SSL3_AD_HANDSHAKE_FAILURE/* fatal */
-#define SSL_AD_NO_CERTIFICATE          SSL3_AD_NO_CERTIFICATE /* Not for TLS */
-#define SSL_AD_BAD_CERTIFICATE         SSL3_AD_BAD_CERTIFICATE
-#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
-#define SSL_AD_CERTIFICATE_REVOKED     SSL3_AD_CERTIFICATE_REVOKED
-#define SSL_AD_CERTIFICATE_EXPIRED     SSL3_AD_CERTIFICATE_EXPIRED
-#define SSL_AD_CERTIFICATE_UNKNOWN     SSL3_AD_CERTIFICATE_UNKNOWN
-#define SSL_AD_ILLEGAL_PARAMETER       SSL3_AD_ILLEGAL_PARAMETER   /* fatal */
-#define SSL_AD_UNKNOWN_CA              TLS1_AD_UNKNOWN_CA      /* fatal */
-#define SSL_AD_ACCESS_DENIED           TLS1_AD_ACCESS_DENIED   /* fatal */
-#define SSL_AD_DECODE_ERROR            TLS1_AD_DECODE_ERROR    /* fatal */
-#define SSL_AD_DECRYPT_ERROR           TLS1_AD_DECRYPT_ERROR
-#define SSL_AD_EXPORT_RESTRICTION      TLS1_AD_EXPORT_RESTRICTION/* fatal */
-#define SSL_AD_PROTOCOL_VERSION                TLS1_AD_PROTOCOL_VERSION /* fatal */
-#define SSL_AD_INSUFFICIENT_SECURITY   TLS1_AD_INSUFFICIENT_SECURITY/* fatal */
-#define SSL_AD_INTERNAL_ERROR          TLS1_AD_INTERNAL_ERROR  /* fatal */
-#define SSL_AD_USER_CANCELLED          TLS1_AD_USER_CANCELLED
-#define SSL_AD_NO_RENEGOTIATION                TLS1_AD_NO_RENEGOTIATION
-#define SSL_AD_UNSUPPORTED_EXTENSION   TLS1_AD_UNSUPPORTED_EXTENSION
-#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
-#define SSL_AD_UNRECOGNIZED_NAME       TLS1_AD_UNRECOGNIZED_NAME
-#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
-#define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
-#define SSL_AD_UNKNOWN_PSK_IDENTITY     TLS1_AD_UNKNOWN_PSK_IDENTITY /* fatal */
-
-#define SSL_ERROR_NONE                 0
-#define SSL_ERROR_SSL                  1
-#define SSL_ERROR_WANT_READ            2
-#define SSL_ERROR_WANT_WRITE           3
-#define SSL_ERROR_WANT_X509_LOOKUP     4
-#define SSL_ERROR_SYSCALL              5 /* look at error stack/return value/errno */
-#define SSL_ERROR_ZERO_RETURN          6
-#define SSL_ERROR_WANT_CONNECT         7
-#define SSL_ERROR_WANT_ACCEPT          8
-
-#define SSL_CTRL_NEED_TMP_RSA                  1
-#define SSL_CTRL_SET_TMP_RSA                   2
-#define SSL_CTRL_SET_TMP_DH                    3
-#define SSL_CTRL_SET_TMP_ECDH                  4
-#define SSL_CTRL_SET_TMP_RSA_CB                        5
-#define SSL_CTRL_SET_TMP_DH_CB                 6
-#define SSL_CTRL_SET_TMP_ECDH_CB               7
-
-#define SSL_CTRL_GET_SESSION_REUSED            8
-#define SSL_CTRL_GET_CLIENT_CERT_REQUEST       9
-#define SSL_CTRL_GET_NUM_RENEGOTIATIONS                10
-#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS      11
-#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS      12
-#define SSL_CTRL_GET_FLAGS                     13
-#define SSL_CTRL_EXTRA_CHAIN_CERT              14
-
-#define SSL_CTRL_SET_MSG_CALLBACK               15
-#define SSL_CTRL_SET_MSG_CALLBACK_ARG           16
-
-/* only applies to datagram connections */
-#define SSL_CTRL_SET_MTU                17
-/* Stats */
-#define SSL_CTRL_SESS_NUMBER                   20
-#define SSL_CTRL_SESS_CONNECT                  21
-#define SSL_CTRL_SESS_CONNECT_GOOD             22
-#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE      23
-#define SSL_CTRL_SESS_ACCEPT                   24
-#define SSL_CTRL_SESS_ACCEPT_GOOD              25
-#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE       26
-#define SSL_CTRL_SESS_HIT                      27
-#define SSL_CTRL_SESS_CB_HIT                   28
-#define SSL_CTRL_SESS_MISSES                   29
-#define SSL_CTRL_SESS_TIMEOUTS                 30
-#define SSL_CTRL_SESS_CACHE_FULL               31
-#define SSL_CTRL_OPTIONS                       32
-#define SSL_CTRL_MODE                          33
-
-#define SSL_CTRL_GET_READ_AHEAD                        40
-#define SSL_CTRL_SET_READ_AHEAD                        41
-#define SSL_CTRL_SET_SESS_CACHE_SIZE           42
-#define SSL_CTRL_GET_SESS_CACHE_SIZE           43
-#define SSL_CTRL_SET_SESS_CACHE_MODE           44
-#define SSL_CTRL_GET_SESS_CACHE_MODE           45
-
-#define SSL_CTRL_GET_MAX_CERT_LIST             50
-#define SSL_CTRL_SET_MAX_CERT_LIST             51
-
-#define SSL_CTRL_SET_MAX_SEND_FRAGMENT         52
-
-/* see tls1.h for macros based on these */
-#ifndef OPENSSL_NO_TLSEXT
-#define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB      53
-#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG     54
-#define SSL_CTRL_SET_TLSEXT_HOSTNAME           55
-#define SSL_CTRL_SET_TLSEXT_DEBUG_CB           56
-#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG          57
-#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS                58
-#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS                59
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT   60
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB        61
-#define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB      63
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG  64
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE    65
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS    66
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS    67
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS     68
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS     69
-#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP       70
-#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP       71
-
-#define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB      72
-#endif
-
-#define DTLS_CTRL_GET_TIMEOUT          73
-#define DTLS_CTRL_HANDLE_TIMEOUT       74
-#define DTLS_CTRL_LISTEN                       75
-
-#define SSL_CTRL_GET_RI_SUPPORT                        76
-#define SSL_CTRL_CLEAR_OPTIONS                 77
-#define SSL_CTRL_CLEAR_MODE                    78
-
-#define DTLSv1_get_timeout(ssl, arg) \
-       SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)
-#define DTLSv1_handle_timeout(ssl) \
-       SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL)
-#define DTLSv1_listen(ssl, peer) \
-       SSL_ctrl(ssl,DTLS_CTRL_LISTEN,0, (void *)peer)
-
-#define SSL_session_reused(ssl) \
-       SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)
-#define SSL_num_renegotiations(ssl) \
-       SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL)
-#define SSL_clear_num_renegotiations(ssl) \
-       SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL)
-#define SSL_total_renegotiations(ssl) \
-       SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL)
-
-#define SSL_CTX_need_tmp_RSA(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)
-#define SSL_CTX_set_tmp_rsa(ctx,rsa) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
-#define SSL_CTX_set_tmp_dh(ctx,dh) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
-#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
-
-#define SSL_need_tmp_RSA(ssl) \
-       SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)
-#define SSL_set_tmp_rsa(ssl,rsa) \
-       SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
-#define SSL_set_tmp_dh(ssl,dh) \
-       SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
-#define SSL_set_tmp_ecdh(ssl,ecdh) \
-       SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
-
-#define SSL_CTX_add_extra_chain_cert(ctx,x509) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
-
-#ifndef OPENSSL_NO_BIO
-BIO_METHOD *BIO_f_ssl(void);
-BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
-BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
-BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
-int BIO_ssl_copy_session_id(BIO *to,BIO *from);
-void BIO_ssl_shutdown(BIO *ssl_bio);
-
-#endif
-
-int    SSL_CTX_set_cipher_list(SSL_CTX *,const char *str);
-SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
-void   SSL_CTX_free(SSL_CTX *);
-long SSL_CTX_set_timeout(SSL_CTX *ctx,long t);
-long SSL_CTX_get_timeout(const SSL_CTX *ctx);
-X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);
-void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *);
-int SSL_want(const SSL *s);
-int    SSL_clear(SSL *s);
-
-void   SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm);
-
-const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
-int    SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits);
-char * SSL_CIPHER_get_version(const SSL_CIPHER *c);
-const char *   SSL_CIPHER_get_name(const SSL_CIPHER *c);
-
-int    SSL_get_fd(const SSL *s);
-int    SSL_get_rfd(const SSL *s);
-int    SSL_get_wfd(const SSL *s);
-const char  * SSL_get_cipher_list(const SSL *s,int n);
-char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len);
-int    SSL_get_read_ahead(const SSL * s);
-int    SSL_pending(const SSL *s);
-#ifndef OPENSSL_NO_SOCK
-int    SSL_set_fd(SSL *s, int fd);
-int    SSL_set_rfd(SSL *s, int fd);
-int    SSL_set_wfd(SSL *s, int fd);
-#endif
-#ifndef OPENSSL_NO_BIO
-void   SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio);
-BIO *  SSL_get_rbio(const SSL *s);
-BIO *  SSL_get_wbio(const SSL *s);
-#endif
-int    SSL_set_cipher_list(SSL *s, const char *str);
-void   SSL_set_read_ahead(SSL *s, int yes);
-int    SSL_get_verify_mode(const SSL *s);
-int    SSL_get_verify_depth(const SSL *s);
-int    (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *);
-void   SSL_set_verify(SSL *s, int mode,
-                      int (*callback)(int ok,X509_STORE_CTX *ctx));
-void   SSL_set_verify_depth(SSL *s, int depth);
-#ifndef OPENSSL_NO_RSA
-int    SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
-#endif
-int    SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);
-int    SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
-int    SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len);
-int    SSL_use_certificate(SSL *ssl, X509 *x);
-int    SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
-
-#ifndef OPENSSL_NO_STDIO
-int    SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
-int    SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
-int    SSL_use_certificate_file(SSL *ssl, const char *file, int type);
-int    SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
-int    SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
-int    SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
-int    SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
-STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
-int    SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
-                                           const char *file);
-#ifndef OPENSSL_SYS_VMS
-#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
-int    SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
-                                          const char *dir);
-#endif
-#endif
-
-#endif
-
-void   SSL_load_error_strings(void );
-const char *SSL_state_string(const SSL *s);
-const char *SSL_rstate_string(const SSL *s);
-const char *SSL_state_string_long(const SSL *s);
-const char *SSL_rstate_string_long(const SSL *s);
-long   SSL_SESSION_get_time(const SSL_SESSION *s);
-long   SSL_SESSION_set_time(SSL_SESSION *s, long t);
-long   SSL_SESSION_get_timeout(const SSL_SESSION *s);
-long   SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
-void   SSL_copy_session_id(SSL *to,const SSL *from);
-
-SSL_SESSION *SSL_SESSION_new(void);
-const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
-                                       unsigned int *len);
-#ifndef OPENSSL_NO_FP_API
-int    SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses);
-#endif
-#ifndef OPENSSL_NO_BIO
-int    SSL_SESSION_print(BIO *fp,const SSL_SESSION *ses);
-#endif
-void   SSL_SESSION_free(SSL_SESSION *ses);
-int    i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp);
-int    SSL_set_session(SSL *to, SSL_SESSION *session);
-int    SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
-int    SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c);
-int    SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
-int    SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
-int    SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
-                                       unsigned int id_len);
-SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp,
-                            long length);
-
-#ifdef HEADER_X509_H
-X509 * SSL_get_peer_certificate(const SSL *s);
-#endif
-
-STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s);
-
-int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
-int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
-int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *);
-void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,
-                       int (*callback)(int, X509_STORE_CTX *));
-void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth);
-void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg);
-#ifndef OPENSSL_NO_RSA
-int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
-#endif
-int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len);
-int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
-int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
-       const unsigned char *d, long len);
-int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
-int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d);
-
-void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
-void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
-
-int SSL_CTX_check_private_key(const SSL_CTX *ctx);
-int SSL_check_private_key(const SSL *ctx);
-
-int    SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
-                                      unsigned int sid_ctx_len);
-
-SSL *  SSL_new(SSL_CTX *ctx);
-int    SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx,
-                                  unsigned int sid_ctx_len);
-
-int SSL_CTX_set_purpose(SSL_CTX *s, int purpose);
-int SSL_set_purpose(SSL *s, int purpose);
-int SSL_CTX_set_trust(SSL_CTX *s, int trust);
-int SSL_set_trust(SSL *s, int trust);
-
-int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);
-int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);
-
-void   SSL_free(SSL *ssl);
-int    SSL_accept(SSL *ssl);
-int    SSL_connect(SSL *ssl);
-int    SSL_read(SSL *ssl,void *buf,int num);
-int    SSL_peek(SSL *ssl,void *buf,int num);
-int    SSL_write(SSL *ssl,const void *buf,int num);
-long   SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
-long   SSL_callback_ctrl(SSL *, int, void (*)(void));
-long   SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg);
-long   SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
-
-int    SSL_get_error(const SSL *s,int ret_code);
-const char *SSL_get_version(const SSL *s);
-
-/* This sets the 'default' SSL version that SSL_new() will create */
-int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
-
-#ifndef OPENSSL_NO_SSL2
-const SSL_METHOD *SSLv2_method(void);          /* SSLv2 */
-const SSL_METHOD *SSLv2_server_method(void);   /* SSLv2 */
-const SSL_METHOD *SSLv2_client_method(void);   /* SSLv2 */
-#endif
-
-const SSL_METHOD *SSLv3_method(void);          /* SSLv3 */
-const SSL_METHOD *SSLv3_server_method(void);   /* SSLv3 */
-const SSL_METHOD *SSLv3_client_method(void);   /* SSLv3 */
-
-const SSL_METHOD *SSLv23_method(void); /* SSLv3 but can rollback to v2 */
-const SSL_METHOD *SSLv23_server_method(void);  /* SSLv3 but can rollback to v2 */
-const SSL_METHOD *SSLv23_client_method(void);  /* SSLv3 but can rollback to v2 */
-
-const SSL_METHOD *TLSv1_method(void);          /* TLSv1.0 */
-const SSL_METHOD *TLSv1_server_method(void);   /* TLSv1.0 */
-const SSL_METHOD *TLSv1_client_method(void);   /* TLSv1.0 */
-
-const SSL_METHOD *DTLSv1_method(void);         /* DTLSv1.0 */
-const SSL_METHOD *DTLSv1_server_method(void);  /* DTLSv1.0 */
-const SSL_METHOD *DTLSv1_client_method(void);  /* DTLSv1.0 */
-
-STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);
-
-int SSL_do_handshake(SSL *s);
-int SSL_renegotiate(SSL *s);
-int SSL_renegotiate_pending(SSL *s);
-int SSL_shutdown(SSL *s);
-
-const SSL_METHOD *SSL_get_ssl_method(SSL *s);
-int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
-const char *SSL_alert_type_string_long(int value);
-const char *SSL_alert_type_string(int value);
-const char *SSL_alert_desc_string_long(int value);
-const char *SSL_alert_desc_string(int value);
-
-void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list);
-void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list);
-STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s);
-STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s);
-int SSL_add_client_CA(SSL *ssl,X509 *x);
-int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
-
-void SSL_set_connect_state(SSL *s);
-void SSL_set_accept_state(SSL *s);
-
-long SSL_get_default_timeout(const SSL *s);
-
-int SSL_library_init(void );
-
-char *SSL_CIPHER_description(const SSL_CIPHER *,char *buf,int size);
-STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);
-
-SSL *SSL_dup(SSL *ssl);
-
-X509 *SSL_get_certificate(const SSL *ssl);
-/* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl);
-
-void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode);
-int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
-void SSL_set_quiet_shutdown(SSL *ssl,int mode);
-int SSL_get_quiet_shutdown(const SSL *ssl);
-void SSL_set_shutdown(SSL *ssl,int mode);
-int SSL_get_shutdown(const SSL *ssl);
-int SSL_version(const SSL *ssl);
-int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
-int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
-       const char *CApath);
-#define SSL_get0_session SSL_get_session /* just peek at pointer */
-SSL_SESSION *SSL_get_session(const SSL *ssl);
-SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
-SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
-SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);
-void SSL_set_info_callback(SSL *ssl,
-                          void (*cb)(const SSL *ssl,int type,int val));
-void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val);
-int SSL_state(const SSL *ssl);
-
-void SSL_set_verify_result(SSL *ssl,long v);
-long SSL_get_verify_result(const SSL *ssl);
-
-int SSL_set_ex_data(SSL *ssl,int idx,void *data);
-void *SSL_get_ex_data(const SSL *ssl,int idx);
-int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-       CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data);
-void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss,int idx);
-int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-       CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data);
-void *SSL_CTX_get_ex_data(const SSL_CTX *ssl,int idx);
-int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
-       CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-
-int SSL_get_ex_data_X509_STORE_CTX_idx(void );
-
-#define SSL_CTX_sess_set_cache_size(ctx,t) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
-#define SSL_CTX_sess_get_cache_size(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)
-#define SSL_CTX_set_session_cache_mode(ctx,m) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
-#define SSL_CTX_get_session_cache_mode(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
-
-#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)
-#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)
-#define SSL_CTX_get_read_ahead(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
-#define SSL_CTX_set_read_ahead(ctx,m) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
-#define SSL_CTX_get_max_cert_list(ctx) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
-#define SSL_CTX_set_max_cert_list(ctx,m) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
-#define SSL_get_max_cert_list(ssl) \
-       SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
-#define SSL_set_max_cert_list(ssl,m) \
-       SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
-
-#define SSL_CTX_set_max_send_fragment(ctx,m) \
-       SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)
-#define SSL_set_max_send_fragment(ssl,m) \
-       SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)
-
-     /* NB: the keylength is only applicable when is_export is true */
-#ifndef OPENSSL_NO_RSA
-void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
-                                 RSA *(*cb)(SSL *ssl,int is_export,
-                                            int keylength));
-
-void SSL_set_tmp_rsa_callback(SSL *ssl,
-                                 RSA *(*cb)(SSL *ssl,int is_export,
-                                            int keylength));
-#endif
-#ifndef OPENSSL_NO_DH
-void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
-                                DH *(*dh)(SSL *ssl,int is_export,
-                                          int keylength));
-void SSL_set_tmp_dh_callback(SSL *ssl,
-                                DH *(*dh)(SSL *ssl,int is_export,
-                                          int keylength));
-#endif
-#ifndef OPENSSL_NO_ECDH
-void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,
-                                EC_KEY *(*ecdh)(SSL *ssl,int is_export,
-                                          int keylength));
-void SSL_set_tmp_ecdh_callback(SSL *ssl,
-                                EC_KEY *(*ecdh)(SSL *ssl,int is_export,
-                                          int keylength));
-#endif
-
-#ifndef OPENSSL_NO_COMP
-const COMP_METHOD *SSL_get_current_compression(SSL *s);
-const COMP_METHOD *SSL_get_current_expansion(SSL *s);
-const char *SSL_COMP_get_name(const COMP_METHOD *comp);
-STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
-int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
-#else
-const void *SSL_get_current_compression(SSL *s);
-const void *SSL_get_current_expansion(SSL *s);
-const char *SSL_COMP_get_name(const void *comp);
-void *SSL_COMP_get_compression_methods(void);
-int SSL_COMP_add_compression_method(int id,void *cm);
-#endif
-
-/* TLS extensions functions */
-int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len);
-
-int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb,
-                                 void *arg);
-
-/* Pre-shared secret session resumption functions */
-int SSL_set_session_secret_cb(SSL *s, tls_session_secret_cb_fn tls_session_secret_cb, void *arg);
-
-/* BEGIN ERROR CODES */
-/* The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_SSL_strings(void);
-
-/* Error codes for the SSL functions. */
-
-/* Function codes. */
-#define SSL_F_CLIENT_CERTIFICATE                        100
-#define SSL_F_CLIENT_FINISHED                           167
-#define SSL_F_CLIENT_HELLO                              101
-#define SSL_F_CLIENT_MASTER_KEY                                 102
-#define SSL_F_D2I_SSL_SESSION                           103
-#define SSL_F_DO_DTLS1_WRITE                            245
-#define SSL_F_DO_SSL3_WRITE                             104
-#define SSL_F_DTLS1_ACCEPT                              246
-#define SSL_F_DTLS1_ADD_CERT_TO_BUF                     295
-#define SSL_F_DTLS1_BUFFER_RECORD                       247
-#define SSL_F_DTLS1_CLIENT_HELLO                        248
-#define SSL_F_DTLS1_CONNECT                             249
-#define SSL_F_DTLS1_ENC                                         250
-#define SSL_F_DTLS1_GET_HELLO_VERIFY                    251
-#define SSL_F_DTLS1_GET_MESSAGE                                 252
-#define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT                253
-#define SSL_F_DTLS1_GET_RECORD                          254
-#define SSL_F_DTLS1_HANDLE_TIMEOUT                      297
-#define SSL_F_DTLS1_OUTPUT_CERT_CHAIN                   255
-#define SSL_F_DTLS1_PREPROCESS_FRAGMENT                         288
-#define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE          256
-#define SSL_F_DTLS1_PROCESS_RECORD                      257
-#define SSL_F_DTLS1_READ_BYTES                          258
-#define SSL_F_DTLS1_READ_FAILED                                 259
-#define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST            260
-#define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE             261
-#define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE            262
-#define SSL_F_DTLS1_SEND_CLIENT_VERIFY                  263
-#define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST           264
-#define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE             265
-#define SSL_F_DTLS1_SEND_SERVER_HELLO                   266
-#define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE            267
-#define SSL_F_DTLS1_WRITE_APP_DATA_BYTES                268
-#define SSL_F_GET_CLIENT_FINISHED                       105
-#define SSL_F_GET_CLIENT_HELLO                          106
-#define SSL_F_GET_CLIENT_MASTER_KEY                     107
-#define SSL_F_GET_SERVER_FINISHED                       108
-#define SSL_F_GET_SERVER_HELLO                          109
-#define SSL_F_GET_SERVER_VERIFY                                 110
-#define SSL_F_I2D_SSL_SESSION                           111
-#define SSL_F_READ_N                                    112
-#define SSL_F_REQUEST_CERTIFICATE                       113
-#define SSL_F_SERVER_FINISH                             239
-#define SSL_F_SERVER_HELLO                              114
-#define SSL_F_SERVER_VERIFY                             240
-#define SSL_F_SSL23_ACCEPT                              115
-#define SSL_F_SSL23_CLIENT_HELLO                        116
-#define SSL_F_SSL23_CONNECT                             117
-#define SSL_F_SSL23_GET_CLIENT_HELLO                    118
-#define SSL_F_SSL23_GET_SERVER_HELLO                    119
-#define SSL_F_SSL23_PEEK                                237
-#define SSL_F_SSL23_READ                                120
-#define SSL_F_SSL23_WRITE                               121
-#define SSL_F_SSL2_ACCEPT                               122
-#define SSL_F_SSL2_CONNECT                              123
-#define SSL_F_SSL2_ENC_INIT                             124
-#define SSL_F_SSL2_GENERATE_KEY_MATERIAL                241
-#define SSL_F_SSL2_PEEK                                         234
-#define SSL_F_SSL2_READ                                         125
-#define SSL_F_SSL2_READ_INTERNAL                        236
-#define SSL_F_SSL2_SET_CERTIFICATE                      126
-#define SSL_F_SSL2_WRITE                                127
-#define SSL_F_SSL3_ACCEPT                               128
-#define SSL_F_SSL3_ADD_CERT_TO_BUF                      296
-#define SSL_F_SSL3_CALLBACK_CTRL                        233
-#define SSL_F_SSL3_CHANGE_CIPHER_STATE                  129
-#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM             130
-#define SSL_F_SSL3_CHECK_CLIENT_HELLO                   304
-#define SSL_F_SSL3_CLIENT_HELLO                                 131
-#define SSL_F_SSL3_CONNECT                              132
-#define SSL_F_SSL3_CTRL                                         213
-#define SSL_F_SSL3_CTX_CTRL                             133
-#define SSL_F_SSL3_DIGEST_CACHED_RECORDS                293
-#define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC                292
-#define SSL_F_SSL3_ENC                                  134
-#define SSL_F_SSL3_GENERATE_KEY_BLOCK                   238
-#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST              135
-#define SSL_F_SSL3_GET_CERT_STATUS                      289
-#define SSL_F_SSL3_GET_CERT_VERIFY                      136
-#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE               137
-#define SSL_F_SSL3_GET_CLIENT_HELLO                     138
-#define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE              139
-#define SSL_F_SSL3_GET_FINISHED                                 140
-#define SSL_F_SSL3_GET_KEY_EXCHANGE                     141
-#define SSL_F_SSL3_GET_MESSAGE                          142
-#define SSL_F_SSL3_GET_NEW_SESSION_TICKET               283
-#define SSL_F_SSL3_GET_RECORD                           143
-#define SSL_F_SSL3_GET_SERVER_CERTIFICATE               144
-#define SSL_F_SSL3_GET_SERVER_DONE                      145
-#define SSL_F_SSL3_GET_SERVER_HELLO                     146
-#define SSL_F_SSL3_HANDSHAKE_MAC                        285
-#define SSL_F_SSL3_NEW_SESSION_TICKET                   287
-#define SSL_F_SSL3_OUTPUT_CERT_CHAIN                    147
-#define SSL_F_SSL3_PEEK                                         235
-#define SSL_F_SSL3_READ_BYTES                           148
-#define SSL_F_SSL3_READ_N                               149
-#define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST             150
-#define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE              151
-#define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE             152
-#define SSL_F_SSL3_SEND_CLIENT_VERIFY                   153
-#define SSL_F_SSL3_SEND_SERVER_CERTIFICATE              154
-#define SSL_F_SSL3_SEND_SERVER_HELLO                    242
-#define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE             155
-#define SSL_F_SSL3_SETUP_KEY_BLOCK                      157
-#define SSL_F_SSL3_SETUP_READ_BUFFER                    156
-#define SSL_F_SSL3_SETUP_WRITE_BUFFER                   291
-#define SSL_F_SSL3_WRITE_BYTES                          158
-#define SSL_F_SSL3_WRITE_PENDING                        159
-#define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT       298
-#define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT                277
-#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK        215
-#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK       216
-#define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT       299
-#define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT                278
-#define SSL_F_SSL_BAD_METHOD                            160
-#define SSL_F_SSL_BYTES_TO_CIPHER_LIST                  161
-#define SSL_F_SSL_CERT_DUP                              221
-#define SSL_F_SSL_CERT_INST                             222
-#define SSL_F_SSL_CERT_INSTANTIATE                      214
-#define SSL_F_SSL_CERT_NEW                              162
-#define SSL_F_SSL_CHECK_PRIVATE_KEY                     163
-#define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT              280
-#define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG           279
-#define SSL_F_SSL_CIPHER_PROCESS_RULESTR                230
-#define SSL_F_SSL_CIPHER_STRENGTH_SORT                  231
-#define SSL_F_SSL_CLEAR                                         164
-#define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD           165
-#define SSL_F_SSL_CREATE_CIPHER_LIST                    166
-#define SSL_F_SSL_CTRL                                  232
-#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY                         168
-#define SSL_F_SSL_CTX_NEW                               169
-#define SSL_F_SSL_CTX_SET_CIPHER_LIST                   269
-#define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE            290
-#define SSL_F_SSL_CTX_SET_PURPOSE                       226
-#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT            219
-#define SSL_F_SSL_CTX_SET_SSL_VERSION                   170
-#define SSL_F_SSL_CTX_SET_TRUST                                 229
-#define SSL_F_SSL_CTX_USE_CERTIFICATE                   171
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1              172
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE        220
-#define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE              173
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY                    174
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1               175
-#define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE               176
-#define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT             272
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY                         177
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1            178
-#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE            179
-#define SSL_F_SSL_DO_HANDSHAKE                          180
-#define SSL_F_SSL_GET_NEW_SESSION                       181
-#define SSL_F_SSL_GET_PREV_SESSION                      217
-#define SSL_F_SSL_GET_SERVER_SEND_CERT                  182
-#define SSL_F_SSL_GET_SIGN_PKEY                                 183
-#define SSL_F_SSL_INIT_WBIO_BUFFER                      184
-#define SSL_F_SSL_LOAD_CLIENT_CA_FILE                   185
-#define SSL_F_SSL_NEW                                   186
-#define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT     300
-#define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT              302
-#define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT     301
-#define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT              303
-#define SSL_F_SSL_PEEK                                  270
-#define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT            281
-#define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT            282
-#define SSL_F_SSL_READ                                  223
-#define SSL_F_SSL_RSA_PRIVATE_DECRYPT                   187
-#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT                    188
-#define SSL_F_SSL_SESSION_NEW                           189
-#define SSL_F_SSL_SESSION_PRINT_FP                      190
-#define SSL_F_SSL_SESS_CERT_NEW                                 225
-#define SSL_F_SSL_SET_CERT                              191
-#define SSL_F_SSL_SET_CIPHER_LIST                       271
-#define SSL_F_SSL_SET_FD                                192
-#define SSL_F_SSL_SET_PKEY                              193
-#define SSL_F_SSL_SET_PURPOSE                           227
-#define SSL_F_SSL_SET_RFD                               194
-#define SSL_F_SSL_SET_SESSION                           195
-#define SSL_F_SSL_SET_SESSION_ID_CONTEXT                218
-#define SSL_F_SSL_SET_SESSION_TICKET_EXT                294
-#define SSL_F_SSL_SET_TRUST                             228
-#define SSL_F_SSL_SET_WFD                               196
-#define SSL_F_SSL_SHUTDOWN                              224
-#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION              243
-#define SSL_F_SSL_UNDEFINED_FUNCTION                    197
-#define SSL_F_SSL_UNDEFINED_VOID_FUNCTION               244
-#define SSL_F_SSL_USE_CERTIFICATE                       198
-#define SSL_F_SSL_USE_CERTIFICATE_ASN1                  199
-#define SSL_F_SSL_USE_CERTIFICATE_FILE                  200
-#define SSL_F_SSL_USE_PRIVATEKEY                        201
-#define SSL_F_SSL_USE_PRIVATEKEY_ASN1                   202
-#define SSL_F_SSL_USE_PRIVATEKEY_FILE                   203
-#define SSL_F_SSL_USE_PSK_IDENTITY_HINT                         273
-#define SSL_F_SSL_USE_RSAPRIVATEKEY                     204
-#define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1                205
-#define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE                206
-#define SSL_F_SSL_VERIFY_CERT_CHAIN                     207
-#define SSL_F_SSL_WRITE                                         208
-#define SSL_F_TLS1_CERT_VERIFY_MAC                      286
-#define SSL_F_TLS1_CHANGE_CIPHER_STATE                  209
-#define SSL_F_TLS1_CHECK_SERVERHELLO_TLSEXT             274
-#define SSL_F_TLS1_ENC                                  210
-#define SSL_F_TLS1_PREPARE_CLIENTHELLO_TLSEXT           275
-#define SSL_F_TLS1_PREPARE_SERVERHELLO_TLSEXT           276
-#define SSL_F_TLS1_PRF                                  284
-#define SSL_F_TLS1_SETUP_KEY_BLOCK                      211
-#define SSL_F_WRITE_PENDING                             212
-
-/* Reason codes. */
-#define SSL_R_APP_DATA_IN_HANDSHAKE                     100
-#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
-#define SSL_R_BAD_ALERT_RECORD                          101
-#define SSL_R_BAD_AUTHENTICATION_TYPE                   102
-#define SSL_R_BAD_CHANGE_CIPHER_SPEC                    103
-#define SSL_R_BAD_CHECKSUM                              104
-#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK             106
-#define SSL_R_BAD_DECOMPRESSION                                 107
-#define SSL_R_BAD_DH_G_LENGTH                           108
-#define SSL_R_BAD_DH_PUB_KEY_LENGTH                     109
-#define SSL_R_BAD_DH_P_LENGTH                           110
-#define SSL_R_BAD_DIGEST_LENGTH                                 111
-#define SSL_R_BAD_DSA_SIGNATURE                                 112
-#define SSL_R_BAD_ECC_CERT                              304
-#define SSL_R_BAD_ECDSA_SIGNATURE                       305
-#define SSL_R_BAD_ECPOINT                               306
-#define SSL_R_BAD_HANDSHAKE_LENGTH                      332
-#define SSL_R_BAD_HELLO_REQUEST                                 105
-#define SSL_R_BAD_LENGTH                                271
-#define SSL_R_BAD_MAC_DECODE                            113
-#define SSL_R_BAD_MAC_LENGTH                            333
-#define SSL_R_BAD_MESSAGE_TYPE                          114
-#define SSL_R_BAD_PACKET_LENGTH                                 115
-#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER               116
-#define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH              316
-#define SSL_R_BAD_RESPONSE_ARGUMENT                     117
-#define SSL_R_BAD_RSA_DECRYPT                           118
-#define SSL_R_BAD_RSA_ENCRYPT                           119
-#define SSL_R_BAD_RSA_E_LENGTH                          120
-#define SSL_R_BAD_RSA_MODULUS_LENGTH                    121
-#define SSL_R_BAD_RSA_SIGNATURE                                 122
-#define SSL_R_BAD_SIGNATURE                             123
-#define SSL_R_BAD_SSL_FILETYPE                          124
-#define SSL_R_BAD_SSL_SESSION_ID_LENGTH                         125
-#define SSL_R_BAD_STATE                                         126
-#define SSL_R_BAD_WRITE_RETRY                           127
-#define SSL_R_BIO_NOT_SET                               128
-#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG                         129
-#define SSL_R_BN_LIB                                    130
-#define SSL_R_CA_DN_LENGTH_MISMATCH                     131
-#define SSL_R_CA_DN_TOO_LONG                            132
-#define SSL_R_CCS_RECEIVED_EARLY                        133
-#define SSL_R_CERTIFICATE_VERIFY_FAILED                         134
-#define SSL_R_CERT_LENGTH_MISMATCH                      135
-#define SSL_R_CHALLENGE_IS_DIFFERENT                    136
-#define SSL_R_CIPHER_CODE_WRONG_LENGTH                  137
-#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE                138
-#define SSL_R_CIPHER_TABLE_SRC_ERROR                    139
-#define SSL_R_CLIENTHELLO_TLSEXT                        226
-#define SSL_R_COMPRESSED_LENGTH_TOO_LONG                140
-#define SSL_R_COMPRESSION_DISABLED                      343
-#define SSL_R_COMPRESSION_FAILURE                       141
-#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE   307
-#define SSL_R_COMPRESSION_LIBRARY_ERROR                         142
-#define SSL_R_CONNECTION_ID_IS_DIFFERENT                143
-#define SSL_R_CONNECTION_TYPE_NOT_SET                   144
-#define SSL_R_COOKIE_MISMATCH                           308
-#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED             145
-#define SSL_R_DATA_LENGTH_TOO_LONG                      146
-#define SSL_R_DECRYPTION_FAILED                                 147
-#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC       281
-#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG           148
-#define SSL_R_DIGEST_CHECK_FAILED                       149
-#define SSL_R_DTLS_MESSAGE_TOO_BIG                      334
-#define SSL_R_DUPLICATE_COMPRESSION_ID                  309
-#define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT            317
-#define SSL_R_ECC_CERT_NOT_FOR_SIGNING                  318
-#define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE        322
-#define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE       323
-#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER              310
-#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG                         150
-#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY              282
-#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST             151
-#define SSL_R_EXCESSIVE_MESSAGE_SIZE                    152
-#define SSL_R_EXTRA_DATA_IN_MESSAGE                     153
-#define SSL_R_GOT_A_FIN_BEFORE_A_CCS                    154
-#define SSL_R_HTTPS_PROXY_REQUEST                       155
-#define SSL_R_HTTP_REQUEST                              156
-#define SSL_R_ILLEGAL_PADDING                           283
-#define SSL_R_INCONSISTENT_COMPRESSION                  340
-#define SSL_R_INVALID_CHALLENGE_LENGTH                  158
-#define SSL_R_INVALID_COMMAND                           280
-#define SSL_R_INVALID_COMPRESSION_ALGORITHM             341
-#define SSL_R_INVALID_PURPOSE                           278
-#define SSL_R_INVALID_STATUS_RESPONSE                   328
-#define SSL_R_INVALID_TICKET_KEYS_LENGTH                325
-#define SSL_R_INVALID_TRUST                             279
-#define SSL_R_KEY_ARG_TOO_LONG                          284
-#define SSL_R_KRB5                                      285
-#define SSL_R_KRB5_C_CC_PRINC                           286
-#define SSL_R_KRB5_C_GET_CRED                           287
-#define SSL_R_KRB5_C_INIT                               288
-#define SSL_R_KRB5_C_MK_REQ                             289
-#define SSL_R_KRB5_S_BAD_TICKET                                 290
-#define SSL_R_KRB5_S_INIT                               291
-#define SSL_R_KRB5_S_RD_REQ                             292
-#define SSL_R_KRB5_S_TKT_EXPIRED                        293
-#define SSL_R_KRB5_S_TKT_NYV                            294
-#define SSL_R_KRB5_S_TKT_SKEW                           295
-#define SSL_R_LENGTH_MISMATCH                           159
-#define SSL_R_LENGTH_TOO_SHORT                          160
-#define SSL_R_LIBRARY_BUG                               274
-#define SSL_R_LIBRARY_HAS_NO_CIPHERS                    161
-#define SSL_R_MESSAGE_TOO_LONG                          296
-#define SSL_R_MISSING_DH_DSA_CERT                       162
-#define SSL_R_MISSING_DH_KEY                            163
-#define SSL_R_MISSING_DH_RSA_CERT                       164
-#define SSL_R_MISSING_DSA_SIGNING_CERT                  165
-#define SSL_R_MISSING_EXPORT_TMP_DH_KEY                         166
-#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY                167
-#define SSL_R_MISSING_RSA_CERTIFICATE                   168
-#define SSL_R_MISSING_RSA_ENCRYPTING_CERT               169
-#define SSL_R_MISSING_RSA_SIGNING_CERT                  170
-#define SSL_R_MISSING_TMP_DH_KEY                        171
-#define SSL_R_MISSING_TMP_ECDH_KEY                      311
-#define SSL_R_MISSING_TMP_RSA_KEY                       172
-#define SSL_R_MISSING_TMP_RSA_PKEY                      173
-#define SSL_R_MISSING_VERIFY_MESSAGE                    174
-#define SSL_R_MULTIPLE_SGC_RESTARTS                     346
-#define SSL_R_NON_SSLV2_INITIAL_PACKET                  175
-#define SSL_R_NO_CERTIFICATES_RETURNED                  176
-#define SSL_R_NO_CERTIFICATE_ASSIGNED                   177
-#define SSL_R_NO_CERTIFICATE_RETURNED                   178
-#define SSL_R_NO_CERTIFICATE_SET                        179
-#define SSL_R_NO_CERTIFICATE_SPECIFIED                  180
-#define SSL_R_NO_CIPHERS_AVAILABLE                      181
-#define SSL_R_NO_CIPHERS_PASSED                                 182
-#define SSL_R_NO_CIPHERS_SPECIFIED                      183
-#define SSL_R_NO_CIPHER_LIST                            184
-#define SSL_R_NO_CIPHER_MATCH                           185
-#define SSL_R_NO_CLIENT_CERT_METHOD                     331
-#define SSL_R_NO_CLIENT_CERT_RECEIVED                   186
-#define SSL_R_NO_COMPRESSION_SPECIFIED                  187
-#define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER          330
-#define SSL_R_NO_METHOD_SPECIFIED                       188
-#define SSL_R_NO_PRIVATEKEY                             189
-#define SSL_R_NO_PRIVATE_KEY_ASSIGNED                   190
-#define SSL_R_NO_PROTOCOLS_AVAILABLE                    191
-#define SSL_R_NO_PUBLICKEY                              192
-#define SSL_R_NO_RENEGOTIATION                          339
-#define SSL_R_NO_REQUIRED_DIGEST                        324
-#define SSL_R_NO_SHARED_CIPHER                          193
-#define SSL_R_NO_VERIFY_CALLBACK                        194
-#define SSL_R_NULL_SSL_CTX                              195
-#define SSL_R_NULL_SSL_METHOD_PASSED                    196
-#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED           197
-#define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344
-#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE             297
-#define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG                         327
-#define SSL_R_PACKET_LENGTH_TOO_LONG                    198
-#define SSL_R_PARSE_TLSEXT                              227
-#define SSL_R_PATH_TOO_LONG                             270
-#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE                 199
-#define SSL_R_PEER_ERROR                                200
-#define SSL_R_PEER_ERROR_CERTIFICATE                    201
-#define SSL_R_PEER_ERROR_NO_CERTIFICATE                         202
-#define SSL_R_PEER_ERROR_NO_CIPHER                      203
-#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE   204
-#define SSL_R_PRE_MAC_LENGTH_TOO_LONG                   205
-#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS                 206
-#define SSL_R_PROTOCOL_IS_SHUTDOWN                      207
-#define SSL_R_PSK_IDENTITY_NOT_FOUND                    223
-#define SSL_R_PSK_NO_CLIENT_CB                          224
-#define SSL_R_PSK_NO_SERVER_CB                          225
-#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR                  208
-#define SSL_R_PUBLIC_KEY_IS_NOT_RSA                     209
-#define SSL_R_PUBLIC_KEY_NOT_RSA                        210
-#define SSL_R_READ_BIO_NOT_SET                          211
-#define SSL_R_READ_TIMEOUT_EXPIRED                      312
-#define SSL_R_READ_WRONG_PACKET_TYPE                    212
-#define SSL_R_RECORD_LENGTH_MISMATCH                    213
-#define SSL_R_RECORD_TOO_LARGE                          214
-#define SSL_R_RECORD_TOO_SMALL                          298
-#define SSL_R_RENEGOTIATE_EXT_TOO_LONG                  335
-#define SSL_R_RENEGOTIATION_ENCODING_ERR                336
-#define SSL_R_RENEGOTIATION_MISMATCH                    337
-#define SSL_R_REQUIRED_CIPHER_MISSING                   215
-#define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING   342
-#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO                216
-#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO                  217
-#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO                218
-#define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING          345
-#define SSL_R_SERVERHELLO_TLSEXT                        275
-#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED          277
-#define SSL_R_SHORT_READ                                219
-#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE     220
-#define SSL_R_SSL23_DOING_SESSION_ID_REUSE              221
-#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG               299
-#define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT            321
-#define SSL_R_SSL3_EXT_INVALID_SERVERNAME               319
-#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE          320
-#define SSL_R_SSL3_SESSION_ID_TOO_LONG                  300
-#define SSL_R_SSL3_SESSION_ID_TOO_SHORT                         222
-#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE               1042
-#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                1020
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED           1045
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED           1044
-#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN           1046
-#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE                 1030
-#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE             1040
-#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER             1047
-#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE                1041
-#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE            1010
-#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE       1043
-#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION        228
-#define SSL_R_SSL_HANDSHAKE_FAILURE                     229
-#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS                230
-#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED            301
-#define SSL_R_SSL_SESSION_ID_CONFLICT                   302
-#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG           273
-#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH             303
-#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT               231
-#define SSL_R_TLSV1_ALERT_ACCESS_DENIED                         1049
-#define SSL_R_TLSV1_ALERT_DECODE_ERROR                  1050
-#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED             1021
-#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR                         1051
-#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION            1060
-#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY                 1071
-#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR                1080
-#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION              1100
-#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION              1070
-#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW               1022
-#define SSL_R_TLSV1_ALERT_UNKNOWN_CA                    1048
-#define SSL_R_TLSV1_ALERT_USER_CANCELLED                1090
-#define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE          1114
-#define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE     1113
-#define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE            1111
-#define SSL_R_TLSV1_UNRECOGNIZED_NAME                   1112
-#define SSL_R_TLSV1_UNSUPPORTED_EXTENSION               1110
-#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER      232
-#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST            157
-#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
-#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG   234
-#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER           235
-#define SSL_R_UNABLE_TO_DECODE_DH_CERTS                         236
-#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS               313
-#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY              237
-#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS              238
-#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS            314
-#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS      239
-#define SSL_R_UNABLE_TO_FIND_SSL_METHOD                         240
-#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES          241
-#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES          242
-#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES                 243
-#define SSL_R_UNEXPECTED_MESSAGE                        244
-#define SSL_R_UNEXPECTED_RECORD                                 245
-#define SSL_R_UNINITIALIZED                             276
-#define SSL_R_UNKNOWN_ALERT_TYPE                        246
-#define SSL_R_UNKNOWN_CERTIFICATE_TYPE                  247
-#define SSL_R_UNKNOWN_CIPHER_RETURNED                   248
-#define SSL_R_UNKNOWN_CIPHER_TYPE                       249
-#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE                         250
-#define SSL_R_UNKNOWN_PKEY_TYPE                                 251
-#define SSL_R_UNKNOWN_PROTOCOL                          252
-#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE                         253
-#define SSL_R_UNKNOWN_SSL_VERSION                       254
-#define SSL_R_UNKNOWN_STATE                             255
-#define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED      338
-#define SSL_R_UNSUPPORTED_CIPHER                        256
-#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM                 257
-#define SSL_R_UNSUPPORTED_DIGEST_TYPE                   326
-#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE                315
-#define SSL_R_UNSUPPORTED_PROTOCOL                      258
-#define SSL_R_UNSUPPORTED_SSL_VERSION                   259
-#define SSL_R_UNSUPPORTED_STATUS_TYPE                   329
-#define SSL_R_WRITE_BIO_NOT_SET                                 260
-#define SSL_R_WRONG_CIPHER_RETURNED                     261
-#define SSL_R_WRONG_MESSAGE_TYPE                        262
-#define SSL_R_WRONG_NUMBER_OF_KEY_BITS                  263
-#define SSL_R_WRONG_SIGNATURE_LENGTH                    264
-#define SSL_R_WRONG_SIGNATURE_SIZE                      265
-#define SSL_R_WRONG_SSL_VERSION                                 266
-#define SSL_R_WRONG_VERSION_NUMBER                      267
-#define SSL_R_X509_LIB                                  268
-#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS          269
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..e87d9be8fc66369c648ce11b01f2c954e8b456d4
--- /dev/null
@@ -0,0 +1 @@
+../../ssl/ssl.h
\ No newline at end of file
deleted file mode 100644 (file)
index 9c2c41287a5c70e31e82c10049eb4f01feb15f42..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,648 +0,0 @@
-/* ssl/ssl3.h */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * ECC cipher suite support in OpenSSL originally developed by 
- * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
- */
-
-#ifndef HEADER_SSL3_H 
-#define HEADER_SSL3_H 
-
-#ifndef OPENSSL_NO_COMP
-#include <openssl/comp.h>
-#endif
-#include <openssl/buffer.h>
-#include <openssl/evp.h>
-#include <openssl/ssl.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-/* Signalling cipher suite value: from draft-ietf-tls-renegotiation-03.txt */
-#define SSL3_CK_SCSV                           0x030000FF
-
-#define SSL3_CK_RSA_NULL_MD5                   0x03000001
-#define SSL3_CK_RSA_NULL_SHA                   0x03000002
-#define SSL3_CK_RSA_RC4_40_MD5                         0x03000003
-#define SSL3_CK_RSA_RC4_128_MD5                        0x03000004
-#define SSL3_CK_RSA_RC4_128_SHA                        0x03000005
-#define SSL3_CK_RSA_RC2_40_MD5                 0x03000006
-#define SSL3_CK_RSA_IDEA_128_SHA               0x03000007
-#define SSL3_CK_RSA_DES_40_CBC_SHA             0x03000008
-#define SSL3_CK_RSA_DES_64_CBC_SHA             0x03000009
-#define SSL3_CK_RSA_DES_192_CBC3_SHA           0x0300000A
-
-#define SSL3_CK_DH_DSS_DES_40_CBC_SHA          0x0300000B
-#define SSL3_CK_DH_DSS_DES_64_CBC_SHA          0x0300000C
-#define SSL3_CK_DH_DSS_DES_192_CBC3_SHA        0x0300000D
-#define SSL3_CK_DH_RSA_DES_40_CBC_SHA          0x0300000E
-#define SSL3_CK_DH_RSA_DES_64_CBC_SHA          0x0300000F
-#define SSL3_CK_DH_RSA_DES_192_CBC3_SHA        0x03000010
-
-#define SSL3_CK_EDH_DSS_DES_40_CBC_SHA         0x03000011
-#define SSL3_CK_EDH_DSS_DES_64_CBC_SHA         0x03000012
-#define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA       0x03000013
-#define SSL3_CK_EDH_RSA_DES_40_CBC_SHA         0x03000014
-#define SSL3_CK_EDH_RSA_DES_64_CBC_SHA         0x03000015
-#define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA       0x03000016
-
-#define SSL3_CK_ADH_RC4_40_MD5                 0x03000017
-#define SSL3_CK_ADH_RC4_128_MD5                        0x03000018
-#define SSL3_CK_ADH_DES_40_CBC_SHA             0x03000019
-#define SSL3_CK_ADH_DES_64_CBC_SHA             0x0300001A
-#define SSL3_CK_ADH_DES_192_CBC_SHA            0x0300001B
-
-#if 0
-       #define SSL3_CK_FZA_DMS_NULL_SHA                0x0300001C
-       #define SSL3_CK_FZA_DMS_FZA_SHA                 0x0300001D
-       #if 0 /* Because it clashes with KRB5, is never used any more, and is safe
-                to remove according to David Hopwood <david.hopwood@zetnet.co.uk>
-                of the ietf-tls list */
-       #define SSL3_CK_FZA_DMS_RC4_SHA                 0x0300001E
-       #endif
-#endif
-
-/*    VRS Additional Kerberos5 entries
- */
-#define SSL3_CK_KRB5_DES_64_CBC_SHA            0x0300001E
-#define SSL3_CK_KRB5_DES_192_CBC3_SHA          0x0300001F
-#define SSL3_CK_KRB5_RC4_128_SHA               0x03000020
-#define SSL3_CK_KRB5_IDEA_128_CBC_SHA          0x03000021
-#define SSL3_CK_KRB5_DES_64_CBC_MD5            0x03000022
-#define SSL3_CK_KRB5_DES_192_CBC3_MD5          0x03000023
-#define SSL3_CK_KRB5_RC4_128_MD5               0x03000024
-#define SSL3_CK_KRB5_IDEA_128_CBC_MD5          0x03000025
-
-#define SSL3_CK_KRB5_DES_40_CBC_SHA            0x03000026
-#define SSL3_CK_KRB5_RC2_40_CBC_SHA            0x03000027
-#define SSL3_CK_KRB5_RC4_40_SHA                        0x03000028
-#define SSL3_CK_KRB5_DES_40_CBC_MD5            0x03000029
-#define SSL3_CK_KRB5_RC2_40_CBC_MD5            0x0300002A
-#define SSL3_CK_KRB5_RC4_40_MD5                        0x0300002B
-
-#define SSL3_TXT_RSA_NULL_MD5                  "NULL-MD5"
-#define SSL3_TXT_RSA_NULL_SHA                  "NULL-SHA"
-#define SSL3_TXT_RSA_RC4_40_MD5                "EXP-RC4-MD5"
-#define SSL3_TXT_RSA_RC4_128_MD5               "RC4-MD5"
-#define SSL3_TXT_RSA_RC4_128_SHA               "RC4-SHA"
-#define SSL3_TXT_RSA_RC2_40_MD5                        "EXP-RC2-CBC-MD5"
-#define SSL3_TXT_RSA_IDEA_128_SHA              "IDEA-CBC-SHA"
-#define SSL3_TXT_RSA_DES_40_CBC_SHA            "EXP-DES-CBC-SHA"
-#define SSL3_TXT_RSA_DES_64_CBC_SHA            "DES-CBC-SHA"
-#define SSL3_TXT_RSA_DES_192_CBC3_SHA          "DES-CBC3-SHA"
-
-#define SSL3_TXT_DH_DSS_DES_40_CBC_SHA         "EXP-DH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_DH_DSS_DES_64_CBC_SHA         "DH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA       "DH-DSS-DES-CBC3-SHA"
-#define SSL3_TXT_DH_RSA_DES_40_CBC_SHA         "EXP-DH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_DH_RSA_DES_64_CBC_SHA         "DH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA       "DH-RSA-DES-CBC3-SHA"
-
-#define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA                "EXP-EDH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA                "EDH-DSS-DES-CBC-SHA"
-#define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA      "EDH-DSS-DES-CBC3-SHA"
-#define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA                "EXP-EDH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA                "EDH-RSA-DES-CBC-SHA"
-#define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA      "EDH-RSA-DES-CBC3-SHA"
-
-#define SSL3_TXT_ADH_RC4_40_MD5                        "EXP-ADH-RC4-MD5"
-#define SSL3_TXT_ADH_RC4_128_MD5               "ADH-RC4-MD5"
-#define SSL3_TXT_ADH_DES_40_CBC_SHA            "EXP-ADH-DES-CBC-SHA"
-#define SSL3_TXT_ADH_DES_64_CBC_SHA            "ADH-DES-CBC-SHA"
-#define SSL3_TXT_ADH_DES_192_CBC_SHA           "ADH-DES-CBC3-SHA"
-
-#if 0
-       #define SSL3_TXT_FZA_DMS_NULL_SHA               "FZA-NULL-SHA"
-       #define SSL3_TXT_FZA_DMS_FZA_SHA                "FZA-FZA-CBC-SHA"
-       #define SSL3_TXT_FZA_DMS_RC4_SHA                "FZA-RC4-SHA"
-#endif
-
-#define SSL3_TXT_KRB5_DES_64_CBC_SHA           "KRB5-DES-CBC-SHA"
-#define SSL3_TXT_KRB5_DES_192_CBC3_SHA         "KRB5-DES-CBC3-SHA"
-#define SSL3_TXT_KRB5_RC4_128_SHA              "KRB5-RC4-SHA"
-#define SSL3_TXT_KRB5_IDEA_128_CBC_SHA         "KRB5-IDEA-CBC-SHA"
-#define SSL3_TXT_KRB5_DES_64_CBC_MD5           "KRB5-DES-CBC-MD5"
-#define SSL3_TXT_KRB5_DES_192_CBC3_MD5         "KRB5-DES-CBC3-MD5"
-#define SSL3_TXT_KRB5_RC4_128_MD5              "KRB5-RC4-MD5"
-#define SSL3_TXT_KRB5_IDEA_128_CBC_MD5                 "KRB5-IDEA-CBC-MD5"
-
-#define SSL3_TXT_KRB5_DES_40_CBC_SHA           "EXP-KRB5-DES-CBC-SHA"
-#define SSL3_TXT_KRB5_RC2_40_CBC_SHA           "EXP-KRB5-RC2-CBC-SHA"
-#define SSL3_TXT_KRB5_RC4_40_SHA               "EXP-KRB5-RC4-SHA"
-#define SSL3_TXT_KRB5_DES_40_CBC_MD5           "EXP-KRB5-DES-CBC-MD5"
-#define SSL3_TXT_KRB5_RC2_40_CBC_MD5           "EXP-KRB5-RC2-CBC-MD5"
-#define SSL3_TXT_KRB5_RC4_40_MD5               "EXP-KRB5-RC4-MD5"
-
-#define SSL3_SSL_SESSION_ID_LENGTH             32
-#define SSL3_MAX_SSL_SESSION_ID_LENGTH         32
-
-#define SSL3_MASTER_SECRET_SIZE                        48
-#define SSL3_RANDOM_SIZE                       32
-#define SSL3_SESSION_ID_SIZE                   32
-#define SSL3_RT_HEADER_LENGTH                  5
-
-#ifndef SSL3_ALIGN_PAYLOAD
- /* Some will argue that this increases memory footprint, but it's
-  * not actually true. Point is that malloc has to return at least
-  * 64-bit aligned pointers, meaning that allocating 5 bytes wastes
-  * 3 bytes in either case. Suggested pre-gaping simply moves these
-  * wasted bytes from the end of allocated region to its front,
-  * but makes data payload aligned, which improves performance:-) */
-# define SSL3_ALIGN_PAYLOAD                    8
-#else
-# if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0
-#  error "insane SSL3_ALIGN_PAYLOAD"
-#  undef SSL3_ALIGN_PAYLOAD
-# endif
-#endif
-
-/* This is the maximum MAC (digest) size used by the SSL library.
- * Currently maximum of 20 is used by SHA1, but we reserve for
- * future extension for 512-bit hashes.
- */
-
-#define SSL3_RT_MAX_MD_SIZE                    64
-
-/* Maximum block size used in all ciphersuites. Currently 16 for AES.
- */
-
-#define        SSL_RT_MAX_CIPHER_BLOCK_SIZE            16
-
-#define SSL3_RT_MAX_EXTRA                      (16384)
-
-/* Maximum plaintext length: defined by SSL/TLS standards */
-#define SSL3_RT_MAX_PLAIN_LENGTH               16384
-/* Maximum compression overhead: defined by SSL/TLS standards */
-#define SSL3_RT_MAX_COMPRESSED_OVERHEAD                1024
-
-/* The standards give a maximum encryption overhead of 1024 bytes.
- * In practice the value is lower than this. The overhead is the maximum
- * number of padding bytes (256) plus the mac size.
- */
-#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
-
-/* OpenSSL currently only uses a padding length of at most one block so
- * the send overhead is smaller.
- */
-
-#define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \
-                       (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
-
-/* If compression isn't used don't include the compression overhead */
-
-#ifdef OPENSSL_NO_COMP
-#define SSL3_RT_MAX_COMPRESSED_LENGTH          SSL3_RT_MAX_PLAIN_LENGTH
-#else
-#define SSL3_RT_MAX_COMPRESSED_LENGTH  \
-               (SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD)
-#endif
-#define SSL3_RT_MAX_ENCRYPTED_LENGTH   \
-               (SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH)
-#define SSL3_RT_MAX_PACKET_SIZE                \
-               (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)
-
-#define SSL3_MD_CLIENT_FINISHED_CONST  "\x43\x4C\x4E\x54"
-#define SSL3_MD_SERVER_FINISHED_CONST  "\x53\x52\x56\x52"
-
-#define SSL3_VERSION                   0x0300
-#define SSL3_VERSION_MAJOR             0x03
-#define SSL3_VERSION_MINOR             0x00
-
-#define SSL3_RT_CHANGE_CIPHER_SPEC     20
-#define SSL3_RT_ALERT                  21
-#define SSL3_RT_HANDSHAKE              22
-#define SSL3_RT_APPLICATION_DATA       23
-
-#define SSL3_AL_WARNING                        1
-#define SSL3_AL_FATAL                  2
-
-#define SSL3_AD_CLOSE_NOTIFY            0
-#define SSL3_AD_UNEXPECTED_MESSAGE     10      /* fatal */
-#define SSL3_AD_BAD_RECORD_MAC         20      /* fatal */
-#define SSL3_AD_DECOMPRESSION_FAILURE  30      /* fatal */
-#define SSL3_AD_HANDSHAKE_FAILURE      40      /* fatal */
-#define SSL3_AD_NO_CERTIFICATE         41
-#define SSL3_AD_BAD_CERTIFICATE                42
-#define SSL3_AD_UNSUPPORTED_CERTIFICATE        43
-#define SSL3_AD_CERTIFICATE_REVOKED    44
-#define SSL3_AD_CERTIFICATE_EXPIRED    45
-#define SSL3_AD_CERTIFICATE_UNKNOWN    46
-#define SSL3_AD_ILLEGAL_PARAMETER      47      /* fatal */
-
-typedef struct ssl3_record_st
-       {
-/*r */ int type;               /* type of record */
-/*rw*/ unsigned int length;    /* How many bytes available */
-/*r */ unsigned int off;       /* read/write offset into 'buf' */
-/*rw*/ unsigned char *data;    /* pointer to the record data */
-/*rw*/ unsigned char *input;   /* where the decode bytes are */
-/*r */ unsigned char *comp;    /* only used with decompression - malloc()ed */
-/*r */  unsigned long epoch;    /* epoch number, needed by DTLS1 */
-/*r */  unsigned char seq_num[8]; /* sequence number, needed by DTLS1 */
-       } SSL3_RECORD;
-
-typedef struct ssl3_buffer_st
-       {
-       unsigned char *buf;     /* at least SSL3_RT_MAX_PACKET_SIZE bytes,
-                                * see ssl3_setup_buffers() */
-       size_t len;             /* buffer size */
-       int offset;             /* where to 'copy from' */
-       int left;               /* how many bytes left */
-       } SSL3_BUFFER;
-
-#define SSL3_CT_RSA_SIGN                       1
-#define SSL3_CT_DSS_SIGN                       2
-#define SSL3_CT_RSA_FIXED_DH                   3
-#define SSL3_CT_DSS_FIXED_DH                   4
-#define SSL3_CT_RSA_EPHEMERAL_DH               5
-#define SSL3_CT_DSS_EPHEMERAL_DH               6
-#define SSL3_CT_FORTEZZA_DMS                   20
-/* SSL3_CT_NUMBER is used to size arrays and it must be large
- * enough to contain all of the cert types defined either for
- * SSLv3 and TLSv1.
- */
-#define SSL3_CT_NUMBER                 9
-
-
-#define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS      0x0001
-#define SSL3_FLAGS_DELAY_CLIENT_FINISHED       0x0002
-#define SSL3_FLAGS_POP_BUFFER                  0x0004
-#define TLS1_FLAGS_TLS_PADDING_BUG             0x0008
-#define TLS1_FLAGS_SKIP_CERT_VERIFY            0x0010
-/* SSL3_FLAGS_SGC_RESTART_DONE is set when we
- * restart a handshake because of MS SGC and so prevents us
- * from restarting the handshake in a loop. It's reset on a
- * renegotiation, so effectively limits the client to one restart
- * per negotiation. This limits the possibility of a DDoS
- * attack where the client handshakes in a loop using SGC to
- * restart. Servers which permit renegotiation can still be
- * effected, but we can't prevent that.
- */
-#define SSL3_FLAGS_SGC_RESTART_DONE            0x0040
-
-typedef struct ssl3_state_st
-       {
-       long flags;
-       int delay_buf_pop_ret;
-
-       unsigned char read_sequence[8];
-       int read_mac_secret_size;
-       unsigned char read_mac_secret[EVP_MAX_MD_SIZE];
-       unsigned char write_sequence[8];
-       int write_mac_secret_size;
-       unsigned char write_mac_secret[EVP_MAX_MD_SIZE];
-
-       unsigned char server_random[SSL3_RANDOM_SIZE];
-       unsigned char client_random[SSL3_RANDOM_SIZE];
-
-       /* flags for countermeasure against known-IV weakness */
-       int need_empty_fragments;
-       int empty_fragment_done;
-
-       /* The value of 'extra' when the buffers were initialized */
-       int init_extra;
-
-       SSL3_BUFFER rbuf;       /* read IO goes into here */
-       SSL3_BUFFER wbuf;       /* write IO goes into here */
-
-       SSL3_RECORD rrec;       /* each decoded record goes in here */
-       SSL3_RECORD wrec;       /* goes out from here */
-
-       /* storage for Alert/Handshake protocol data received but not
-        * yet processed by ssl3_read_bytes: */
-       unsigned char alert_fragment[2];
-       unsigned int alert_fragment_len;
-       unsigned char handshake_fragment[4];
-       unsigned int handshake_fragment_len;
-
-       /* partial write - check the numbers match */
-       unsigned int wnum;      /* number of bytes sent so far */
-       int wpend_tot;          /* number bytes written */
-       int wpend_type;
-       int wpend_ret;          /* number of bytes submitted */
-       const unsigned char *wpend_buf;
-
-       /* used during startup, digest all incoming/outgoing packets */
-       BIO *handshake_buffer;
-       /* When set of handshake digests is determined, buffer is hashed
-        * and freed and MD_CTX-es for all required digests are stored in
-        * this array */
-       EVP_MD_CTX **handshake_dgst;
-       /* this is set whenerver we see a change_cipher_spec message
-        * come in when we are not looking for one */
-       int change_cipher_spec;
-
-       int warn_alert;
-       int fatal_alert;
-       /* we allow one fatal and one warning alert to be outstanding,
-        * send close alert via the warning alert */
-       int alert_dispatch;
-       unsigned char send_alert[2];
-
-       /* This flag is set when we should renegotiate ASAP, basically when
-        * there is no more data in the read or write buffers */
-       int renegotiate;
-       int total_renegotiations;
-       int num_renegotiations;
-
-       int in_read_app_data;
-
-       /* Opaque PRF input as used for the current handshake.
-        * These fields are used only if TLSEXT_TYPE_opaque_prf_input is defined
-        * (otherwise, they are merely present to improve binary compatibility) */
-       void *client_opaque_prf_input;
-       size_t client_opaque_prf_input_len;
-       void *server_opaque_prf_input;
-       size_t server_opaque_prf_input_len;
-
-       struct  {
-               /* actually only needs to be 16+20 */
-               unsigned char cert_verify_md[EVP_MAX_MD_SIZE*2];
-
-               /* actually only need to be 16+20 for SSLv3 and 12 for TLS */
-               unsigned char finish_md[EVP_MAX_MD_SIZE*2];
-               int finish_md_len;
-               unsigned char peer_finish_md[EVP_MAX_MD_SIZE*2];
-               int peer_finish_md_len;
-               
-               unsigned long message_size;
-               int message_type;
-
-               /* used to hold the new cipher we are going to use */
-               const SSL_CIPHER *new_cipher;
-#ifndef OPENSSL_NO_DH
-               DH *dh;
-#endif
-
-#ifndef OPENSSL_NO_ECDH
-               EC_KEY *ecdh; /* holds short lived ECDH key */
-#endif
-
-               /* used when SSL_ST_FLUSH_DATA is entered */
-               int next_state;                 
-
-               int reuse_message;
-
-               /* used for certificate requests */
-               int cert_req;
-               int ctype_num;
-               char ctype[SSL3_CT_NUMBER];
-               STACK_OF(X509_NAME) *ca_names;
-
-               int use_rsa_tmp;
-
-               int key_block_length;
-               unsigned char *key_block;
-
-               const EVP_CIPHER *new_sym_enc;
-               const EVP_MD *new_hash;
-               int new_mac_pkey_type;
-               int new_mac_secret_size;
-#ifndef OPENSSL_NO_COMP
-               const SSL_COMP *new_compression;
-#else
-               char *new_compression;
-#endif
-               int cert_request;
-               } tmp;
-
-        /* Connection binding to prevent renegotiation attacks */
-        unsigned char previous_client_finished[EVP_MAX_MD_SIZE];
-        unsigned char previous_client_finished_len;
-        unsigned char previous_server_finished[EVP_MAX_MD_SIZE];
-        unsigned char previous_server_finished_len;
-        int send_connection_binding; /* TODOEKR */
-       } SSL3_STATE;
-
-
-/* SSLv3 */
-/*client */
-/* extra state */
-#define SSL3_ST_CW_FLUSH               (0x100|SSL_ST_CONNECT)
-/* write to server */
-#define SSL3_ST_CW_CLNT_HELLO_A                (0x110|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CLNT_HELLO_B                (0x111|SSL_ST_CONNECT)
-/* read from server */
-#define SSL3_ST_CR_SRVR_HELLO_A                (0x120|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_HELLO_B                (0x121|SSL_ST_CONNECT)
-#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT)
-#define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_A              (0x130|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_B              (0x131|SSL_ST_CONNECT)
-#define SSL3_ST_CR_KEY_EXCH_A          (0x140|SSL_ST_CONNECT)
-#define SSL3_ST_CR_KEY_EXCH_B          (0x141|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_REQ_A          (0x150|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_REQ_B          (0x151|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_DONE_A         (0x160|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SRVR_DONE_B         (0x161|SSL_ST_CONNECT)
-/* write to server */
-#define SSL3_ST_CW_CERT_A              (0x170|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_B              (0x171|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_C              (0x172|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_D              (0x173|SSL_ST_CONNECT)
-#define SSL3_ST_CW_KEY_EXCH_A          (0x180|SSL_ST_CONNECT)
-#define SSL3_ST_CW_KEY_EXCH_B          (0x181|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_VRFY_A         (0x190|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CERT_VRFY_B         (0x191|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CHANGE_A            (0x1A0|SSL_ST_CONNECT)
-#define SSL3_ST_CW_CHANGE_B            (0x1A1|SSL_ST_CONNECT)
-#define SSL3_ST_CW_FINISHED_A          (0x1B0|SSL_ST_CONNECT)
-#define SSL3_ST_CW_FINISHED_B          (0x1B1|SSL_ST_CONNECT)
-/* read from server */
-#define SSL3_ST_CR_CHANGE_A            (0x1C0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CHANGE_B            (0x1C1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_FINISHED_A          (0x1D0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_FINISHED_B          (0x1D1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SESSION_TICKET_A    (0x1E0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_SESSION_TICKET_B    (0x1E1|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_STATUS_A       (0x1F0|SSL_ST_CONNECT)
-#define SSL3_ST_CR_CERT_STATUS_B       (0x1F1|SSL_ST_CONNECT)
-
-/* server */
-/* extra state */
-#define SSL3_ST_SW_FLUSH               (0x100|SSL_ST_ACCEPT)
-/* read from client */
-/* Do not change the number values, they do matter */
-#define SSL3_ST_SR_CLNT_HELLO_A                (0x110|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CLNT_HELLO_B                (0x111|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CLNT_HELLO_C                (0x112|SSL_ST_ACCEPT)
-/* write to client */
-#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT)
-#define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_A         (0x120|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_B         (0x121|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_HELLO_REQ_C         (0x122|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_HELLO_A                (0x130|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_HELLO_B                (0x131|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_A              (0x140|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_B              (0x141|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_KEY_EXCH_A          (0x150|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_KEY_EXCH_B          (0x151|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_REQ_A          (0x160|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_REQ_B          (0x161|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_DONE_A         (0x170|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SRVR_DONE_B         (0x171|SSL_ST_ACCEPT)
-/* read from client */
-#define SSL3_ST_SR_CERT_A              (0x180|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_B              (0x181|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_KEY_EXCH_A          (0x190|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_KEY_EXCH_B          (0x191|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_VRFY_A         (0x1A0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CERT_VRFY_B         (0x1A1|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CHANGE_A            (0x1B0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_CHANGE_B            (0x1B1|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_FINISHED_A          (0x1C0|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_FINISHED_B          (0x1C1|SSL_ST_ACCEPT)
-/* write to client */
-#define SSL3_ST_SW_CHANGE_A            (0x1D0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CHANGE_B            (0x1D1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_FINISHED_A          (0x1E0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_FINISHED_B          (0x1E1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SESSION_TICKET_A    (0x1F0|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_SESSION_TICKET_B    (0x1F1|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_STATUS_A       (0x200|SSL_ST_ACCEPT)
-#define SSL3_ST_SW_CERT_STATUS_B       (0x201|SSL_ST_ACCEPT)
-
-#define SSL3_MT_HELLO_REQUEST                  0
-#define SSL3_MT_CLIENT_HELLO                   1
-#define SSL3_MT_SERVER_HELLO                   2
-#define        SSL3_MT_NEWSESSION_TICKET               4
-#define SSL3_MT_CERTIFICATE                    11
-#define SSL3_MT_SERVER_KEY_EXCHANGE            12
-#define SSL3_MT_CERTIFICATE_REQUEST            13
-#define SSL3_MT_SERVER_DONE                    14
-#define SSL3_MT_CERTIFICATE_VERIFY             15
-#define SSL3_MT_CLIENT_KEY_EXCHANGE            16
-#define SSL3_MT_FINISHED                       20
-#define SSL3_MT_CERTIFICATE_STATUS             22
-#define DTLS1_MT_HELLO_VERIFY_REQUEST    3
-
-
-#define SSL3_MT_CCS                            1
-
-/* These are used when changing over to a new cipher */
-#define SSL3_CC_READ           0x01
-#define SSL3_CC_WRITE          0x02
-#define SSL3_CC_CLIENT         0x10
-#define SSL3_CC_SERVER         0x20
-#define SSL3_CHANGE_CIPHER_CLIENT_WRITE        (SSL3_CC_CLIENT|SSL3_CC_WRITE)  
-#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ)
-#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ)
-#define SSL3_CHANGE_CIPHER_SERVER_WRITE        (SSL3_CC_SERVER|SSL3_CC_WRITE)
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..5ae2507f28a184f1d3218ee459705a91929dc7b4
--- /dev/null
@@ -0,0 +1 @@
+../../ssl/ssl3.h
\ No newline at end of file
deleted file mode 100644 (file)
index b3cc8f098b7e8a0cb71066711376ca131838b91b..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,532 +0,0 @@
-/* ssl/tls1.h */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- * 
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- * 
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *    "This product includes cryptographic software written by
- *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
- *    being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from 
- *    the apps directory (application code) you must include an acknowledgement:
- *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- * 
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed.  i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-/* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- *    nor may "OpenSSL" appear in their names without prior written
- *    permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the OpenSSL Project
- *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- *
- * Portions of the attached software ("Contribution") are developed by 
- * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
- *
- * The Contribution is licensed pursuant to the OpenSSL open source
- * license provided above.
- *
- * ECC cipher suite support in OpenSSL originally written by
- * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.
- *
- */
-/* ====================================================================
- * Copyright 2005 Nokia. All rights reserved.
- *
- * The portions of the attached software ("Contribution") is developed by
- * Nokia Corporation and is licensed pursuant to the OpenSSL open source
- * license.
- *
- * The Contribution, originally written by Mika Kousa and Pasi Eronen of
- * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
- * support (see RFC 4279) to OpenSSL.
- *
- * No patent licenses or other rights except those expressly stated in
- * the OpenSSL open source license shall be deemed granted or received
- * expressly, by implication, estoppel, or otherwise.
- *
- * No assurances are provided by Nokia that the Contribution does not
- * infringe the patent or other intellectual property rights of any third
- * party or that the license provides you with all the necessary rights
- * to make use of the Contribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
- * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
- * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
- * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
- * OTHERWISE.
- */
-
-#ifndef HEADER_TLS1_H 
-#define HEADER_TLS1_H 
-
-#include <openssl/buffer.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES   0
-
-#define TLS1_VERSION                   0x0301
-#define TLS1_VERSION_MAJOR             0x03
-#define TLS1_VERSION_MINOR             0x01
-
-#define TLS1_AD_DECRYPTION_FAILED      21
-#define TLS1_AD_RECORD_OVERFLOW                22
-#define TLS1_AD_UNKNOWN_CA             48      /* fatal */
-#define TLS1_AD_ACCESS_DENIED          49      /* fatal */
-#define TLS1_AD_DECODE_ERROR           50      /* fatal */
-#define TLS1_AD_DECRYPT_ERROR          51
-#define TLS1_AD_EXPORT_RESTRICTION     60      /* fatal */
-#define TLS1_AD_PROTOCOL_VERSION       70      /* fatal */
-#define TLS1_AD_INSUFFICIENT_SECURITY  71      /* fatal */
-#define TLS1_AD_INTERNAL_ERROR         80      /* fatal */
-#define TLS1_AD_USER_CANCELLED         90
-#define TLS1_AD_NO_RENEGOTIATION       100
-/* codes 110-114 are from RFC3546 */
-#define TLS1_AD_UNSUPPORTED_EXTENSION  110
-#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
-#define TLS1_AD_UNRECOGNIZED_NAME      112
-#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
-#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
-#define TLS1_AD_UNKNOWN_PSK_IDENTITY   115     /* fatal */
-
-/* ExtensionType values from RFC3546 / RFC4366 */
-#define TLSEXT_TYPE_server_name                        0
-#define TLSEXT_TYPE_max_fragment_length                1
-#define TLSEXT_TYPE_client_certificate_url     2
-#define TLSEXT_TYPE_trusted_ca_keys            3
-#define TLSEXT_TYPE_truncated_hmac             4
-#define TLSEXT_TYPE_status_request             5
-/* ExtensionType values from RFC4492 */
-#define TLSEXT_TYPE_elliptic_curves            10
-#define TLSEXT_TYPE_ec_point_formats           11
-#define TLSEXT_TYPE_session_ticket             35
-/* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */
-#if 0 /* will have to be provided externally for now ,
-       * i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183
-       * using whatever extension number you'd like to try */
-# define TLSEXT_TYPE_opaque_prf_input          ?? */
-#endif
-
-/* Temporary extension type */
-#define TLSEXT_TYPE_renegotiate                 0xff01
-
-/* NameType value from RFC 3546 */
-#define TLSEXT_NAMETYPE_host_name 0
-/* status request value from RFC 3546 */
-#define TLSEXT_STATUSTYPE_ocsp 1
-
-/* ECPointFormat values from draft-ietf-tls-ecc-12 */
-#define TLSEXT_ECPOINTFORMAT_first                     0
-#define TLSEXT_ECPOINTFORMAT_uncompressed              0
-#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
-#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
-#define TLSEXT_ECPOINTFORMAT_last                      2
-
-#ifndef OPENSSL_NO_TLSEXT
-
-#define TLSEXT_MAXLEN_host_name 255
-
-const char *SSL_get_servername(const SSL *s, const int type) ;
-int SSL_get_servername_type(const SSL *s) ;
-
-#define SSL_set_tlsext_host_name(s,name) \
-SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)
-
-#define SSL_set_tlsext_debug_callback(ssl, cb) \
-SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb)
-
-#define SSL_set_tlsext_debug_arg(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg)
-
-#define SSL_set_tlsext_status_type(ssl, type) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)
-
-#define SSL_get_tlsext_status_exts(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
-
-#define SSL_set_tlsext_status_exts(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)
-
-#define SSL_get_tlsext_status_ids(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
-
-#define SSL_set_tlsext_status_ids(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)
-
-#define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
-SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg)
-
-#define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
-SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg)
-
-#define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
-SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)
-
-#define SSL_TLSEXT_ERR_OK 0
-#define SSL_TLSEXT_ERR_ALERT_WARNING 1
-#define SSL_TLSEXT_ERR_ALERT_FATAL 2
-#define SSL_TLSEXT_ERR_NOACK 3
-
-#define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
-SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)
-
-#define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
-#define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
-       SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
-
-#define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
-SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb)
-
-#define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
-SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg)
-
-#define SSL_set_tlsext_opaque_prf_input(s, src, len) \
-SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src)
-#define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \
-SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb)
-#define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \
-SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg)
-
-#define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
-SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
-
-#endif
-
-/* PSK ciphersuites from 4279 */
-#define TLS1_CK_PSK_WITH_RC4_128_SHA                    0x0300008A
-#define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA               0x0300008B
-#define TLS1_CK_PSK_WITH_AES_128_CBC_SHA                0x0300008C
-#define TLS1_CK_PSK_WITH_AES_256_CBC_SHA                0x0300008D
-
-/* Additional TLS ciphersuites from expired Internet Draft
- * draft-ietf-tls-56-bit-ciphersuites-01.txt
- * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see
- * s3_lib.c).  We actually treat them like SSL 3.0 ciphers, which we probably
- * shouldn't.  Note that the first two are actually not in the IDs. */
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5         0x03000060 /* not in ID */
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5     0x03000061 /* not in ID */
-#define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA                0x03000062
-#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA    0x03000063
-#define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA         0x03000064
-#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA     0x03000065
-#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA               0x03000066
-
-/* AES ciphersuites from RFC3268 */
-
-#define TLS1_CK_RSA_WITH_AES_128_SHA                   0x0300002F
-#define TLS1_CK_DH_DSS_WITH_AES_128_SHA                        0x03000030
-#define TLS1_CK_DH_RSA_WITH_AES_128_SHA                        0x03000031
-#define TLS1_CK_DHE_DSS_WITH_AES_128_SHA               0x03000032
-#define TLS1_CK_DHE_RSA_WITH_AES_128_SHA               0x03000033
-#define TLS1_CK_ADH_WITH_AES_128_SHA                   0x03000034
-
-#define TLS1_CK_RSA_WITH_AES_256_SHA                   0x03000035
-#define TLS1_CK_DH_DSS_WITH_AES_256_SHA                        0x03000036
-#define TLS1_CK_DH_RSA_WITH_AES_256_SHA                        0x03000037
-#define TLS1_CK_DHE_DSS_WITH_AES_256_SHA               0x03000038
-#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA               0x03000039
-#define TLS1_CK_ADH_WITH_AES_256_SHA                   0x0300003A
-
-/* Camellia ciphersuites from RFC4132 */
-#define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA          0x03000041
-#define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA       0x03000042
-#define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA       0x03000043
-#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA      0x03000044
-#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA      0x03000045
-#define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA          0x03000046
-
-#define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA          0x03000084
-#define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA       0x03000085
-#define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA       0x03000086
-#define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA      0x03000087
-#define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA      0x03000088
-#define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA          0x03000089
-
-/* SEED ciphersuites from RFC4162 */
-#define TLS1_CK_RSA_WITH_SEED_SHA                       0x03000096
-#define TLS1_CK_DH_DSS_WITH_SEED_SHA                    0x03000097
-#define TLS1_CK_DH_RSA_WITH_SEED_SHA                    0x03000098
-#define TLS1_CK_DHE_DSS_WITH_SEED_SHA                   0x03000099
-#define TLS1_CK_DHE_RSA_WITH_SEED_SHA                   0x0300009A
-#define TLS1_CK_ADH_WITH_SEED_SHA                      0x0300009B
-
-/* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in draft 13 */
-#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA                0x0300C001
-#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA             0x0300C002
-#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA        0x0300C003
-#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA         0x0300C004
-#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA         0x0300C005
-
-#define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA               0x0300C006
-#define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA            0x0300C007
-#define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA       0x0300C008
-#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA        0x0300C009
-#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA        0x0300C00A
-
-#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA                  0x0300C00B
-#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA               0x0300C00C
-#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA          0x0300C00D
-#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA           0x0300C00E
-#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA           0x0300C00F
-
-#define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA                 0x0300C010
-#define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA              0x0300C011
-#define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA         0x0300C012
-#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA          0x0300C013
-#define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA          0x0300C014
-
-#define TLS1_CK_ECDH_anon_WITH_NULL_SHA                 0x0300C015
-#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA              0x0300C016
-#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA         0x0300C017
-#define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA          0x0300C018
-#define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA          0x0300C019
-
-/* XXX
- * Inconsistency alert:
- * The OpenSSL names of ciphers with ephemeral DH here include the string
- * "DHE", while elsewhere it has always been "EDH".
- * (The alias for the list of all such ciphers also is "EDH".)
- * The specifications speak of "EDH"; maybe we should allow both forms
- * for everything. */
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5                "EXP1024-RC4-MD5"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5    "EXP1024-RC2-CBC-MD5"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA       "EXP1024-DES-CBC-SHA"
-#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA   "EXP1024-DHE-DSS-DES-CBC-SHA"
-#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA                "EXP1024-RC4-SHA"
-#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA    "EXP1024-DHE-DSS-RC4-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA              "DHE-DSS-RC4-SHA"
-
-/* AES ciphersuites from RFC3268 */
-#define TLS1_TXT_RSA_WITH_AES_128_SHA                  "AES128-SHA"
-#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA               "DH-DSS-AES128-SHA"
-#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA               "DH-RSA-AES128-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA              "DHE-DSS-AES128-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA              "DHE-RSA-AES128-SHA"
-#define TLS1_TXT_ADH_WITH_AES_128_SHA                  "ADH-AES128-SHA"
-
-#define TLS1_TXT_RSA_WITH_AES_256_SHA                  "AES256-SHA"
-#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA               "DH-DSS-AES256-SHA"
-#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA               "DH-RSA-AES256-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA              "DHE-DSS-AES256-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA              "DHE-RSA-AES256-SHA"
-#define TLS1_TXT_ADH_WITH_AES_256_SHA                  "ADH-AES256-SHA"
-
-/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */
-#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA               "ECDH-ECDSA-NULL-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA            "ECDH-ECDSA-RC4-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA       "ECDH-ECDSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA        "ECDH-ECDSA-AES128-SHA"
-#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA        "ECDH-ECDSA-AES256-SHA"
-
-#define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA              "ECDHE-ECDSA-NULL-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA           "ECDHE-ECDSA-RC4-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      "ECDHE-ECDSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       "ECDHE-ECDSA-AES128-SHA"
-#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       "ECDHE-ECDSA-AES256-SHA"
-
-#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA                 "ECDH-RSA-NULL-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA              "ECDH-RSA-RC4-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA         "ECDH-RSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA          "ECDH-RSA-AES128-SHA"
-#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA          "ECDH-RSA-AES256-SHA"
-
-#define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA                "ECDHE-RSA-NULL-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA             "ECDHE-RSA-RC4-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA        "ECDHE-RSA-DES-CBC3-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA         "ECDHE-RSA-AES128-SHA"
-#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA         "ECDHE-RSA-AES256-SHA"
-
-#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA                "AECDH-NULL-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA             "AECDH-RC4-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA        "AECDH-DES-CBC3-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA         "AECDH-AES128-SHA"
-#define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA         "AECDH-AES256-SHA"
-
-/* PSK ciphersuites from RFC 4279 */
-#define TLS1_TXT_PSK_WITH_RC4_128_SHA                  "PSK-RC4-SHA"
-#define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA             "PSK-3DES-EDE-CBC-SHA"
-#define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA              "PSK-AES128-CBC-SHA"
-#define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA              "PSK-AES256-CBC-SHA"
-
-/* Camellia ciphersuites from RFC4132 */
-#define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA         "CAMELLIA128-SHA"
-#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA      "DH-DSS-CAMELLIA128-SHA"
-#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA      "DH-RSA-CAMELLIA128-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA     "DHE-DSS-CAMELLIA128-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA     "DHE-RSA-CAMELLIA128-SHA"
-#define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA         "ADH-CAMELLIA128-SHA"
-
-#define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA         "CAMELLIA256-SHA"
-#define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA      "DH-DSS-CAMELLIA256-SHA"
-#define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA      "DH-RSA-CAMELLIA256-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA     "DHE-DSS-CAMELLIA256-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA     "DHE-RSA-CAMELLIA256-SHA"
-#define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA         "ADH-CAMELLIA256-SHA"
-
-/* SEED ciphersuites from RFC4162 */
-#define TLS1_TXT_RSA_WITH_SEED_SHA                      "SEED-SHA"
-#define TLS1_TXT_DH_DSS_WITH_SEED_SHA                   "DH-DSS-SEED-SHA"
-#define TLS1_TXT_DH_RSA_WITH_SEED_SHA                   "DH-RSA-SEED-SHA"
-#define TLS1_TXT_DHE_DSS_WITH_SEED_SHA                  "DHE-DSS-SEED-SHA"
-#define TLS1_TXT_DHE_RSA_WITH_SEED_SHA                  "DHE-RSA-SEED-SHA"
-#define TLS1_TXT_ADH_WITH_SEED_SHA                      "ADH-SEED-SHA"
-
-
-#define TLS_CT_RSA_SIGN                        1
-#define TLS_CT_DSS_SIGN                        2
-#define TLS_CT_RSA_FIXED_DH            3
-#define TLS_CT_DSS_FIXED_DH            4
-#define TLS_CT_ECDSA_SIGN              64
-#define TLS_CT_RSA_FIXED_ECDH          65
-#define TLS_CT_ECDSA_FIXED_ECDH        66
-#define TLS_CT_GOST94_SIGN             21
-#define TLS_CT_GOST01_SIGN             22
-/* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
- * comment there) */
-#define TLS_CT_NUMBER                  9
-
-#define TLS1_FINISH_MAC_LENGTH         12
-
-#define TLS_MD_MAX_CONST_SIZE                  20
-#define TLS_MD_CLIENT_FINISH_CONST             "client finished"
-#define TLS_MD_CLIENT_FINISH_CONST_SIZE                15
-#define TLS_MD_SERVER_FINISH_CONST             "server finished"
-#define TLS_MD_SERVER_FINISH_CONST_SIZE                15
-#define TLS_MD_SERVER_WRITE_KEY_CONST          "server write key"
-#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE     16
-#define TLS_MD_KEY_EXPANSION_CONST             "key expansion"
-#define TLS_MD_KEY_EXPANSION_CONST_SIZE                13
-#define TLS_MD_CLIENT_WRITE_KEY_CONST          "client write key"
-#define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE     16
-#define TLS_MD_SERVER_WRITE_KEY_CONST          "server write key"
-#define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE     16
-#define TLS_MD_IV_BLOCK_CONST                  "IV block"
-#define TLS_MD_IV_BLOCK_CONST_SIZE             8
-#define TLS_MD_MASTER_SECRET_CONST             "master secret"
-#define TLS_MD_MASTER_SECRET_CONST_SIZE                13
-
-#ifdef CHARSET_EBCDIC
-#undef TLS_MD_CLIENT_FINISH_CONST
-#define TLS_MD_CLIENT_FINISH_CONST    "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"  /*client finished*/
-#undef TLS_MD_SERVER_FINISH_CONST
-#define TLS_MD_SERVER_FINISH_CONST    "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"  /*server finished*/
-#undef TLS_MD_SERVER_WRITE_KEY_CONST
-#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*server write key*/
-#undef TLS_MD_KEY_EXPANSION_CONST
-#define TLS_MD_KEY_EXPANSION_CONST    "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"  /*key expansion*/
-#undef TLS_MD_CLIENT_WRITE_KEY_CONST
-#define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*client write key*/
-#undef TLS_MD_SERVER_WRITE_KEY_CONST
-#define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"  /*server write key*/
-#undef TLS_MD_IV_BLOCK_CONST
-#define TLS_MD_IV_BLOCK_CONST         "\x49\x56\x20\x62\x6c\x6f\x63\x6b"  /*IV block*/
-#undef TLS_MD_MASTER_SECRET_CONST
-#define TLS_MD_MASTER_SECRET_CONST    "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"  /*master secret*/
-#endif
-
-/* TLS Session Ticket extension struct */
-struct tls_session_ticket_ext_st
-       {
-       unsigned short length;
-       void *data;
-       };
-
-#ifdef  __cplusplus
-}
-#endif
-#endif
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..53d998fbd860835c0f5b96adfc5ad75666f31bae
--- /dev/null
@@ -0,0 +1 @@
+../../ssl/tls1.h
\ No newline at end of file
diff --git a/packaging/unused b/packaging/unused
deleted file mode 100644 (file)
index 5364927..0000000
+++ /dev/null
@@ -1 +0,0 @@
-this package is not used in OBS