Compare commits
	
		
			1 Commits
		
	
	
		
			OpenSSL-en
			...
			OpenSSL-en
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					02a473eeb9 | 
							
								
								
									
										54
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,60 +2,6 @@
 | 
			
		||||
 OpenSSL CHANGES
 | 
			
		||||
 _______________
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6c and 0.9.6d  [XX xxx XXXX]
 | 
			
		||||
 | 
			
		||||
  *) Add information about CygWin 1.3 and on, and preserve proper
 | 
			
		||||
     configuration for the versions before that.
 | 
			
		||||
     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Make removal from session cache (SSL_CTX_remove_session()) more robust:
 | 
			
		||||
     check whether we deal with a copy of a session and do not delete from
 | 
			
		||||
     the cache in this case. Problem reported by "Izhar Shoshani Levi"
 | 
			
		||||
     <izhar@checkpoint.com>.
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Do not store session data into the internal session cache, if it
 | 
			
		||||
     is never intended to be looked up (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP
 | 
			
		||||
     flag is set). Proposed by Aslam <aslam@funk.com>.
 | 
			
		||||
     [Lutz Jaenicke]
 | 
			
		||||
 | 
			
		||||
  *) Have ASN1_BIT_STRING_set_bit() really clear a bit when the requested
 | 
			
		||||
     value is 0.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Fix a crashbug and a logic bug in hwcrhk_load_pubkey()
 | 
			
		||||
     [Toomas Kiisk <vix@cyber.ee> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Add the configuration target linux-s390x.
 | 
			
		||||
     [Neale Ferguson <Neale.Ferguson@SoftwareAG-USA.com> via Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) The earlier bugfix for the SSL3_ST_SW_HELLO_REQ_C case of
 | 
			
		||||
     ssl3_accept (ssl/s3_srvr.c) incorrectly used a local flag
 | 
			
		||||
     variable as an indication that a ClientHello message has been
 | 
			
		||||
     received.  As the flag value will be lost between multiple
 | 
			
		||||
     invocations of ssl3_accept when using non-blocking I/O, the
 | 
			
		||||
     function may not be aware that a handshake has actually taken
 | 
			
		||||
     place, thus preventing a new session from being added to the
 | 
			
		||||
     session cache.
 | 
			
		||||
 | 
			
		||||
     To avoid this problem, we now set s->new_session to 2 instead of
 | 
			
		||||
     using a local variable.
 | 
			
		||||
     [Lutz Jaenicke, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) Bugfix: Return -1 from ssl3_get_server_done (ssl3/s3_clnt.c)
 | 
			
		||||
     if the SSL_R_LENGTH_MISMATCH error is detected.
 | 
			
		||||
     [Geoff Thorpe, Bodo Moeller]
 | 
			
		||||
 | 
			
		||||
  *) New 'shared_ldflag' column in Configure platform table.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Fix EVP_CIPHER_mode macro.
 | 
			
		||||
     ["Dan S. Camper" <dan@bti.net>]
 | 
			
		||||
 | 
			
		||||
  *) Fix ssl3_read_bytes (ssl/s3_pkt.c): To ignore messages of unknown
 | 
			
		||||
     type, we must throw them away by setting rr->length to 0.
 | 
			
		||||
     [D P Chang <dpc@qualys.com>]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6b and 0.9.6c  [21 dec 2001]
 | 
			
		||||
 | 
			
		||||
  *) Fix BN_rand_range bug pointed out by Dominikus Scherkl
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										242
									
								
								Configure
									
									
									
									
									
								
							
							
						
						
									
										242
									
								
								Configure
									
									
									
									
									
								
							@@ -10,7 +10,7 @@ use strict;
 | 
			
		||||
 | 
			
		||||
# see INSTALL for instructions.
 | 
			
		||||
 | 
			
		||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--test-sanity] os/compiler[:flags]\n";
 | 
			
		||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
 | 
			
		||||
 | 
			
		||||
# Options:
 | 
			
		||||
#
 | 
			
		||||
@@ -28,10 +28,6 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
 | 
			
		||||
#               are always compiled but return NULL if the hardware
 | 
			
		||||
#               support isn't compiled.
 | 
			
		||||
# no-hw         do not compile support for any crypto hardware.
 | 
			
		||||
#
 | 
			
		||||
# --test-sanity Make a number of sanity checks on the data in this file.
 | 
			
		||||
#               This is a debugging tool for OpenSSL developers.
 | 
			
		||||
#
 | 
			
		||||
# rsaref        use RSAref
 | 
			
		||||
# [no-]threads  [don't] try to create a library that is suitable for
 | 
			
		||||
#               multithreaded applications (default is "threads" if we
 | 
			
		||||
@@ -110,7 +106,7 @@ my $alpha_asm="::::::::";
 | 
			
		||||
# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1.
 | 
			
		||||
# So the md5_locl.h file has an undef B_ENDIAN if sun is defined
 | 
			
		||||
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib
 | 
			
		||||
#config-string	$cc : $cflags : $unistd : $thread_cflag : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag
 | 
			
		||||
 | 
			
		||||
my %table=(
 | 
			
		||||
# File 'TABLE' (created by 'make TABLE') contains the data from this list,
 | 
			
		||||
@@ -145,35 +141,35 @@ my %table=(
 | 
			
		||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
 | 
			
		||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
 | 
			
		||||
# error message.
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Solaris x86 with Sun C setups
 | 
			
		||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with GNU C setups
 | 
			
		||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
 | 
			
		||||
# but keep the assembler modules.
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
####
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Solaris with Sun C setups
 | 
			
		||||
# DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
 | 
			
		||||
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
 | 
			
		||||
# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
 | 
			
		||||
# SC5.0 note: Compiler common patch 107357-01 or later is required!
 | 
			
		||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:-xarch=v9:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
 | 
			
		||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs",
 | 
			
		||||
####
 | 
			
		||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### SPARC Linux setups
 | 
			
		||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
 | 
			
		||||
@@ -193,17 +189,17 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
#### IRIX 5.x configs
 | 
			
		||||
# -mips2 flag is added by ./config when appropriate.
 | 
			
		||||
"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::::::::dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
#### IRIX 6.x configs
 | 
			
		||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
 | 
			
		||||
# './Configure irix-[g]cc' manually.
 | 
			
		||||
# -mips4 flag is added by ./config when appropriate.
 | 
			
		||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# N64 ABI builds.
 | 
			
		||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Unified HP-UX ANSI C configs.
 | 
			
		||||
# Special notes:
 | 
			
		||||
@@ -235,44 +231,44 @@ my %table=(
 | 
			
		||||
#
 | 
			
		||||
#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
 | 
			
		||||
# Since there is mention of this in shlib/hpux10-cc.sh
 | 
			
		||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
 | 
			
		||||
#
 | 
			
		||||
# Chris Ruemmler <ruemmler@cup.hp.com>
 | 
			
		||||
# Kevin Steves <ks@hp.se>
 | 
			
		||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# HPUX 9.X config.
 | 
			
		||||
# Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or
 | 
			
		||||
# egcs.  gcc 2.8.1 is also broken.
 | 
			
		||||
 | 
			
		||||
"hpux-cc",	"cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-cc",	"cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# If hpux-cc fails (e.g. during "make test"), try the next one; otherwise,
 | 
			
		||||
# please report your OS and compiler version to the openssl-bugs@openssl.org
 | 
			
		||||
# mailing list.
 | 
			
		||||
"hpux-brokencc",	"cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-brokencc",	"cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
"hpux-gcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-gcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# If hpux-gcc fails, try this one:
 | 
			
		||||
"hpux-brokengcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux-brokengcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# HPUX 9.X on Motorola 68k platforms with gcc
 | 
			
		||||
"hpux-m68k-gcc",  "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::BN_LLONG DES_PTR DES_UNROLL:::",
 | 
			
		||||
 | 
			
		||||
# HPUX 10.X config.  Supports threads.
 | 
			
		||||
"hpux10-cc",	"cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux10-cc",	"cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG):
 | 
			
		||||
"hpux10-brokencc",	"cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux10-brokencc",	"cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
"hpux10-gcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux10-gcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
# If hpux10-gcc fails, try this one:
 | 
			
		||||
"hpux10-brokengcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"hpux10-brokengcc",	"gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# HPUX 11.X from www.globus.org.
 | 
			
		||||
# Only works on PA-RISC 2.0 cpus, and not optimized.  Why?
 | 
			
		||||
@@ -283,9 +279,6 @@ my %table=(
 | 
			
		||||
#### HP MPE/iX http://jazz.external.hp.com/src/openssl/
 | 
			
		||||
"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
 | 
			
		||||
 | 
			
		||||
#### PARISC Linux setups
 | 
			
		||||
"linux-parisc","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
 | 
			
		||||
 | 
			
		||||
# Dec Alpha, OSF/1 - the alpha164-cc is historical, for the conversion
 | 
			
		||||
# from the older DEC C Compiler to the newer compiler.  It's now the
 | 
			
		||||
# same as the preferred entry, alpha-cc.  If you are still using the
 | 
			
		||||
@@ -311,15 +304,15 @@ my %table=(
 | 
			
		||||
#
 | 
			
		||||
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
 | 
			
		||||
#
 | 
			
		||||
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
 | 
			
		||||
"alphaold-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
 | 
			
		||||
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so",
 | 
			
		||||
"alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so",
 | 
			
		||||
"alpha-cc-rpath", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared-rpath:::.so",
 | 
			
		||||
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared::.so",
 | 
			
		||||
"alphaold-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared::.so",
 | 
			
		||||
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared::.so",
 | 
			
		||||
"alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared::.so",
 | 
			
		||||
"alpha-cc-rpath", "cc:-std1 -tune host -fast -readonly_strings::-pthread::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared-rpath::.so",
 | 
			
		||||
#
 | 
			
		||||
# This probably belongs in a different section.
 | 
			
		||||
#
 | 
			
		||||
"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
#### Alpha Linux with GNU C and Compaq C setups
 | 
			
		||||
# Special notes:
 | 
			
		||||
@@ -334,8 +327,8 @@ my %table=(
 | 
			
		||||
#
 | 
			
		||||
#					<appro@fy.chalmers.se>
 | 
			
		||||
#
 | 
			
		||||
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
 | 
			
		||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
 | 
			
		||||
 | 
			
		||||
@@ -344,24 +337,23 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
 | 
			
		||||
# bn86-elf.o file file since it is hand tweaked assembler.
 | 
			
		||||
"linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 | 
			
		||||
"linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
			
		||||
"linux-mipsel",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
 | 
			
		||||
"linux-mips",   "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
 | 
			
		||||
"linux-ppc",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ppc",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
 | 
			
		||||
"linux-s390",	"gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
 | 
			
		||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-x86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-ia64",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-m68",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"NetBSD-x86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"FreeBSD",      "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
 | 
			
		||||
"bsdi-gcc",     "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
 | 
			
		||||
"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"nextstep",	"cc:-O -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
"nextstep3.3",	"cc:-O3 -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
# NCR MP-RAS UNIX ver 02.03.01
 | 
			
		||||
@@ -374,7 +366,7 @@ my %table=(
 | 
			
		||||
"qnx6",	"cc:-DL_ENDIAN -DTERMIOS::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
 | 
			
		||||
 | 
			
		||||
# Linux on ARM
 | 
			
		||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# UnixWare 2.0x fails destest with -O
 | 
			
		||||
"unixware-2.0","cc:-DFILIO_H::-Kthread:-lsocket -lnsl -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
 | 
			
		||||
@@ -389,7 +381,7 @@ my %table=(
 | 
			
		||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
"unixware-7-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
"unixware-7-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
# OpenUNIX 8
 | 
			
		||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
 | 
			
		||||
@@ -438,11 +430,9 @@ my %table=(
 | 
			
		||||
 | 
			
		||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the
 | 
			
		||||
# SCO cc.
 | 
			
		||||
"sco5-cc",  "cc:-belf::(unknown):-lsocket -lresolv:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
 | 
			
		||||
"sco5-cc",  "cc:::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
 | 
			
		||||
"sco5-cc-pentium",  "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
 | 
			
		||||
"sco5-gcc",  "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
 | 
			
		||||
"sco5-cc-shared","cc:-belf:::-lsocket -lresolv -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr3-shared:-Kpic",
 | 
			
		||||
"sco5-gcc-shared","gcc:-O3 -DFILIO_H -fomit-frame-pointer:::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC",
 | 
			
		||||
 | 
			
		||||
# Sinix/ReliantUNIX RM400
 | 
			
		||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g  */
 | 
			
		||||
@@ -477,9 +467,8 @@ my %table=(
 | 
			
		||||
# and its library files in util/pl/*)
 | 
			
		||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
 | 
			
		||||
# Cygwin
 | 
			
		||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
 | 
			
		||||
# CygWin32
 | 
			
		||||
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 | 
			
		||||
 | 
			
		||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 | 
			
		||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
 | 
			
		||||
@@ -488,14 +477,14 @@ my %table=(
 | 
			
		||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown)::::::",
 | 
			
		||||
 | 
			
		||||
# Some OpenBSD from Bob Beck <beck@obtuse.com>
 | 
			
		||||
"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-x86",  "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD",      "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-x86",  "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD",      "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
"OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 | 
			
		||||
 | 
			
		||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
 | 
			
		||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -D_DARWIN -DB_ENDIAN::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
 | 
			
		||||
"darwin-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
 | 
			
		||||
 | 
			
		||||
##### Sony NEWS-OS 4.x
 | 
			
		||||
"newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
 | 
			
		||||
@@ -505,29 +494,6 @@ my %table=(
 | 
			
		||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
 | 
			
		||||
	BC-16 Mingw32);
 | 
			
		||||
 | 
			
		||||
my $idx = 0;
 | 
			
		||||
my $idx_cc = $idx++;
 | 
			
		||||
my $idx_cflags = $idx++;
 | 
			
		||||
my $idx_unistd = $idx++;
 | 
			
		||||
my $idx_thread_cflag = $idx++;
 | 
			
		||||
my $idx_lflags = $idx++;
 | 
			
		||||
my $idx_bn_ops = $idx++;
 | 
			
		||||
my $idx_bn_obj = $idx++;
 | 
			
		||||
my $idx_des_obj = $idx++;
 | 
			
		||||
my $idx_bf_obj = $idx++;
 | 
			
		||||
my $idx_md5_obj = $idx++;
 | 
			
		||||
my $idx_sha1_obj = $idx++;
 | 
			
		||||
my $idx_cast_obj = $idx++;
 | 
			
		||||
my $idx_rc4_obj = $idx++;
 | 
			
		||||
my $idx_rmd160_obj = $idx++;
 | 
			
		||||
my $idx_rc5_obj = $idx++;
 | 
			
		||||
my $idx_dso_scheme = $idx++;
 | 
			
		||||
my $idx_shared_target = $idx++;
 | 
			
		||||
my $idx_shared_cflag = $idx++;
 | 
			
		||||
my $idx_shared_ldflag = $idx++;
 | 
			
		||||
my $idx_shared_extension = $idx++;
 | 
			
		||||
my $idx_ranlib = $idx++;
 | 
			
		||||
 | 
			
		||||
my $prefix="";
 | 
			
		||||
my $openssldir="";
 | 
			
		||||
my $exe_ext="";
 | 
			
		||||
@@ -600,11 +566,7 @@ PROCESS_ARGS:
 | 
			
		||||
	foreach (@argvcopy)
 | 
			
		||||
		{
 | 
			
		||||
		s /^-no-/no-/; # some people just can't read the instructions
 | 
			
		||||
		if (/^--test-sanity$/)
 | 
			
		||||
			{
 | 
			
		||||
			exit(&test_sanity());
 | 
			
		||||
			}
 | 
			
		||||
		elsif (/^no-asm$/)
 | 
			
		||||
		if (/^no-asm$/)
 | 
			
		||||
		 	{
 | 
			
		||||
			$no_asm=1;
 | 
			
		||||
			$flags .= "-DNO_ASM ";
 | 
			
		||||
@@ -745,17 +707,13 @@ if ($target eq "LIST") {
 | 
			
		||||
	exit 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if ($target =~ m/^CygWin32(-.*)$/) {
 | 
			
		||||
	$target = "Cygwin".$1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
print "Configuring for $target\n";
 | 
			
		||||
 | 
			
		||||
&usage if (!defined($table{$target}));
 | 
			
		||||
 | 
			
		||||
my $IsWindows=scalar grep /^$target$/,@WinTargets;
 | 
			
		||||
 | 
			
		||||
$exe_ext=".exe" if ($target eq "Cygwin");
 | 
			
		||||
$exe_ext=".exe" if ($target eq "CygWin32");
 | 
			
		||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
 | 
			
		||||
$prefix=$openssldir if $prefix eq "";
 | 
			
		||||
 | 
			
		||||
@@ -768,29 +726,9 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
 | 
			
		||||
 | 
			
		||||
print "IsWindows=$IsWindows\n";
 | 
			
		||||
 | 
			
		||||
my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
my $cc = $fields[$idx_cc];
 | 
			
		||||
my $cflags = $fields[$idx_cflags];
 | 
			
		||||
my $unistd = $fields[$idx_unistd];
 | 
			
		||||
my $thread_cflag = $fields[$idx_thread_cflag];
 | 
			
		||||
my $lflags = $fields[$idx_lflags];
 | 
			
		||||
my $bn_ops = $fields[$idx_bn_ops];
 | 
			
		||||
my $bn_obj = $fields[$idx_bn_obj];
 | 
			
		||||
my $des_obj = $fields[$idx_des_obj];
 | 
			
		||||
my $bf_obj = $fields[$idx_bf_obj];
 | 
			
		||||
my $md5_obj = $fields[$idx_md5_obj];
 | 
			
		||||
my $sha1_obj = $fields[$idx_sha1_obj];
 | 
			
		||||
my $cast_obj = $fields[$idx_cast_obj];
 | 
			
		||||
my $rc4_obj = $fields[$idx_rc4_obj];
 | 
			
		||||
my $rmd160_obj = $fields[$idx_rmd160_obj];
 | 
			
		||||
my $rc5_obj = $fields[$idx_rc5_obj];
 | 
			
		||||
my $dso_scheme = $fields[$idx_dso_scheme];
 | 
			
		||||
my $shared_target = $fields[$idx_shared_target];
 | 
			
		||||
my $shared_cflag = $fields[$idx_shared_cflag];
 | 
			
		||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
 | 
			
		||||
my $shared_extension = $fields[$idx_shared_extension];
 | 
			
		||||
my $ranlib = $fields[$idx_ranlib];
 | 
			
		||||
 | 
			
		||||
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
 | 
			
		||||
 $md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,my $shared_extension,my $ranlib)=
 | 
			
		||||
	split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
$cflags="$flags$cflags" if ($flags ne "");
 | 
			
		||||
 | 
			
		||||
# The DSO code currently always implements all functions so that no
 | 
			
		||||
@@ -1004,7 +942,6 @@ while (<IN>)
 | 
			
		||||
		my $sotmp = $1;
 | 
			
		||||
		s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
 | 
			
		||||
		}
 | 
			
		||||
	s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/;
 | 
			
		||||
	print OUT $_."\n";
 | 
			
		||||
	}
 | 
			
		||||
close(IN);
 | 
			
		||||
@@ -1292,7 +1229,7 @@ sub print_table_entry
 | 
			
		||||
	my $bn_obj,my $des_obj,my $bf_obj,
 | 
			
		||||
	my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
 | 
			
		||||
	my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
 | 
			
		||||
	my $shared_ldflag,my $shared_extension,my $ranlib)=
 | 
			
		||||
	my $shared_extension,my $ranlib)=
 | 
			
		||||
	split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
			
 | 
			
		||||
	print <<EOF
 | 
			
		||||
@@ -1316,44 +1253,7 @@ sub print_table_entry
 | 
			
		||||
\$dso_scheme   = $dso_scheme
 | 
			
		||||
\$shared_target= $shared_target
 | 
			
		||||
\$shared_cflag = $shared_cflag
 | 
			
		||||
\$shared_ldflag = $shared_ldflag
 | 
			
		||||
\$shared_extension = $shared_extension
 | 
			
		||||
\$ranlib       = $ranlib
 | 
			
		||||
EOF
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
sub test_sanity
 | 
			
		||||
	{
 | 
			
		||||
	my $errorcnt = 0;
 | 
			
		||||
 | 
			
		||||
	print STDERR "=" x 70, "\n";
 | 
			
		||||
	print STDERR "=== SANITY TESTING!\n";
 | 
			
		||||
	print STDERR "=== No configuration will be done, all other arguments will be ignored!\n";
 | 
			
		||||
	print STDERR "=" x 70, "\n";
 | 
			
		||||
 | 
			
		||||
	foreach $target (sort keys %table)
 | 
			
		||||
		{
 | 
			
		||||
		@fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
 | 
			
		||||
 | 
			
		||||
		if ($fields[$idx_dso_scheme-1] =~ /^(dl|dlfcn|win32|vms)$/)
 | 
			
		||||
			{
 | 
			
		||||
			$errorcnt++;
 | 
			
		||||
			print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] values\n";
 | 
			
		||||
			print STDERR "              in the previous field\n";
 | 
			
		||||
			}
 | 
			
		||||
		elsif ($fields[$idx_dso_scheme+1] =~ /^(dl|dlfcn|win32|vms)$/)
 | 
			
		||||
			{
 | 
			
		||||
			$errorcnt++;
 | 
			
		||||
			print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] values\n";
 | 
			
		||||
			print STDERR "              in the following field\n";
 | 
			
		||||
			}
 | 
			
		||||
		elsif ($fields[$idx_dso_scheme] !~ /^(dl|dlfcn|win32|vms|)$/)
 | 
			
		||||
			{
 | 
			
		||||
			$errorcnt++;
 | 
			
		||||
			print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] field = ",$fields[$idx_dso_scheme],"\n";
 | 
			
		||||
			print STDERR "              valid values are 'dl', 'dlfcn', 'win32' and 'vms'\n";
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	print STDERR "No sanity errors detected!\n" if $errorcnt == 0;
 | 
			
		||||
	return $errorcnt;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								INSTALL.W32
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								INSTALL.W32
									
									
									
									
									
								
							@@ -2,14 +2,11 @@
 | 
			
		||||
 INSTALLATION ON THE WIN32 PLATFORM
 | 
			
		||||
 ----------------------------------
 | 
			
		||||
 | 
			
		||||
 Heres a few comments about building OpenSSL in Windows environments.  Most
 | 
			
		||||
 of this is tested on Win32 but it may also work in Win 3.1 with some
 | 
			
		||||
 Heres a few comments about building OpenSSL in Windows environments. Most of
 | 
			
		||||
 this is tested on Win32 but it may also work in Win 3.1 with some
 | 
			
		||||
 modification.
 | 
			
		||||
 | 
			
		||||
 You need Perl for Win32.  Unless you will build on CygWin32, you will need
 | 
			
		||||
 ActiveState Perl, available from http://www.activestate.com/ActivePerl.
 | 
			
		||||
 For CygWin32 users, there's more info in the CygWin32 section.
 | 
			
		||||
 | 
			
		||||
 You need Perl for Win32 (available from http://www.activestate.com/ActivePerl)
 | 
			
		||||
 and one of the following C compilers:
 | 
			
		||||
 | 
			
		||||
  * Visual C++
 | 
			
		||||
@@ -152,9 +149,7 @@
 | 
			
		||||
 | 
			
		||||
 * Install CygWin32 (see http://sourceware.cygnus.com/cygwin)
 | 
			
		||||
 | 
			
		||||
 * Install Perl and ensure it is in the path (recent Cygwin perl 
 | 
			
		||||
   (version 5.6.1-2 of the latter has been reported to work) or
 | 
			
		||||
   ActivePerl)
 | 
			
		||||
 * Install Perl and ensure it is in the path
 | 
			
		||||
 | 
			
		||||
 * Run the CygWin bash shell
 | 
			
		||||
 | 
			
		||||
@@ -188,9 +183,8 @@
 | 
			
		||||
 Installation
 | 
			
		||||
 ------------
 | 
			
		||||
 | 
			
		||||
 If you used the CygWin procedure above, you have already installed and
 | 
			
		||||
 can skip this section.  For all other procedures, there's currently no real
 | 
			
		||||
 installation procedure for Win32.  There are, however, some suggestions:
 | 
			
		||||
 There's currently no real installation procedure for Win32.  There are,
 | 
			
		||||
 however, some suggestions:
 | 
			
		||||
 | 
			
		||||
    - do nothing.  The include files are found in the inc32/ subdirectory,
 | 
			
		||||
      all binaries are found in out32dll/ or out32/ depending if you built
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										104
									
								
								Makefile.org
									
									
									
									
									
								
							
							
						
						
									
										104
									
								
								Makefile.org
									
									
									
									
									
								
							@@ -183,7 +183,6 @@ SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 | 
			
		||||
SHARED_SSL=libssl$(SHLIB_EXT)
 | 
			
		||||
SHARED_LIBS=
 | 
			
		||||
SHARED_LIBS_LINK_EXTS=
 | 
			
		||||
SHARED_LDFLAGS=
 | 
			
		||||
 | 
			
		||||
GENERAL=        Makefile
 | 
			
		||||
BASENAME=       openssl
 | 
			
		||||
@@ -236,22 +235,19 @@ clean-shared:
 | 
			
		||||
			done; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
 | 
			
		||||
		if [ "$(PLATFORM)" = "Cygwin" ]; then \
 | 
			
		||||
			( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
 | 
			
		||||
		fi; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
link-shared:
 | 
			
		||||
	@if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
 | 
			
		||||
		tmp="$(SHARED_LIBS_LINK_EXTS)"; \
 | 
			
		||||
		for i in $(SHLIBDIRS); do \
 | 
			
		||||
			prev=lib$$i$(SHLIB_EXT); \
 | 
			
		||||
	@for i in $(SHLIBDIRS); do \
 | 
			
		||||
		prev=lib$$i$(SHLIB_EXT); \
 | 
			
		||||
		if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
 | 
			
		||||
			tmp="$(SHARED_LIBS_LINK_EXTS)"; \
 | 
			
		||||
			for j in $${tmp:-x}; do \
 | 
			
		||||
				( set -x; ln -f -s $$prev lib$$i$$j ); \
 | 
			
		||||
				prev=lib$$i$$j; \
 | 
			
		||||
			done; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
		fi; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
 | 
			
		||||
 | 
			
		||||
@@ -259,8 +255,7 @@ do_bsd-gcc-shared: do_gnu-shared
 | 
			
		||||
do_linux-shared: do_gnu-shared
 | 
			
		||||
do_gnu-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
		-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
	( set -x; ${CC}  -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		-Wl,--whole-archive lib$$i.a \
 | 
			
		||||
		-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
@@ -274,34 +269,13 @@ DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
 | 
			
		||||
	[ -n "$$my_ld" ] && \
 | 
			
		||||
	$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
 | 
			
		||||
 | 
			
		||||
# For Darwin AKA Mac OS/X (dyld)
 | 
			
		||||
do_darwin-shared: 
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
 | 
			
		||||
		lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
 | 
			
		||||
		-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
 | 
			
		||||
	libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
 | 
			
		||||
	echo "" ; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
do_cygwin-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; ${CC}  -shared -o cyg$$i.dll \
 | 
			
		||||
		-Wl,--whole-archive lib$$i.a \
 | 
			
		||||
		-Wl,--out-implib,lib$$i.dll.a \
 | 
			
		||||
		-Wl,--no-whole-archive $$libs ) || exit 1; \
 | 
			
		||||
	libs="$$libs -l$$i"; \
 | 
			
		||||
	done
 | 
			
		||||
 | 
			
		||||
# This assumes that GNU utilities are *not* used
 | 
			
		||||
do_alpha-osf1-shared:
 | 
			
		||||
	if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-shared -o lib$$i.so \
 | 
			
		||||
		( set -x; ${CC}  -shared -o lib$$i.so \
 | 
			
		||||
			-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
			
		||||
			-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
@@ -316,8 +290,7 @@ do_tru64-shared:
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-shared -msym -o lib$$i.so \
 | 
			
		||||
		( set -x; ${CC}  -shared -msym -o lib$$i.so \
 | 
			
		||||
			-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
			
		||||
			-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
@@ -332,8 +305,7 @@ do_tru64-shared-rpath:
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-shared -msym -o lib$$i.so \
 | 
			
		||||
		( set -x; ${CC}  -shared -msym -o lib$$i.so \
 | 
			
		||||
			-rpath  ${INSTALLTOP}/lib \
 | 
			
		||||
			-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
 | 
			
		||||
			-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
@@ -349,16 +321,15 @@ do_solaris-shared:
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		  set -x; ${CC}  -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
# OpenServer 5 native compilers used
 | 
			
		||||
do_svr3-shared:
 | 
			
		||||
# UnixWare 7 and OpenUNIX 8 native compilers used
 | 
			
		||||
do_svr5-shared:
 | 
			
		||||
	if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
@@ -376,34 +347,13 @@ do_svr3-shared:
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
# UnixWare 7 and OpenUNIX 8 native compilers used
 | 
			
		||||
do_svr5-shared:
 | 
			
		||||
	if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
 | 
			
		||||
		  find . -name "*.o" -print > allobjs ; \
 | 
			
		||||
		  OBJS= ; export OBJS ; \
 | 
			
		||||
		  for obj in `ar t lib$$i.a` ; do \
 | 
			
		||||
		    OBJS="$${OBJS} `grep $$obj allobjs`" ; \
 | 
			
		||||
		  done ; \
 | 
			
		||||
		  set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
		done; \
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
# This assumes that GNU utilities are *not* used
 | 
			
		||||
do_irix-shared:
 | 
			
		||||
	if ${DETECT_GNU_LD}; then \
 | 
			
		||||
		$(MAKE) do_gnu-shared; \
 | 
			
		||||
	else \
 | 
			
		||||
		libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
		( set -x; ${CC} ${SHARED_LDFLAGS} \
 | 
			
		||||
			-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
			-all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
 | 
			
		||||
		libs="$$libs -l$$i"; \
 | 
			
		||||
@@ -412,9 +362,8 @@ do_irix-shared:
 | 
			
		||||
 | 
			
		||||
# This assumes that GNU utilities are *not* used
 | 
			
		||||
do_hpux-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
 | 
			
		||||
		+vnocompatwarnings \
 | 
			
		||||
	libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; /usr/ccs/bin/ld +vnocompatwarnings \
 | 
			
		||||
		-b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		-Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
@@ -423,9 +372,8 @@ do_hpux-shared:
 | 
			
		||||
 | 
			
		||||
# This assumes that GNU utilities are *not* used
 | 
			
		||||
do_hpux64-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
 | 
			
		||||
		-b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
	libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
	( set -x; /usr/ccs/bin/ld -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
 | 
			
		||||
		+forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
 | 
			
		||||
	libs="$$libs -L. -l$$i"; \
 | 
			
		||||
@@ -461,7 +409,7 @@ do_hpux64-shared:
 | 
			
		||||
#  HP/UX-64bit: /usr/ccs/bin/ld
 | 
			
		||||
#  AIX:		$(CC)
 | 
			
		||||
ALLSYMSFLAG=-bnogc
 | 
			
		||||
SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
 | 
			
		||||
SHAREDFLAGS=-G -bE:lib$$i.exp -bM:SRE
 | 
			
		||||
SHAREDCMD=$(CC)
 | 
			
		||||
do_aix-shared:
 | 
			
		||||
	libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
 | 
			
		||||
@@ -650,18 +598,10 @@ install: all install_docs
 | 
			
		||||
		tmp="$(SHARED_LIBS)"; \
 | 
			
		||||
		for i in $${tmp:-x}; \
 | 
			
		||||
		do \
 | 
			
		||||
			if [ -f "$$i" -o -f "$$i.a" ]; then \
 | 
			
		||||
			if [ -f "$$i" ]; then \
 | 
			
		||||
			(       echo installing $$i; \
 | 
			
		||||
				if [ "$(PLATFORM)" != "Cygwin" ]; then \
 | 
			
		||||
					cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
				else \
 | 
			
		||||
					c=`echo $$i | sed 's/^lib/cyg/'`; \
 | 
			
		||||
					cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
 | 
			
		||||
					cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
					chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
 | 
			
		||||
				fi ); \
 | 
			
		||||
				cp -f $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
				chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
			
		||||
			fi \
 | 
			
		||||
		done; \
 | 
			
		||||
		(	here="`pwd`"; \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								README
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
 | 
			
		||||
 OpenSSL 0.9.6d-dev [engine] XX xxx XXXX
 | 
			
		||||
 OpenSSL 0.9.6c [engine] 21 dec 2001
 | 
			
		||||
 | 
			
		||||
 Copyright (c) 1998-2002 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1998-2001 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
			
		||||
 All rights reserved.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,11 +1,10 @@
 | 
			
		||||
 | 
			
		||||
  OpenSSL STATUS                           Last modified at
 | 
			
		||||
  ______________                           $Date: 2001/12/21 03:23:29 $
 | 
			
		||||
  ______________                           $Date: 2001/11/15 08:15:00 $
 | 
			
		||||
 | 
			
		||||
  DEVELOPMENT STATE
 | 
			
		||||
 | 
			
		||||
    o  OpenSSL 0.9.7:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.6c: Released on December  21st, 2001
 | 
			
		||||
    o  OpenSSL 0.9.6b: Released on July       9th, 2001
 | 
			
		||||
    o  OpenSSL 0.9.6a: Released on April      5th, 2001
 | 
			
		||||
    o  OpenSSL 0.9.6:  Released on September 24th, 2000
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@
 | 
			
		||||
#include "wintext.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
 | 
			
		||||
#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
 | 
			
		||||
#define TIMES
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -83,12 +83,12 @@
 | 
			
		||||
#include <openssl/err.h>
 | 
			
		||||
#include <openssl/engine.h>
 | 
			
		||||
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN)
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 | 
			
		||||
# define USE_TOD
 | 
			
		||||
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
 | 
			
		||||
# define TIMES
 | 
			
		||||
#endif
 | 
			
		||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN)
 | 
			
		||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__)
 | 
			
		||||
# define TIMEB
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										35
									
								
								config
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								config
									
									
									
									
									
								
							@@ -299,15 +299,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
 | 
			
		||||
	;;
 | 
			
		||||
 | 
			
		||||
    CYGWIN*)
 | 
			
		||||
	case "$RELEASE" in
 | 
			
		||||
	    [bB]*|1.0|1.[12].*)
 | 
			
		||||
		echo "${MACHINE}-whatever-cygwin_pre1.3"
 | 
			
		||||
		;;
 | 
			
		||||
	    *)
 | 
			
		||||
		echo "${MACHINE}-whatever-cygwin"
 | 
			
		||||
		;;
 | 
			
		||||
	esac
 | 
			
		||||
	exit 0
 | 
			
		||||
	echo "${MACHINE}-whatever-cygwin32"; exit 0
 | 
			
		||||
	;;
 | 
			
		||||
 | 
			
		||||
esac
 | 
			
		||||
@@ -511,29 +503,8 @@ EOF
 | 
			
		||||
	sun4d)	OUT="linux-sparcv8" ;;
 | 
			
		||||
	*)	OUT="linux-sparcv7" ;;
 | 
			
		||||
	esac ;;
 | 
			
		||||
  parisc-*-linux2)
 | 
			
		||||
        CPUARCH=`awk '/cpu family/{print substr($5,1,3)}' /proc/cpuinfo`
 | 
			
		||||
	CPUSCHEDULE=`awk '/^cpu.[ 	]: PA/{print substr($3,3)}' /proc/cpuinfo`
 | 
			
		||||
 | 
			
		||||
	# ??TODO ??  Model transformations
 | 
			
		||||
	# 0. CPU Architecture for the 1.1 processor has letter suffixes. We strip that off
 | 
			
		||||
	#    assuming no further arch. identification will ever be used by GCC.
 | 
			
		||||
	# 1. I'm most concerned about whether is a 7300LC is closer to a 7100 versus a 7100LC.
 | 
			
		||||
	# 2. The variant 64-bit processors cause concern should GCC support explicit schedulers
 | 
			
		||||
	#    for these chips in the future.
 | 
			
		||||
	#         PA7300LC -> 7100LC (1.1)
 | 
			
		||||
	#         PA8200   -> 8000   (2.0)
 | 
			
		||||
	#         PA8500   -> 8000   (2.0)
 | 
			
		||||
	#         PA8600   -> 8000   (2.0)
 | 
			
		||||
 | 
			
		||||
	CPUSCHEDULE=`echo $CPUSCHEDULE|sed -e 's/7300LC/7100LC/' -e 's/8?00/8000/'`
 | 
			
		||||
	# Finish Model transformations
 | 
			
		||||
 | 
			
		||||
	options="$options -mschedule=$CPUSCHEDULE -march=$CPUARCH"
 | 
			
		||||
	OUT="linux-parisc" ;;
 | 
			
		||||
  arm*-*-linux2) OUT="linux-elf-arm" ;;
 | 
			
		||||
  s390-*-linux2) OUT="linux-s390" ;;
 | 
			
		||||
  s390x-*-linux?) OUT="linux-s390x" ;;
 | 
			
		||||
  *-*-linux2) OUT="linux-elf" ;;
 | 
			
		||||
  *-*-linux1) OUT="linux-aout" ;;
 | 
			
		||||
  sun4u*-*-solaris2)
 | 
			
		||||
@@ -589,8 +560,8 @@ EOF
 | 
			
		||||
  # *-aix) OUT="aix-$CC" ;;
 | 
			
		||||
  # *-dgux) OUT="dgux" ;;
 | 
			
		||||
  mips-sony-newsos4) OUT="newsos4-gcc" ;;
 | 
			
		||||
  *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
 | 
			
		||||
  *-*-cygwin) OUT="Cygwin" ;;
 | 
			
		||||
  *-*-cygwin32) OUT="CygWin32"
 | 
			
		||||
		options="$options no-threads no-asm" ;;
 | 
			
		||||
  *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -224,7 +224,6 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
 | 
			
		||||
	w=n/8;
 | 
			
		||||
	v=1<<(7-(n&0x07));
 | 
			
		||||
	iv= ~v;
 | 
			
		||||
	if (!value) v=0;
 | 
			
		||||
 | 
			
		||||
	a->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear, set on write */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -203,7 +203,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
 | 
			
		||||
	if (s == NULL)
 | 
			
		||||
		return(NULL);
 | 
			
		||||
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && ! defined(_DARWIN)
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32)
 | 
			
		||||
	gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */
 | 
			
		||||
	ts=&data;
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, unsigned char **pp, long length)
 | 
			
		||||
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
 | 
			
		||||
	{
 | 
			
		||||
	struct tm *ts;
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
 | 
			
		||||
	struct tm data;
 | 
			
		||||
 | 
			
		||||
	gmtime_r(&t,&data);
 | 
			
		||||
 
 | 
			
		||||
@@ -203,7 +203,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
 | 
			
		||||
	if (s == NULL)
 | 
			
		||||
		return(NULL);
 | 
			
		||||
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
 | 
			
		||||
	gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */
 | 
			
		||||
	ts=&data;
 | 
			
		||||
#else
 | 
			
		||||
@@ -286,7 +286,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
 | 
			
		||||
 | 
			
		||||
	t -= offset*60; /* FIXME: may overflow in extreme cases */
 | 
			
		||||
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
 | 
			
		||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
 | 
			
		||||
	{ struct tm data; gmtime_r(&t, &data); tm = &data; }
 | 
			
		||||
#else
 | 
			
		||||
	tm = gmtime(&t);
 | 
			
		||||
 
 | 
			
		||||
@@ -356,8 +356,8 @@ typedef struct bio_f_buffer_ctx_struct
 | 
			
		||||
#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
 | 
			
		||||
#define BIO_get_conn_hostname(b)  BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
 | 
			
		||||
#define BIO_get_conn_port(b)      BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
 | 
			
		||||
#define BIO_get_conn_ip(b) 		 BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
 | 
			
		||||
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3)
 | 
			
		||||
#define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2)
 | 
			
		||||
#define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define BIO_set_nbio(b,n)	BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,6 @@
 | 
			
		||||
#define CONF_COMMENT		128
 | 
			
		||||
#define CONF_FCOMMENT		2048
 | 
			
		||||
#define CONF_EOF		8
 | 
			
		||||
#define CONF_HIGHBIT		4096
 | 
			
		||||
#define CONF_ALPHA		(CONF_UPPER|CONF_LOWER)
 | 
			
		||||
#define CONF_ALPHA_NUMERIC	(CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
 | 
			
		||||
#define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \
 | 
			
		||||
@@ -79,102 +78,68 @@
 | 
			
		||||
 | 
			
		||||
#define KEYTYPES(c)		((unsigned short *)((c)->meth_data))
 | 
			
		||||
#ifndef CHARSET_EBCDIC
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[(a)&0x7f]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_ALPHA_NUMERIC_PUNCT(c,a) \
 | 
			
		||||
				(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
 | 
			
		||||
#define IS_HIGHBIT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
 | 
			
		||||
				(KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_DQUOTE)
 | 
			
		||||
 | 
			
		||||
#else /*CHARSET_EBCDIC*/
 | 
			
		||||
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_ALPHA_NUMERIC_PUNCT(c,a) \
 | 
			
		||||
				(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE)
 | 
			
		||||
#define IS_HIGHBIT(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT)
 | 
			
		||||
				(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_DQUOTE)
 | 
			
		||||
#endif /*CHARSET_EBCDIC*/
 | 
			
		||||
 | 
			
		||||
static unsigned short CONF_type_default[256]={
 | 
			
		||||
	0x0008,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0010,0x0010,0x0000,0x0000,0x0010,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0010,0x0200,0x0040,0x0080,0x0000,0x0200,0x0200,0x0040,
 | 
			
		||||
	0x0000,0x0000,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,
 | 
			
		||||
	0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
 | 
			
		||||
	0x0001,0x0001,0x0000,0x0200,0x0000,0x0000,0x0000,0x0200,
 | 
			
		||||
	0x0200,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0000,0x0020,0x0000,0x0200,0x0100,
 | 
			
		||||
	0x0040,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0000,0x0200,0x0000,0x0200,0x0000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
static unsigned short CONF_type_default[128]={
 | 
			
		||||
	0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000,
 | 
			
		||||
	0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x010,0x200,0x040,0x080,0x000,0x200,0x200,0x040,
 | 
			
		||||
	0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200,
 | 
			
		||||
	0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001,
 | 
			
		||||
	0x001,0x001,0x000,0x200,0x000,0x000,0x000,0x200,
 | 
			
		||||
	0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x000,0x020,0x000,0x200,0x100,
 | 
			
		||||
	0x040,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000,
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
static unsigned short CONF_type_win32[256]={
 | 
			
		||||
	0x0008,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0010,0x0010,0x0000,0x0000,0x0010,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
 | 
			
		||||
	0x0010,0x0200,0x0400,0x0000,0x0000,0x0200,0x0200,0x0000,
 | 
			
		||||
	0x0000,0x0000,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,
 | 
			
		||||
	0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
 | 
			
		||||
	0x0001,0x0001,0x0000,0x0A00,0x0000,0x0000,0x0000,0x0200,
 | 
			
		||||
	0x0200,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,0x0002,
 | 
			
		||||
	0x0002,0x0002,0x0002,0x0000,0x0000,0x0000,0x0200,0x0100,
 | 
			
		||||
	0x0000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,
 | 
			
		||||
	0x0004,0x0004,0x0004,0x0000,0x0200,0x0000,0x0200,0x0000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
	0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
 | 
			
		||||
static unsigned short CONF_type_win32[128]={
 | 
			
		||||
	0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000,
 | 
			
		||||
	0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
 | 
			
		||||
	0x010,0x200,0x400,0x000,0x000,0x200,0x200,0x000,
 | 
			
		||||
	0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200,
 | 
			
		||||
	0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001,
 | 
			
		||||
	0x001,0x001,0x000,0xA00,0x000,0x000,0x000,0x200,
 | 
			
		||||
	0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002,
 | 
			
		||||
	0x002,0x002,0x002,0x000,0x000,0x000,0x200,0x100,
 | 
			
		||||
	0x000,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004,
 | 
			
		||||
	0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000,
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,9 +12,8 @@ $DQUOTE=0x400;
 | 
			
		||||
$COMMENT=0x80;
 | 
			
		||||
$FCOMMENT=0x800;
 | 
			
		||||
$EOF=0x08;
 | 
			
		||||
$HIGHBIT=0x1000;
 | 
			
		||||
 | 
			
		||||
foreach (0 .. 255)
 | 
			
		||||
foreach (0 .. 127)
 | 
			
		||||
	{
 | 
			
		||||
	$v=0;
 | 
			
		||||
	$c=sprintf("%c",$_);
 | 
			
		||||
@@ -28,12 +27,11 @@ foreach (0 .. 255)
 | 
			
		||||
	$v|=$QUOTE	if ($c =~ /['`"]/); # for emacs: "`'}/)
 | 
			
		||||
	$v|=$COMMENT	if ($c =~ /\#/);
 | 
			
		||||
	$v|=$EOF	if ($c =~ /\0/);
 | 
			
		||||
	$v|=$HIGHBIT	if ($c =~/[\x80-\xff]/);
 | 
			
		||||
 | 
			
		||||
	push(@V_def,$v);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
foreach (0 .. 255)
 | 
			
		||||
foreach (0 .. 127)
 | 
			
		||||
	{
 | 
			
		||||
	$v=0;
 | 
			
		||||
	$c=sprintf("%c",$_);
 | 
			
		||||
@@ -46,7 +44,6 @@ foreach (0 .. 255)
 | 
			
		||||
	$v|=$DQUOTE	if ($c =~ /["]/); # for emacs: "}/)
 | 
			
		||||
	$v|=$FCOMMENT	if ($c =~ /;/);
 | 
			
		||||
	$v|=$EOF	if ($c =~ /\0/);
 | 
			
		||||
	$v|=$HIGHBIT	if ($c =~/[\x80-\xff]/);
 | 
			
		||||
 | 
			
		||||
	push(@V_w32,$v);
 | 
			
		||||
	}
 | 
			
		||||
@@ -125,7 +122,6 @@ print <<"EOF";
 | 
			
		||||
#define CONF_COMMENT		$COMMENT
 | 
			
		||||
#define CONF_FCOMMENT		$FCOMMENT
 | 
			
		||||
#define CONF_EOF		$EOF
 | 
			
		||||
#define CONF_HIGHBIT		$HIGHBIT
 | 
			
		||||
#define CONF_ALPHA		(CONF_UPPER|CONF_LOWER)
 | 
			
		||||
#define CONF_ALPHA_NUMERIC	(CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
 | 
			
		||||
#define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\
 | 
			
		||||
@@ -133,53 +129,51 @@ print <<"EOF";
 | 
			
		||||
 | 
			
		||||
#define KEYTYPES(c)		((unsigned short *)((c)->meth_data))
 | 
			
		||||
#ifndef CHARSET_EBCDIC
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[(a)&0x7f]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
 | 
			
		||||
				(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
 | 
			
		||||
#define IS_HIGHBIT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
 | 
			
		||||
				(KEYTYPES(c)[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[(a)&0x7f]&CONF_DQUOTE)
 | 
			
		||||
 | 
			
		||||
#else /*CHARSET_EBCDIC*/
 | 
			
		||||
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_COMMENT(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_COMMENT)
 | 
			
		||||
#define IS_FCOMMENT(c,a)	(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_FCOMMENT)
 | 
			
		||||
#define IS_EOF(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_EOF)
 | 
			
		||||
#define IS_ESC(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ESC)
 | 
			
		||||
#define IS_NUMBER(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_NUMBER)
 | 
			
		||||
#define IS_WS(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_WS)
 | 
			
		||||
#define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC)
 | 
			
		||||
#define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
 | 
			
		||||
				(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE)
 | 
			
		||||
#define IS_HIGHBIT(c,a)		(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT)
 | 
			
		||||
				(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
 | 
			
		||||
#define IS_QUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_QUOTE)
 | 
			
		||||
#define IS_DQUOTE(c,a)		(KEYTYPES(c)[os_toascii[a]&0x7f]&CONF_DQUOTE)
 | 
			
		||||
#endif /*CHARSET_EBCDIC*/
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
print "static unsigned short CONF_type_default[256]={";
 | 
			
		||||
print "static unsigned short CONF_type_default[128]={";
 | 
			
		||||
 | 
			
		||||
for ($i=0; $i<256; $i++)
 | 
			
		||||
for ($i=0; $i<128; $i++)
 | 
			
		||||
	{
 | 
			
		||||
	print "\n\t" if ($i % 8) == 0;
 | 
			
		||||
	printf "0x%04X,",$V_def[$i];
 | 
			
		||||
	printf "0x%03X,",$V_def[$i];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
print "\n\t};\n\n";
 | 
			
		||||
 | 
			
		||||
print "static unsigned short CONF_type_win32[256]={";
 | 
			
		||||
print "static unsigned short CONF_type_win32[128]={";
 | 
			
		||||
 | 
			
		||||
for ($i=0; $i<256; $i++)
 | 
			
		||||
for ($i=0; $i<128; $i++)
 | 
			
		||||
	{
 | 
			
		||||
	print "\n\t" if ($i % 8) == 0;
 | 
			
		||||
	printf "0x%04X,",$V_w32[$i];
 | 
			
		||||
	printf "0x%03X,",$V_w32[$i];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
print "\n\t};\n\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ static unsigned const char cov_2char[64]={
 | 
			
		||||
void fcrypt_body(DES_LONG *out,des_key_schedule ks,
 | 
			
		||||
	DES_LONG Eswap0, DES_LONG Eswap1);
 | 
			
		||||
 | 
			
		||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(_DARWIN)
 | 
			
		||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
 | 
			
		||||
char *crypt(const char *buf, const char *salt)
 | 
			
		||||
	{
 | 
			
		||||
	return(des_crypt(buf, salt));
 | 
			
		||||
 
 | 
			
		||||
@@ -164,20 +164,19 @@ hw_aep.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/engine.h ../../include/openssl/err.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
 | 
			
		||||
hw_aep.o: vendor_defns/aep.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/err.h ../../include/openssl/evp.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
 | 
			
		||||
hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
 | 
			
		||||
hw_aep.o: ../cryptlib.h engine_int.h vendor_defns/aep.h
 | 
			
		||||
hw_atalla.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
 | 
			
		||||
hw_atalla.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
 | 
			
		||||
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
 | 
			
		||||
 
 | 
			
		||||
@@ -414,15 +414,12 @@ void ERR_load_ENGINE_strings(void);
 | 
			
		||||
#define ENGINE_R_BN_CTX_FULL				 101
 | 
			
		||||
#define ENGINE_R_BN_EXPAND_FAIL				 102
 | 
			
		||||
#define ENGINE_R_CHIL_ERROR				 123
 | 
			
		||||
#define ENGINE_R_CLOSE_HANDLES_FAILED			 140
 | 
			
		||||
#define ENGINE_R_CONFLICTING_ENGINE_ID			 103
 | 
			
		||||
#define ENGINE_R_CONNECTIONS_IN_USE			 141
 | 
			
		||||
#define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED		 119
 | 
			
		||||
#define ENGINE_R_DSO_FAILURE				 104
 | 
			
		||||
#define ENGINE_R_ENGINE_IS_NOT_IN_LIST			 105
 | 
			
		||||
#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY		 128
 | 
			
		||||
#define ENGINE_R_FAILED_LOADING_PUBLIC_KEY		 129
 | 
			
		||||
#define ENGINE_R_FINALIZE_FAILED			 142
 | 
			
		||||
#define ENGINE_R_FINISH_FAILED				 106
 | 
			
		||||
#define ENGINE_R_GET_HANDLE_FAILED			 107
 | 
			
		||||
#define ENGINE_R_GET_RANDOM_FAILED			 133
 | 
			
		||||
 
 | 
			
		||||
@@ -188,15 +188,12 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
 | 
			
		||||
{ENGINE_R_BN_CTX_FULL                    ,"BN_CTX full"},
 | 
			
		||||
{ENGINE_R_BN_EXPAND_FAIL                 ,"bn_expand fail"},
 | 
			
		||||
{ENGINE_R_CHIL_ERROR                     ,"chil error"},
 | 
			
		||||
{ENGINE_R_CLOSE_HANDLES_FAILED           ,"close handles failed"},
 | 
			
		||||
{ENGINE_R_CONFLICTING_ENGINE_ID          ,"conflicting engine id"},
 | 
			
		||||
{ENGINE_R_CONNECTIONS_IN_USE             ,"connections in use"},
 | 
			
		||||
{ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED   ,"ctrl command not implemented"},
 | 
			
		||||
{ENGINE_R_DSO_FAILURE                    ,"DSO failure"},
 | 
			
		||||
{ENGINE_R_ENGINE_IS_NOT_IN_LIST          ,"engine is not in the list"},
 | 
			
		||||
{ENGINE_R_FAILED_LOADING_PRIVATE_KEY     ,"failed loading private key"},
 | 
			
		||||
{ENGINE_R_FAILED_LOADING_PUBLIC_KEY      ,"failed loading public key"},
 | 
			
		||||
{ENGINE_R_FINALIZE_FAILED                ,"finalize failed"},
 | 
			
		||||
{ENGINE_R_FINISH_FAILED                  ,"finish failed"},
 | 
			
		||||
{ENGINE_R_GET_HANDLE_FAILED              ,"could not obtain hardware handle"},
 | 
			
		||||
{ENGINE_R_GET_RANDOM_FAILED              ,"get random failed"},
 | 
			
		||||
 
 | 
			
		||||
@@ -58,14 +58,7 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <openssl/bn.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include <openssl/e_os.h>
 | 
			
		||||
#ifndef MSDOS
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#else
 | 
			
		||||
#include <process.h>
 | 
			
		||||
typedef int pid_t;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <openssl/crypto.h>
 | 
			
		||||
#include "cryptlib.h"
 | 
			
		||||
@@ -82,31 +75,22 @@ typedef int pid_t;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int aep_init();
 | 
			
		||||
static int aep_finish();
 | 
			
		||||
static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR hConnection);
 | 
			
		||||
static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection);
 | 
			
		||||
static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use);
 | 
			
		||||
static int aep_init(void);
 | 
			
		||||
static int aep_finish(void);
 | 
			
		||||
static int aep_get_connection(unsigned int *hConnection);
 | 
			
		||||
static int aep_return_connection(unsigned int hConnection);
 | 
			
		||||
 | 
			
		||||
/* BIGNUM stuff */
 | 
			
		||||
static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
		       const BIGNUM *m, BN_CTX *ctx);
 | 
			
		||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
 | 
			
		||||
			      const BIGNUM *p, const BIGNUM *q,
 | 
			
		||||
			      const BIGNUM *dmp1, const BIGNUM *dmq1,
 | 
			
		||||
			      const BIGNUM *iqmp, BN_CTX *ctx);
 | 
			
		||||
 | 
			
		||||
/* RSA stuff */
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
static int aep_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
 | 
			
		||||
static int aep_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
			    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
 | 
			
		||||
 | 
			
		||||
/* DSA stuff */
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
static int aep_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
 | 
			
		||||
			   BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
 | 
			
		||||
			   BN_CTX *ctx, BN_MONT_CTX *in_mont);
 | 
			
		||||
@@ -114,30 +98,15 @@ static int aep_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
 | 
			
		||||
static int aep_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
 | 
			
		||||
			   const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
 | 
			
		||||
			   BN_MONT_CTX *m_ctx);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* DH stuff */
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
/* This function is aliased to mod_exp (with the DH and mont dropped). */
 | 
			
		||||
static int aep_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
			  const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
 | 
			
		||||
#endif
 | 
			
		||||
	
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
		
 | 
			
		||||
/* rand stuff   */
 | 
			
		||||
static int aep_rand(unsigned char *buf, int num);
 | 
			
		||||
static int aep_rand_status(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Bignum conversion stuff */
 | 
			
		||||
static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32* BigNumSize);
 | 
			
		||||
static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize,
 | 
			
		||||
			    unsigned char* AEP_BigNum);
 | 
			
		||||
static AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize,
 | 
			
		||||
			       unsigned char* AEP_BigNum);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
/* Our internal RSA_METHOD that we provide pointers to */
 | 
			
		||||
static RSA_METHOD aep_rsa =
 | 
			
		||||
{
 | 
			
		||||
@@ -155,9 +124,7 @@ static RSA_METHOD aep_rsa =
 | 
			
		||||
  NULL,                /*rsa_sign*/
 | 
			
		||||
  NULL                 /*rsa_verify*/
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
/* Our internal DSA_METHOD that we provide pointers to */
 | 
			
		||||
static DSA_METHOD aep_dsa =
 | 
			
		||||
{
 | 
			
		||||
@@ -172,9 +139,7 @@ static DSA_METHOD aep_dsa =
 | 
			
		||||
  0,                   /* flags */
 | 
			
		||||
  NULL                 /* app_data */
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
/* Our internal DH_METHOD that we provide pointers to */
 | 
			
		||||
static DH_METHOD aep_dh =
 | 
			
		||||
{
 | 
			
		||||
@@ -187,9 +152,6 @@ static DH_METHOD aep_dh =
 | 
			
		||||
  0,
 | 
			
		||||
  NULL
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
/* our internal RAND_method that we provide pointers to  */
 | 
			
		||||
static RAND_METHOD aep_random =
 | 
			
		||||
{
 | 
			
		||||
@@ -199,10 +161,9 @@ static RAND_METHOD aep_random =
 | 
			
		||||
  NULL,
 | 
			
		||||
  NULL,
 | 
			
		||||
  aep_rand,
 | 
			
		||||
  aep_rand_status,
 | 
			
		||||
  NULL,
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
/* Our ENGINE structure. */
 | 
			
		||||
static ENGINE engine_aep =
 | 
			
		||||
{
 | 
			
		||||
@@ -211,11 +172,7 @@ static ENGINE engine_aep =
 | 
			
		||||
  &aep_rsa,
 | 
			
		||||
  &aep_dsa,
 | 
			
		||||
  &aep_dh,
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
  &aep_random,
 | 
			
		||||
#else
 | 
			
		||||
  NULL,
 | 
			
		||||
#endif
 | 
			
		||||
  aep_mod_exp,
 | 
			
		||||
  NULL,
 | 
			
		||||
  aep_init,
 | 
			
		||||
@@ -234,25 +191,20 @@ static AEP_CONNECTION_ENTRY aep_app_conn_table[MAX_PROCESS_CONNECTIONS];
 | 
			
		||||
/*Used to determine if this is a new process*/
 | 
			
		||||
static pid_t    recorded_pid = 0;
 | 
			
		||||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
static int rnd_reference;
 | 
			
		||||
 | 
			
		||||
static AEP_U8   rand_block[RAND_BLK_SIZE];
 | 
			
		||||
static AEP_U32  rand_block_bytes = 0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* As this is only ever called once, there's no need for locking
 | 
			
		||||
 * (indeed - the lock will already be held by our caller!!!) */
 | 
			
		||||
ENGINE *ENGINE_aep()
 | 
			
		||||
{
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
  RSA_METHOD  *meth1;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
  DSA_METHOD  *meth2;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
  DH_METHOD   *meth3;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  /* We know that the "PKCS1_SSLeay()" functions hook properly
 | 
			
		||||
   * to the aep-specific mod_exp and mod_exp_crt so we use
 | 
			
		||||
@@ -261,18 +213,15 @@ ENGINE *ENGINE_aep()
 | 
			
		||||
   * code may not hook properly, and if you own one of these
 | 
			
		||||
   * cards then you have the right to do RSA operations on it
 | 
			
		||||
   * anyway! */
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
  meth1 = RSA_PKCS1_SSLeay();
 | 
			
		||||
  aep_rsa.rsa_pub_enc = meth1->rsa_pub_enc;
 | 
			
		||||
  aep_rsa.rsa_pub_dec = meth1->rsa_pub_dec;
 | 
			
		||||
  aep_rsa.rsa_priv_enc = meth1->rsa_priv_enc;
 | 
			
		||||
  aep_rsa.rsa_priv_dec = meth1->rsa_priv_dec;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /* Use the DSA_OpenSSL() method and just hook the mod_exp-ish
 | 
			
		||||
   * bits. */
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
  meth2 = DSA_OpenSSL();
 | 
			
		||||
  aep_dsa.dsa_do_sign    = meth2->dsa_do_sign;
 | 
			
		||||
  aep_dsa.dsa_sign_setup = meth2->dsa_sign_setup;
 | 
			
		||||
@@ -281,15 +230,12 @@ ENGINE *ENGINE_aep()
 | 
			
		||||
  aep_dsa = *DSA_get_default_openssl_method(); 
 | 
			
		||||
  aep_dsa.dsa_mod_exp = aep_dsa_mod_exp; 
 | 
			
		||||
  aep_dsa.bn_mod_exp = aep_mod_exp_dsa;      
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  /* Much the same for Diffie-Hellman */
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
  meth3 = DH_OpenSSL();
 | 
			
		||||
  aep_dh.generate_key = meth3->generate_key;
 | 
			
		||||
  aep_dh.compute_key  = meth3->compute_key;
 | 
			
		||||
  aep_dh.bn_mod_exp   = meth3->bn_mod_exp;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  return &engine_aep;
 | 
			
		||||
}
 | 
			
		||||
@@ -301,31 +247,12 @@ ENGINE *ENGINE_aep()
 | 
			
		||||
 * implicitly. */
 | 
			
		||||
static DSO *aep_dso = NULL;
 | 
			
		||||
 | 
			
		||||
/* These are the static string constants for the DSO file name and the function
 | 
			
		||||
 * symbol names to bind to. 
 | 
			
		||||
*/
 | 
			
		||||
static const char *AEP_LIBNAME = "aep";
 | 
			
		||||
 | 
			
		||||
static const char *AEP_F1    = "AEP_ModExp";
 | 
			
		||||
static const char *AEP_F2    = "AEP_ModExpCrt";
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
static const char *AEP_F3    = "AEP_GenRandom";
 | 
			
		||||
#endif
 | 
			
		||||
static const char *AEP_F4    = "AEP_Finalize";
 | 
			
		||||
static const char *AEP_F5    = "AEP_Initialize";
 | 
			
		||||
static const char *AEP_F6    = "AEP_OpenConnection";
 | 
			
		||||
static const char *AEP_F7    = "AEP_SetBNCallBacks";
 | 
			
		||||
static const char *AEP_F8    = "AEP_CloseConnection";
 | 
			
		||||
 | 
			
		||||
/* These are the function pointers that are (un)set when the library has
 | 
			
		||||
 * successfully (un)loaded. */
 | 
			
		||||
static t_AEP_OpenConnection    *p_AEP_OpenConnection  = NULL;
 | 
			
		||||
static t_AEP_CloseConnection   *p_AEP_CloseConnection = NULL;
 | 
			
		||||
static t_AEP_ModExp            *p_AEP_ModExp          = NULL;
 | 
			
		||||
static t_AEP_ModExpCrt         *p_AEP_ModExpCrt       = NULL;
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
static t_AEP_GenRandom         *p_AEP_GenRandom       = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
static t_AEP_Initialize        *p_AEP_Initialize      = NULL;
 | 
			
		||||
static t_AEP_Finalize          *p_AEP_Finalize        = NULL;
 | 
			
		||||
static t_AEP_SetBNCallBacks    *p_AEP_SetBNCallBacks  = NULL;
 | 
			
		||||
@@ -335,14 +262,13 @@ static int aep_init()
 | 
			
		||||
{
 | 
			
		||||
  t_AEP_ModExp          *p1;
 | 
			
		||||
  t_AEP_ModExpCrt       *p2;
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
  t_AEP_GenRandom       *p3;
 | 
			
		||||
#endif
 | 
			
		||||
  t_AEP_Finalize        *p4;
 | 
			
		||||
  t_AEP_Initialize      *p5;
 | 
			
		||||
  t_AEP_OpenConnection  *p6;
 | 
			
		||||
  t_AEP_SetBNCallBacks  *p7;
 | 
			
		||||
  t_AEP_CloseConnection *p8;
 | 
			
		||||
 | 
			
		||||
  unsigned int hConnection,rv;
 | 
			
		||||
 | 
			
		||||
  int to_return = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -365,14 +291,11 @@ static int aep_init()
 | 
			
		||||
 | 
			
		||||
  if(!(p1 = (t_AEP_ModExp *)         DSO_bind_func( aep_dso,AEP_F1))  ||
 | 
			
		||||
     !(p2 = (t_AEP_ModExpCrt*)       DSO_bind_func( aep_dso,AEP_F2))  ||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
     !(p3 = (t_AEP_GenRandom*)       DSO_bind_func( aep_dso,AEP_F3))  ||
 | 
			
		||||
#endif
 | 
			
		||||
     !(p4 = (t_AEP_Finalize*)        DSO_bind_func( aep_dso,AEP_F4))  ||
 | 
			
		||||
     !(p5 = (t_AEP_Initialize*)      DSO_bind_func( aep_dso,AEP_F5))  ||
 | 
			
		||||
     !(p6 = (t_AEP_OpenConnection*)  DSO_bind_func( aep_dso,AEP_F6))  ||
 | 
			
		||||
     !(p7 = (t_AEP_SetBNCallBacks*)  DSO_bind_func( aep_dso,AEP_F7))  ||
 | 
			
		||||
     !(p8 = (t_AEP_CloseConnection*) DSO_bind_func( aep_dso,AEP_F8)))
 | 
			
		||||
     !(p7 = (t_AEP_SetBNCallBacks*)  DSO_bind_func( aep_dso,AEP_F7)))
 | 
			
		||||
    {
 | 
			
		||||
     
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_DSO_FAILURE);
 | 
			
		||||
@@ -383,14 +306,26 @@ static int aep_init()
 | 
			
		||||
  
 | 
			
		||||
  p_AEP_ModExp           = p1;
 | 
			
		||||
  p_AEP_ModExpCrt        = p2;
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
  p_AEP_GenRandom        = p3;
 | 
			
		||||
#endif
 | 
			
		||||
  p_AEP_Finalize         = p4;
 | 
			
		||||
  p_AEP_Initialize       = p5;
 | 
			
		||||
  p_AEP_OpenConnection   = p6;
 | 
			
		||||
  p_AEP_SetBNCallBacks   = p7;
 | 
			
		||||
  p_AEP_CloseConnection  = p8;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /* Perform a basic test to see if there's actually any unit
 | 
			
		||||
   * running. */
 | 
			
		||||
	
 | 
			
		||||
  CRYPTO_add(&rnd_reference, 1, CRYPTO_LOCK_DYNLOCK); 
 | 
			
		||||
  
 | 
			
		||||
  rv = aep_get_connection(&hConnection);
 | 
			
		||||
     
 | 
			
		||||
  if (rv != AEP_R_OK)     
 | 
			
		||||
       goto err;
 | 
			
		||||
   
 | 
			
		||||
  /* Everything's fine. */
 | 
			
		||||
 
 | 
			
		||||
  rv = aep_return_connection(hConnection);
 | 
			
		||||
 
 | 
			
		||||
  to_return = 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -404,13 +339,10 @@ static int aep_init()
 | 
			
		||||
  p_AEP_OpenConnection    = NULL;
 | 
			
		||||
  p_AEP_ModExp            = NULL;
 | 
			
		||||
  p_AEP_ModExpCrt         = NULL;
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
  p_AEP_GenRandom         = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  p_AEP_Initialize        = NULL;
 | 
			
		||||
  p_AEP_Finalize          = NULL;
 | 
			
		||||
  p_AEP_SetBNCallBacks    = NULL;
 | 
			
		||||
  p_AEP_CloseConnection   = NULL;
 | 
			
		||||
 | 
			
		||||
  return to_return;
 | 
			
		||||
 
 | 
			
		||||
@@ -418,35 +350,13 @@ static int aep_init()
 | 
			
		||||
 | 
			
		||||
static int aep_finish()
 | 
			
		||||
{
 | 
			
		||||
  int to_return = 0, in_use;
 | 
			
		||||
  AEP_RV rv;
 | 
			
		||||
  int to_return = 0;
 | 
			
		||||
 | 
			
		||||
  if(aep_dso == NULL)
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_FINISH,ENGINE_R_NOT_LOADED);
 | 
			
		||||
      goto err;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  rv = aep_close_all_connections(0, &in_use);
 | 
			
		||||
  if (rv != AEP_R_OK)
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_FINISH,ENGINE_R_CLOSE_HANDLES_FAILED);
 | 
			
		||||
      goto err;
 | 
			
		||||
    }
 | 
			
		||||
  if (in_use)
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_FINISH,ENGINE_R_CONNECTIONS_IN_USE);
 | 
			
		||||
      goto err;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  rv = p_AEP_Finalize();
 | 
			
		||||
  if (rv != AEP_R_OK)
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_FINISH,ENGINE_R_FINALIZE_FAILED);
 | 
			
		||||
      goto err;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  if(!DSO_free(aep_dso))
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_FINISH,ENGINE_R_DSO_FAILURE);
 | 
			
		||||
@@ -454,17 +364,16 @@ static int aep_finish()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  aep_dso = NULL;
 | 
			
		||||
  p_AEP_CloseConnection   = NULL;
 | 
			
		||||
  p_AEP_OpenConnection    = NULL;
 | 
			
		||||
  p_AEP_ModExp            = NULL;
 | 
			
		||||
  p_AEP_ModExpCrt         = NULL;
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
  p_AEP_GenRandom         = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
  p_AEP_Initialize        = NULL;
 | 
			
		||||
  p_AEP_Finalize          = NULL;
 | 
			
		||||
  p_AEP_SetBNCallBacks    = NULL;
 | 
			
		||||
 | 
			
		||||
  CRYPTO_add(&rnd_reference, -1, CRYPTO_LOCK_DYNLOCK);    
 | 
			
		||||
 | 
			
		||||
  to_return = 1;
 | 
			
		||||
 err:
 | 
			
		||||
  return to_return;
 | 
			
		||||
@@ -475,8 +384,7 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
{
 | 
			
		||||
  int to_return = 0;
 | 
			
		||||
 | 
			
		||||
  AEP_CONNECTION_HNDL hConnection;
 | 
			
		||||
  AEP_RV rv;
 | 
			
		||||
  unsigned int hConnection, rv;
 | 
			
		||||
 | 
			
		||||
  /*Grab a connection from the pool*/
 | 
			
		||||
  rv = aep_get_connection(&hConnection);
 | 
			
		||||
@@ -508,14 +416,12 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
 err:
 | 
			
		||||
  return to_return;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
 | 
			
		||||
			      const BIGNUM *p, const BIGNUM *q ,
 | 
			
		||||
			      const BIGNUM *dmp1,const BIGNUM *dmq1,
 | 
			
		||||
			      const BIGNUM *iqmp, BN_CTX *ctx)
 | 
			
		||||
	
 | 
			
		||||
static int aep_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *q ,
 | 
			
		||||
			   const BIGNUM *dmp1,const BIGNUM *dmq1,const BIGNUM *iqmp, BN_CTX *ctx)
 | 
			
		||||
{
 | 
			
		||||
  AEP_RV rv = AEP_R_OK;
 | 
			
		||||
  AEP_CONNECTION_HNDL hConnection;
 | 
			
		||||
  unsigned int hConnection;
 | 
			
		||||
 | 
			
		||||
  /*Grab a connection from the pool*/
 | 
			
		||||
  rv = aep_get_connection(&hConnection);
 | 
			
		||||
@@ -548,59 +454,58 @@ static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
 | 
			
		||||
}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
static int aep_rand(unsigned char *buf,int len )
 | 
			
		||||
{
 | 
			
		||||
  AEP_RV rv = AEP_R_OK;
 | 
			
		||||
  AEP_CONNECTION_HNDL hConnection;
 | 
			
		||||
  unsigned int hConnection;
 | 
			
		||||
 | 
			
		||||
  CRYPTO_w_lock(CRYPTO_LOCK_RAND);
 | 
			
		||||
  int to_return = 0;
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
  CRYPTO_w_lock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
 | 
			
		||||
  /*Can the request be serviced with what's already in the buffer?*/
 | 
			
		||||
  if (len <= rand_block_bytes)
 | 
			
		||||
    {
 | 
			
		||||
      memcpy(buf, &rand_block[RAND_BLK_SIZE - rand_block_bytes], len);
 | 
			
		||||
      rand_block_bytes -= len;
 | 
			
		||||
      CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
 | 
			
		||||
    }
 | 
			
		||||
  else
 | 
			
		||||
  /*If not the get another block of random bytes*/
 | 
			
		||||
    {
 | 
			
		||||
      CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
 | 
			
		||||
 | 
			
		||||
      rv = aep_get_connection(&hConnection);
 | 
			
		||||
      if (rv !=  AEP_R_OK)
 | 
			
		||||
	  { 
 | 
			
		||||
          ENGINEerr(ENGINE_F_AEP_RAND,ENGINE_R_GET_HANDLE_FAILED);             
 | 
			
		||||
	  goto err_nounlock;
 | 
			
		||||
          CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
	  goto err;
 | 
			
		||||
	  }
 | 
			
		||||
 | 
			
		||||
      if (len > RAND_BLK_SIZE)
 | 
			
		||||
	  {
 | 
			
		||||
	    rv = p_AEP_GenRandom(hConnection, len, 2, buf, NULL);
 | 
			
		||||
	    if (rv !=  AEP_R_OK)
 | 
			
		||||
		rv = p_AEP_GenRandom(hConnection, len, 2, buf, NULL);
 | 
			
		||||
		if (rv !=  AEP_R_OK)
 | 
			
		||||
	    {  
 | 
			
		||||
              ENGINEerr(ENGINE_F_AEP_RAND,ENGINE_R_GET_RANDOM_FAILED); 
 | 
			
		||||
	      goto err_nounlock;
 | 
			
		||||
	      CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
	      goto err;
 | 
			
		||||
	    }
 | 
			
		||||
	  }
 | 
			
		||||
      else
 | 
			
		||||
	  {
 | 
			
		||||
	    CRYPTO_w_lock(CRYPTO_LOCK_RAND);
 | 
			
		||||
 | 
			
		||||
	    rv = p_AEP_GenRandom(hConnection, RAND_BLK_SIZE, 2, &rand_block[0], NULL);
 | 
			
		||||
	    if (rv !=  AEP_R_OK)
 | 
			
		||||
		rv = p_AEP_GenRandom(hConnection, RAND_BLK_SIZE, 2, &rand_block[0], NULL);
 | 
			
		||||
		if (rv !=  AEP_R_OK)
 | 
			
		||||
	    {       
 | 
			
		||||
              ENGINEerr(ENGINE_F_AEP_RAND,ENGINE_R_GET_RANDOM_FAILED); 
 | 
			
		||||
	      
 | 
			
		||||
              CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
	      goto err;
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	    rand_block_bytes = RAND_BLK_SIZE;
 | 
			
		||||
	    memcpy(buf, &rand_block[RAND_BLK_SIZE - rand_block_bytes], len);
 | 
			
		||||
	    rand_block_bytes -= len;
 | 
			
		||||
		rand_block_bytes = RAND_BLK_SIZE;
 | 
			
		||||
 | 
			
		||||
	    CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
 | 
			
		||||
		memcpy(buf, &rand_block[RAND_BLK_SIZE - rand_block_bytes], len);
 | 
			
		||||
		rand_block_bytes -= len;
 | 
			
		||||
	  }
 | 
			
		||||
 | 
			
		||||
      rv = aep_return_connection(hConnection);
 | 
			
		||||
@@ -608,33 +513,26 @@ static int aep_rand(unsigned char *buf,int len )
 | 
			
		||||
	  {
 | 
			
		||||
          ENGINEerr(ENGINE_F_AEP_RAND,ENGINE_R_RETURN_CONNECTION_FAILED); 
 | 
			
		||||
	  
 | 
			
		||||
	  goto err_nounlock;
 | 
			
		||||
          CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
	  goto err;
 | 
			
		||||
	  }
 | 
			
		||||
    }
 | 
			
		||||
  
 | 
			
		||||
  return 1;
 | 
			
		||||
     CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
 | 
			
		||||
  to_return = 1;
 | 
			
		||||
 err:
 | 
			
		||||
  CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
 | 
			
		||||
 err_nounlock:
 | 
			
		||||
  return 0;
 | 
			
		||||
  return to_return;
 | 
			
		||||
}
 | 
			
		||||
	
 | 
			
		||||
static int aep_rand_status(void)
 | 
			
		||||
{
 | 
			
		||||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
static int aep_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
 | 
			
		||||
{
 | 
			
		||||
  BN_CTX *ctx = NULL;
 | 
			
		||||
 
 | 
			
		||||
  int to_return = 0;
 | 
			
		||||
 
 | 
			
		||||
  AEP_RV rv = AEP_R_OK;
 | 
			
		||||
 | 
			
		||||
  if ((ctx = BN_CTX_new()) == NULL)
 | 
			
		||||
    goto err;
 | 
			
		||||
 | 
			
		||||
  if (!aep_dso)
 | 
			
		||||
    {
 | 
			
		||||
      ENGINEerr(ENGINE_F_AEP_RSA_MOD_EXP,ENGINE_R_NOT_LOADED);
 | 
			
		||||
@@ -669,9 +567,8 @@ static int aep_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
 | 
			
		||||
    BN_CTX_free(ctx);
 | 
			
		||||
  return to_return;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
		
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
 | 
			
		||||
static int aep_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
 | 
			
		||||
			   BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
 | 
			
		||||
			   BN_CTX *ctx, BN_MONT_CTX *in_mont)
 | 
			
		||||
@@ -700,7 +597,6 @@ static int aep_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
 | 
			
		||||
  return aep_mod_exp(r, a, p, m, ctx); 
 | 
			
		||||
 
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
 | 
			
		||||
static int aep_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
@@ -710,16 +606,15 @@ static int aep_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
/* This function is aliased to mod_exp (with the dh and mont dropped). */
 | 
			
		||||
static int aep_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
			  const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
 | 
			
		||||
{
 | 
			
		||||
    return aep_mod_exp(r, a, p, m, ctx);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int aep_get_connection(unsigned int *hConnection)
 | 
			
		||||
{
 | 
			
		||||
  int count;
 | 
			
		||||
  AEP_RV rv = AEP_R_OK;
 | 
			
		||||
@@ -735,7 +630,6 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
    process*/
 | 
			
		||||
  if (recorded_pid != curr_pid)
 | 
			
		||||
    {
 | 
			
		||||
      /*Remember our pid so we can check if we're in a new process*/
 | 
			
		||||
      recorded_pid = curr_pid;
 | 
			
		||||
 | 
			
		||||
      /*Call Finalize to make sure we have not inherited some data from a parent
 | 
			
		||||
@@ -749,7 +643,8 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
	{
 | 
			
		||||
	  ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_AEP_INIT_FAILURE);
 | 
			
		||||
	  recorded_pid = 0;
 | 
			
		||||
	  goto end;
 | 
			
		||||
	  CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);	 
 | 
			
		||||
	  return rv;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      /*Set the AEP big num call back functions*/
 | 
			
		||||
@@ -758,15 +653,14 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
      if (rv != AEP_R_OK)
 | 
			
		||||
	{
 | 
			
		||||
	 
 | 
			
		||||
	  ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_SETBNCALLBACK_FAILURE);
 | 
			
		||||
	  recorded_pid = 0;
 | 
			
		||||
	  goto end;
 | 
			
		||||
        ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_SETBNCALLBACK_FAILURE);
 | 
			
		||||
		recorded_pid = 0;
 | 
			
		||||
		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
		return rv;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
      /*Reset the rand byte count*/
 | 
			
		||||
      rand_block_bytes = 0;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      /*Init the structures*/
 | 
			
		||||
      for (count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
 | 
			
		||||
@@ -776,18 +670,22 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      /*Open a connection*/
 | 
			
		||||
      rv = p_AEP_OpenConnection(phConnection);
 | 
			
		||||
      rv = p_AEP_OpenConnection(hConnection);
 | 
			
		||||
 | 
			
		||||
      if (rv != AEP_R_OK)
 | 
			
		||||
	{
 | 
			
		||||
          ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_UNIT_FAILURE);
 | 
			
		||||
	  recorded_pid = 0;
 | 
			
		||||
	  goto end;
 | 
			
		||||
		  recorded_pid = 0;
 | 
			
		||||
          CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
	  return rv;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      aep_app_conn_table[0].conn_state = InUse;
 | 
			
		||||
      aep_app_conn_table[0].conn_hndl = *phConnection;
 | 
			
		||||
      goto end;
 | 
			
		||||
 | 
			
		||||
      aep_app_conn_table[0].conn_hndl = *hConnection;
 | 
			
		||||
      CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
     
 | 
			
		||||
      return (rv);
 | 
			
		||||
    }
 | 
			
		||||
  /*Check the existing connections to see if we can find a free one*/
 | 
			
		||||
  for (count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
 | 
			
		||||
@@ -796,8 +694,9 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
      if (aep_app_conn_table[count].conn_state == Connected)
 | 
			
		||||
	{
 | 
			
		||||
	  aep_app_conn_table[count].conn_state = InUse;
 | 
			
		||||
	  *phConnection = aep_app_conn_table[count].conn_hndl;
 | 
			
		||||
	  goto end;
 | 
			
		||||
	  *hConnection = aep_app_conn_table[count].conn_hndl;
 | 
			
		||||
          CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); 
 | 
			
		||||
	  return rv;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
  /*If no connections available, we're going to have to try to open a new one*/
 | 
			
		||||
@@ -806,33 +705,33 @@ static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR phConnection)
 | 
			
		||||
        if (aep_app_conn_table[count].conn_state == NotConnected)
 | 
			
		||||
	{
 | 
			
		||||
	  /*Open a connection*/
 | 
			
		||||
	  rv = p_AEP_OpenConnection(phConnection);
 | 
			
		||||
	  rv = p_AEP_OpenConnection(hConnection);
 | 
			
		||||
 | 
			
		||||
	  if (rv != AEP_R_OK)
 | 
			
		||||
	    {	      
 | 
			
		||||
               ENGINEerr(ENGINE_F_AEP_INIT,ENGINE_R_UNIT_FAILURE);
 | 
			
		||||
	       goto end;
 | 
			
		||||
               CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
	       return rv;
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	  aep_app_conn_table[count].conn_state = InUse;
 | 
			
		||||
 | 
			
		||||
	  aep_app_conn_table[count].conn_hndl = *phConnection;
 | 
			
		||||
	  goto end;
 | 
			
		||||
	  aep_app_conn_table[count].conn_hndl = *hConnection;
 | 
			
		||||
          CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
	   return rv;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  rv = AEP_R_GENERAL_ERROR;
 | 
			
		||||
 end:
 | 
			
		||||
  
 | 
			
		||||
  CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
  return rv;
 | 
			
		||||
  return AEP_R_GENERAL_ERROR;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection)
 | 
			
		||||
static int aep_return_connection(unsigned int hConnection)
 | 
			
		||||
{
 | 
			
		||||
  int count;
 | 
			
		||||
 | 
			
		||||
  CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
   CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
 | 
			
		||||
  /*Find the connection item that matches this connection handle*/
 | 
			
		||||
  for(count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
 | 
			
		||||
@@ -845,44 +744,15 @@ static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection)
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
   CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
 | 
			
		||||
  return AEP_R_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use)
 | 
			
		||||
{
 | 
			
		||||
  int count;
 | 
			
		||||
  AEP_RV rv;
 | 
			
		||||
 | 
			
		||||
  *in_use = 0;
 | 
			
		||||
  if (use_engine_lock) CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
  for (count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
 | 
			
		||||
    {
 | 
			
		||||
      switch (aep_app_conn_table[count].conn_state)
 | 
			
		||||
	{
 | 
			
		||||
	case Connected:
 | 
			
		||||
	  rv = p_AEP_CloseConnection(aep_app_conn_table[count].conn_hndl);
 | 
			
		||||
	  if (rv != AEP_R_OK)
 | 
			
		||||
	    return rv;
 | 
			
		||||
	  aep_app_conn_table[count].conn_state = NotConnected;
 | 
			
		||||
	  aep_app_conn_table[count].conn_hndl  = 0;
 | 
			
		||||
	  break;
 | 
			
		||||
	case InUse:
 | 
			
		||||
	  (*in_use)++;
 | 
			
		||||
	  break;
 | 
			
		||||
	case NotConnected:
 | 
			
		||||
	  break;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
  if (use_engine_lock) CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 | 
			
		||||
  return AEP_R_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*BigNum call back functions, used to convert OpenSSL bignums into AEP bignums.
 | 
			
		||||
Note only 32bit Openssl build support*/
 | 
			
		||||
 | 
			
		||||
static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32* BigNumSize)
 | 
			
		||||
AEP_RV GetBigNumSize(void* ArbBigNum, AEP_U32* BigNumSize)
 | 
			
		||||
{
 | 
			
		||||
  BIGNUM* bn;
 | 
			
		||||
 | 
			
		||||
@@ -899,8 +769,7 @@ static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32* BigNumSize)
 | 
			
		||||
  return AEP_R_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize,
 | 
			
		||||
			    unsigned char* AEP_BigNum)
 | 
			
		||||
AEP_RV MakeAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize, unsigned char* AEP_BigNum)
 | 
			
		||||
{
 | 
			
		||||
  BIGNUM* bn;
 | 
			
		||||
 | 
			
		||||
@@ -932,8 +801,7 @@ static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*Turn an AEP Big Num back to a user big num*/
 | 
			
		||||
static AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize,
 | 
			
		||||
			       unsigned char* AEP_BigNum)
 | 
			
		||||
AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize, unsigned char* AEP_BigNum)
 | 
			
		||||
{
 | 
			
		||||
  BIGNUM* bn;
 | 
			
		||||
#ifndef SIXTY_FOUR_BIT_LONG
 | 
			
		||||
 
 | 
			
		||||
@@ -359,7 +359,7 @@ static int get_context(HWCryptoHook_ContextHandle *hac)
 | 
			
		||||
	HWCryptoHook_ErrMsgBuf rmsg;
 | 
			
		||||
 | 
			
		||||
	rmsg.buf = tempbuf;
 | 
			
		||||
	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
	rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
        *hac = p_hwcrhk_Init(&hwcrhk_globals, sizeof(hwcrhk_globals), &rmsg,
 | 
			
		||||
		NULL);
 | 
			
		||||
@@ -576,12 +576,8 @@ static EVP_PKEY *hwcrhk_load_privkey(const char *key_id,
 | 
			
		||||
	EVP_PKEY *res = NULL;
 | 
			
		||||
	HWCryptoHook_MPI e, n;
 | 
			
		||||
	HWCryptoHook_RSAKeyHandle *hptr;
 | 
			
		||||
 	char tempbuf[1024];
 | 
			
		||||
	HWCryptoHook_ErrMsgBuf rmsg;
 | 
			
		||||
 | 
			
		||||
 	rmsg.buf = tempbuf;
 | 
			
		||||
 	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
 | 
			
		||||
	if(!hwcrhk_context)
 | 
			
		||||
		{
 | 
			
		||||
		ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY,
 | 
			
		||||
@@ -669,12 +665,9 @@ static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, const char *passphrase)
 | 
			
		||||
			res->pkey.rsa = RSA_new();
 | 
			
		||||
			res->pkey.rsa->n = rsa->n;
 | 
			
		||||
			res->pkey.rsa->e = rsa->e;
 | 
			
		||||
 			rsa->n = NULL;
 | 
			
		||||
 			rsa->e = NULL;
 | 
			
		||||
			CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
 | 
			
		||||
			RSA_free(rsa);
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY,
 | 
			
		||||
				ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED);
 | 
			
		||||
@@ -702,7 +695,7 @@ static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 | 
			
		||||
 
 | 
			
		||||
	to_return = 0; /* expect failure */
 | 
			
		||||
	rmsg.buf = tempbuf;
 | 
			
		||||
	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
	rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
	if(!hwcrhk_context)
 | 
			
		||||
		{
 | 
			
		||||
@@ -752,9 +745,6 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa)
 | 
			
		||||
	HWCryptoHook_RSAKeyHandle *hptr;
 | 
			
		||||
	int to_return = 0, ret;
 | 
			
		||||
 | 
			
		||||
	rmsg.buf = tempbuf;
 | 
			
		||||
	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
 | 
			
		||||
	if(!hwcrhk_context)
 | 
			
		||||
		{
 | 
			
		||||
		ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_NOT_INITIALISED);
 | 
			
		||||
@@ -776,6 +766,9 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa)
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		rmsg.buf = tempbuf;
 | 
			
		||||
		rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
		/* Prepare the params */
 | 
			
		||||
		bn_expand2(r, rsa->n->top); /* Check for error !! */
 | 
			
		||||
		BN2MPI(m_a, I);
 | 
			
		||||
@@ -816,6 +809,9 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa)
 | 
			
		||||
			goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		rmsg.buf = tempbuf;
 | 
			
		||||
		rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
		/* Prepare the params */
 | 
			
		||||
		bn_expand2(r, rsa->n->top); /* Check for error !! */
 | 
			
		||||
		BN2MPI(m_a, I);
 | 
			
		||||
@@ -880,7 +876,7 @@ static int hwcrhk_rand_bytes(unsigned char *buf, int num)
 | 
			
		||||
	int ret;
 | 
			
		||||
 | 
			
		||||
	rmsg.buf = tempbuf;
 | 
			
		||||
	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
	rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
	if(!hwcrhk_context)
 | 
			
		||||
		{
 | 
			
		||||
@@ -926,7 +922,7 @@ static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
 | 
			
		||||
	int ret;
 | 
			
		||||
 | 
			
		||||
	rmsg.buf = tempbuf;
 | 
			
		||||
	rmsg.size = sizeof(tempbuf);
 | 
			
		||||
	rmsg.size = 1024;
 | 
			
		||||
 | 
			
		||||
	hptr = (HWCryptoHook_RSAKeyHandle *) item;
 | 
			
		||||
	if(!hptr) return;
 | 
			
		||||
 
 | 
			
		||||
@@ -128,7 +128,7 @@ typedef AEP_TRANSACTION_ID 		*AEP_TRANSACTION_ID_PTR;
 | 
			
		||||
/*Return value type*/
 | 
			
		||||
typedef AEP_U32					AEP_RV;
 | 
			
		||||
 | 
			
		||||
#define MAX_PROCESS_CONNECTIONS 256
 | 
			
		||||
#define MAX_PROCESS_CONNECTIONS 5
 | 
			
		||||
 | 
			
		||||
#define RAND_BLK_SIZE 1024
 | 
			
		||||
 | 
			
		||||
@@ -145,33 +145,47 @@ typedef struct AEP_CONNECTION_ENTRY{
 | 
			
		||||
} AEP_CONNECTION_ENTRY;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef AEP_RV t_AEP_OpenConnection(AEP_CONNECTION_HNDL_PTR phConnection);
 | 
			
		||||
typedef AEP_RV t_AEP_CloseConnection(AEP_CONNECTION_HNDL hConnection);
 | 
			
		||||
AEP_RV GetBigNumSize(void* ArbBigNum, AEP_U32* BigNumSize);
 | 
			
		||||
AEP_RV MakeAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize, unsigned char* AEP_BigNum);
 | 
			
		||||
AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize, unsigned char* AEP_BigNum);
 | 
			
		||||
 | 
			
		||||
typedef AEP_RV t_AEP_ModExp(AEP_CONNECTION_HNDL hConnection,
 | 
			
		||||
			    AEP_VOID_PTR pA, AEP_VOID_PTR pP,
 | 
			
		||||
			    AEP_VOID_PTR pN,
 | 
			
		||||
			    AEP_VOID_PTR pResult,
 | 
			
		||||
			    AEP_TRANSACTION_ID* pidTransID);
 | 
			
		||||
 | 
			
		||||
typedef AEP_RV t_AEP_ModExpCrt(AEP_CONNECTION_HNDL hConnection,
 | 
			
		||||
			       AEP_VOID_PTR pA, AEP_VOID_PTR pP,
 | 
			
		||||
			       AEP_VOID_PTR pQ,
 | 
			
		||||
			       AEP_VOID_PTR pDmp1, AEP_VOID_PTR pDmq1,
 | 
			
		||||
			       AEP_VOID_PTR pIqmp,
 | 
			
		||||
			       AEP_VOID_PTR pResult,
 | 
			
		||||
			       AEP_TRANSACTION_ID* pidTransID);
 | 
			
		||||
 | 
			
		||||
#ifdef AEPRAND
 | 
			
		||||
typedef AEP_RV t_AEP_GenRandom(AEP_CONNECTION_HNDL hConnection,
 | 
			
		||||
			       AEP_U32 Len,
 | 
			
		||||
			       AEP_U32 Type,
 | 
			
		||||
			       AEP_VOID_PTR pResult,
 | 
			
		||||
			       AEP_TRANSACTION_ID* pidTransID);
 | 
			
		||||
#endif
 | 
			
		||||
typedef unsigned int t_AEP_OpenConnection(unsigned int *phConnection);
 | 
			
		||||
 | 
			
		||||
typedef AEP_RV t_AEP_Initialize(AEP_VOID_PTR pInitArgs);
 | 
			
		||||
typedef AEP_RV t_AEP_Finalize();
 | 
			
		||||
typedef AEP_RV t_AEP_SetBNCallBacks(AEP_RV (*GetBigNumSizeFunc)(),
 | 
			
		||||
				    AEP_RV (*MakeAEPBigNumFunc)(),
 | 
			
		||||
				    AEP_RV (*ConverAEPBigNumFunc)());
 | 
			
		||||
typedef unsigned int t_AEP_ModExp(unsigned int hConnection, void *a, void *p,
 | 
			
		||||
                                  void *n, void *r,AEP_U64 *tranid);
 | 
			
		||||
 | 
			
		||||
typedef unsigned int t_AEP_ModExpCrt(unsigned int hConnection,void *a, void *p,
 | 
			
		||||
                                  void *q, void *dmp1, void *dmq1,void *iqmp,
 | 
			
		||||
						  void *r,AEP_U64 *tranid);
 | 
			
		||||
 | 
			
		||||
typedef unsigned int t_AEP_GenRandom(AEP_CONNECTION_HNDL             hConnection,
 | 
			
		||||
                AEP_U32                                 Len,
 | 
			
		||||
                AEP_U32                                 Type,
 | 
			
		||||
                AEP_VOID_PTR                    pResult,
 | 
			
		||||
                AEP_TRANSACTION_ID*             pidTransID
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef unsigned int t_AEP_Initialize(AEP_VOID_PTR pInitArgs);
 | 
			
		||||
typedef unsigned int t_AEP_Finalize();
 | 
			
		||||
typedef unsigned int t_AEP_SetBNCallBacks(
 | 
			
		||||
                AEP_RV (*GetBigNumSizeFunc)(),
 | 
			
		||||
                AEP_RV (*MakeAEPBigNumFunc)(),
 | 
			
		||||
                AEP_RV (*ConverAEPBigNumFunc)()
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
/* These are the static string constants for the DSO file name and the function
 | 
			
		||||
 * symbol names to bind to. 
 | 
			
		||||
*/
 | 
			
		||||
static const char *AEP_LIBNAME = "aep";
 | 
			
		||||
 | 
			
		||||
static const char *AEP_F1    = "AEP_ModExp";
 | 
			
		||||
static const char *AEP_F2    = "AEP_ModExpCrt";
 | 
			
		||||
static const char *AEP_F3    = "AEP_GenRandom";
 | 
			
		||||
static const char *AEP_F4    = "AEP_Finalize";
 | 
			
		||||
static const char *AEP_F5    = "AEP_Initialize";
 | 
			
		||||
static const char *AEP_F6    = "AEP_OpenConnection";
 | 
			
		||||
static const char *AEP_F7    = "AEP_SetBNCallBacks";
 | 
			
		||||
 
 | 
			
		||||
@@ -499,7 +499,7 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
 | 
			
		||||
#define EVP_CIPHER_key_length(e)	((e)->key_len)
 | 
			
		||||
#define EVP_CIPHER_iv_length(e)		((e)->iv_len)
 | 
			
		||||
#define EVP_CIPHER_flags(e)		((e)->flags)
 | 
			
		||||
#define EVP_CIPHER_mode(e)		(((e)->flags) & EVP_CIPH_MODE)
 | 
			
		||||
#define EVP_CIPHER_mode(e)		((e)->flags) & EVP_CIPH_MODE)
 | 
			
		||||
 | 
			
		||||
#define EVP_CIPHER_CTX_cipher(e)	((e)->cipher)
 | 
			
		||||
#define EVP_CIPHER_CTX_nid(e)		((e)->cipher->nid)
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,6 @@ MAKE=		make -f Makefile.ssl
 | 
			
		||||
MAKEDEPEND=	$(TOP)/util/domd $(TOP)
 | 
			
		||||
MAKEFILE=	Makefile.ssl
 | 
			
		||||
AR=		ar r
 | 
			
		||||
PERL=		perl
 | 
			
		||||
 | 
			
		||||
CFLAGS= $(INCLUDES) $(CFLAG)
 | 
			
		||||
 | 
			
		||||
@@ -45,11 +44,11 @@ lib:	$(LIBOBJ)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
obj_dat.h: obj_dat.pl obj_mac.h
 | 
			
		||||
	$(PERL) obj_dat.pl obj_mac.h obj_dat.h
 | 
			
		||||
	perl obj_dat.pl obj_mac.h obj_dat.h
 | 
			
		||||
 | 
			
		||||
# objects.pl both reads and writes obj_mac.num
 | 
			
		||||
obj_mac.h: objects.pl objects.txt obj_mac.num
 | 
			
		||||
	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
 | 
			
		||||
	perl objects.pl objects.txt obj_mac.num obj_mac.h
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
 | 
			
		||||
 
 | 
			
		||||
@@ -406,9 +406,10 @@ id-on 1			: id-on-personalData
 | 
			
		||||
# personal data attributes
 | 
			
		||||
id-pda 1		: id-pda-dateOfBirth
 | 
			
		||||
id-pda 2		: id-pda-placeOfBirth
 | 
			
		||||
id-pda 3		: id-pda-gender
 | 
			
		||||
id-pda 4		: id-pda-countryOfCitizenship
 | 
			
		||||
id-pda 5		: id-pda-countryOfResidence
 | 
			
		||||
id-pda 3		: id-pda-pseudonym
 | 
			
		||||
id-pda 4		: id-pda-gender
 | 
			
		||||
id-pda 5		: id-pda-countryOfCitizenship
 | 
			
		||||
id-pda 6		: id-pda-countryOfResidence
 | 
			
		||||
 | 
			
		||||
# attribute certificate attributes
 | 
			
		||||
id-aca 1		: id-aca-authenticationInfo
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,8 @@
 | 
			
		||||
 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
 | 
			
		||||
 *  major minor fix final patch/beta)
 | 
			
		||||
 */
 | 
			
		||||
#define OPENSSL_VERSION_NUMBER	0x00906040L
 | 
			
		||||
#define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.6d-dev [engine] XX xxx XXXX"
 | 
			
		||||
#define OPENSSL_VERSION_NUMBER	0x0090603fL
 | 
			
		||||
#define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.6c [engine] 21 dec 2001"
 | 
			
		||||
#define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -67,38 +67,6 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
 | 
			
		||||
			 void *value);
 | 
			
		||||
static ASN1_TYPE *get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid);
 | 
			
		||||
 | 
			
		||||
static int PKCS7_type_is_other(PKCS7* p7)
 | 
			
		||||
	{
 | 
			
		||||
	int isOther=1;
 | 
			
		||||
	
 | 
			
		||||
	int nid=OBJ_obj2nid(p7->type);
 | 
			
		||||
 | 
			
		||||
	switch( nid )
 | 
			
		||||
		{
 | 
			
		||||
	case NID_pkcs7_data:
 | 
			
		||||
	case NID_pkcs7_signed:
 | 
			
		||||
	case NID_pkcs7_enveloped:
 | 
			
		||||
	case NID_pkcs7_signedAndEnveloped:
 | 
			
		||||
	case NID_pkcs7_digest:
 | 
			
		||||
	case NID_pkcs7_encrypted:
 | 
			
		||||
		isOther=0;
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		isOther=1;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	return isOther;
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int PKCS7_type_is_octet_string(PKCS7* p7)
 | 
			
		||||
	{
 | 
			
		||||
	if ( 0==PKCS7_type_is_other(p7) )
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
	return (V_ASN1_OCTET_STRING==p7->d.other->type) ? 1 : 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
 | 
			
		||||
	{
 | 
			
		||||
	int i,j;
 | 
			
		||||
@@ -254,20 +222,13 @@ BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
 | 
			
		||||
		if (p7->detached)
 | 
			
		||||
			bio=BIO_new(BIO_s_null());
 | 
			
		||||
		else {
 | 
			
		||||
			if (PKCS7_type_is_signed(p7) ) { 
 | 
			
		||||
				if ( PKCS7_type_is_data(p7->d.sign->contents)) {
 | 
			
		||||
					ASN1_OCTET_STRING *os;
 | 
			
		||||
					os=p7->d.sign->contents->d.data;
 | 
			
		||||
					if (os->length > 0)
 | 
			
		||||
						bio = BIO_new_mem_buf(os->data, os->length);
 | 
			
		||||
				}
 | 
			
		||||
				else if ( PKCS7_type_is_octet_string(p7->d.sign->contents) ) {
 | 
			
		||||
					ASN1_OCTET_STRING *os;
 | 
			
		||||
					os=p7->d.sign->contents->d.other->value.octet_string;
 | 
			
		||||
					if (os->length > 0)
 | 
			
		||||
						bio = BIO_new_mem_buf(os->data, os->length);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			if (PKCS7_type_is_signed(p7) &&
 | 
			
		||||
				PKCS7_type_is_data(p7->d.sign->contents)) {
 | 
			
		||||
				ASN1_OCTET_STRING *os;
 | 
			
		||||
				os=p7->d.sign->contents->d.data;
 | 
			
		||||
				if (os->length > 0) bio = 
 | 
			
		||||
					BIO_new_mem_buf(os->data, os->length);
 | 
			
		||||
			} 
 | 
			
		||||
			if(bio == NULL) {
 | 
			
		||||
				bio=BIO_new(BIO_s_mem());
 | 
			
		||||
				BIO_set_mem_eof_return(bio,0);
 | 
			
		||||
 
 | 
			
		||||
@@ -178,10 +178,8 @@ int MGF1(unsigned char *mask, long len, unsigned char *seed, long seedlen)
 | 
			
		||||
 | 
			
		||||
	for (i = 0; outlen < len; i++)
 | 
			
		||||
		{
 | 
			
		||||
		cnt[0] = (unsigned char)((i >> 24) & 255);
 | 
			
		||||
		cnt[1] = (unsigned char)((i >> 16) & 255);
 | 
			
		||||
		cnt[2] = (unsigned char)((i >> 8)) & 255;
 | 
			
		||||
		cnt[3] = (unsigned char)(i & 255);
 | 
			
		||||
		cnt[0] = (i >> 24) & 255, cnt[1] = (i >> 16) & 255,
 | 
			
		||||
			cnt[2] = (i >> 8) & 255, cnt[3] = i & 255;
 | 
			
		||||
		SHA1_Init(&c);
 | 
			
		||||
		SHA1_Update(&c, seed, seedlen);
 | 
			
		||||
		SHA1_Update(&c, cnt, 4);
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
 | 
			
		||||
OPENSSL_VERSION_NUMBER, SSLeay SSLeay_version - get OpenSSL version number
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
@@ -11,7 +11,7 @@ OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
 | 
			
		||||
 | 
			
		||||
 #include <openssl/crypto.h>
 | 
			
		||||
 long SSLeay(void);
 | 
			
		||||
 const char *SSLeay_version(int t);
 | 
			
		||||
 char *SSLeay_version(int t);
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
@@ -55,28 +55,21 @@ SSLeay_version() returns different strings depending on B<t>:
 | 
			
		||||
=over 4
 | 
			
		||||
 | 
			
		||||
=item SSLEAY_VERSION
 | 
			
		||||
 | 
			
		||||
The text variant of the version number and the release date.  For example,
 | 
			
		||||
"OpenSSL 0.9.5a 1 Apr 2000".
 | 
			
		||||
 | 
			
		||||
=item SSLEAY_CFLAGS
 | 
			
		||||
 | 
			
		||||
The compiler flags set for the compilation process in the form
 | 
			
		||||
"compiler: ..."  if available or "compiler: information not available"
 | 
			
		||||
otherwise.
 | 
			
		||||
 | 
			
		||||
=item SSLEAY_BUILT_ON
 | 
			
		||||
 | 
			
		||||
The date of the build process in the form "built on: ..." if available
 | 
			
		||||
or "built on: date not available" otherwise.
 | 
			
		||||
The flags given to the C compiler when compiling OpenSSL are returned in a
 | 
			
		||||
string.
 | 
			
		||||
 | 
			
		||||
=item SSLEAY_PLATFORM
 | 
			
		||||
 | 
			
		||||
The "Configure" target of the library build in the form "platform: ..."
 | 
			
		||||
if available or "platform: information not available" otherwise.
 | 
			
		||||
The platform name used when OpenSSL was configured is returned.
 | 
			
		||||
 | 
			
		||||
=back
 | 
			
		||||
 | 
			
		||||
If the data request isn't available, a text saying that the information is
 | 
			
		||||
not available is returned.
 | 
			
		||||
 | 
			
		||||
For an unknown B<t>, the text "not available" is returned.
 | 
			
		||||
 | 
			
		||||
=head1 RETURN VALUE
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@ BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
This library implements the Blowfish cipher, which was invented and described
 | 
			
		||||
This library implements the Blowfish cipher, which is invented and described
 | 
			
		||||
by Counterpane (see http://www.counterpane.com/blowfish.html ).
 | 
			
		||||
 | 
			
		||||
Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data.
 | 
			
		||||
@@ -57,7 +57,7 @@ for the same message.  B<ivec> may be initialized with anything, but the
 | 
			
		||||
recipient needs to know what it was initialized with, or it won't be able
 | 
			
		||||
to decrypt.  Some programs and protocols simplify this, like SSH, where
 | 
			
		||||
B<ivec> is simply initialized to zero.
 | 
			
		||||
BF_cbc_encrypt() operates on data that is a multiple of 8 bytes long, while
 | 
			
		||||
BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while
 | 
			
		||||
BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable
 | 
			
		||||
number of bytes (the amount does not have to be an exact multiple of 8).  The
 | 
			
		||||
purpose of the latter two is to simulate stream ciphers, and therefore, they
 | 
			
		||||
 
 | 
			
		||||
@@ -46,8 +46,7 @@ L<sha(3)|sha(3)>
 | 
			
		||||
 | 
			
		||||
=item AUXILIARY FUNCTIONS
 | 
			
		||||
 | 
			
		||||
L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>,
 | 
			
		||||
L<OPENSSL_VERSION_NUMBER(3)|OPENSSL_VERSION_NUMBER(3)>
 | 
			
		||||
L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>
 | 
			
		||||
 | 
			
		||||
=item INPUT/OUTPUT, DATA ENCODING
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,90 +0,0 @@
 | 
			
		||||
=pod
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_cert_cb, SSL_CTX_get_client_cert_cb - handle client certificate callback function
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
 #include <openssl/ssl.h>
 | 
			
		||||
 | 
			
		||||
 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);
 | 
			
		||||
 int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_cert_cb() sets the B<client_cert_cb()> callback, that is
 | 
			
		||||
called when a client certificate is requested by a server.
 | 
			
		||||
When B<client_cert_cb()> is NULL, not callback function is used.
 | 
			
		||||
 | 
			
		||||
SSL_CTX_get_client_cert_cb() returns a pointer to the currently set callback
 | 
			
		||||
function.
 | 
			
		||||
 | 
			
		||||
client_cert_cb() is the application defined callback. If it wants to
 | 
			
		||||
set a certificate, a certificate/private key combination must be set
 | 
			
		||||
using the B<x509> and B<pkey> arguments and "1" must be returned. The
 | 
			
		||||
certificate will be installed into B<ssl>, see the NOTES and BUGS sections.
 | 
			
		||||
If no certificate should be set, "0" has to be returned and the default
 | 
			
		||||
certificate will be sent. A fatal error can be indicated by returning
 | 
			
		||||
a negative value, in which case the handshake will be canceled.
 | 
			
		||||
 | 
			
		||||
=head1 NOTES
 | 
			
		||||
 | 
			
		||||
During a handshake (or renegotiation) a server may request a certificate
 | 
			
		||||
from the client. A client certificate must only be sent, when the server
 | 
			
		||||
did send the request.
 | 
			
		||||
 | 
			
		||||
When no callback function is set, an OpenSSL client will send the certificate
 | 
			
		||||
that was set using the
 | 
			
		||||
L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)> family of functions.
 | 
			
		||||
The TLS standard requires that only a certificate is sent, if it matches
 | 
			
		||||
the list of acceptable CAs sent by the server. This constraint is
 | 
			
		||||
violated by the default behavior of the OpenSSL library. Using the
 | 
			
		||||
callback function it is possible to implement a proper selection routine
 | 
			
		||||
or to allow a user interaction to choose the certificate to be sent.
 | 
			
		||||
The callback function can obtain the list of acceptable CAs using the
 | 
			
		||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)> function.
 | 
			
		||||
 | 
			
		||||
If a callback function is defined, the callback function will be called.
 | 
			
		||||
If the callback function returns a certificate, the OpenSSL library
 | 
			
		||||
will try to load the private key and certificate data into the SSL
 | 
			
		||||
object using SSL_use_certificate() and SSL_use_private_key() functions.
 | 
			
		||||
Thus it will permanently override the certificate and key previously
 | 
			
		||||
installed and will not be reset by calling L<SSL_clear(3)|SSL_clear(3)>.
 | 
			
		||||
If the callback returns no certificate, the OpenSSL library will send
 | 
			
		||||
the certificate previously installed for the SSL_CTX object or the specific
 | 
			
		||||
certificate of the SSL object, if available.
 | 
			
		||||
 | 
			
		||||
=head1 BUGS
 | 
			
		||||
 | 
			
		||||
The client_cert_cb() cannot return a complete certificate chain, it can
 | 
			
		||||
only return one client certificate. If the chain only has a length of 2,
 | 
			
		||||
the root CA certificate may be omitted according to the TLS standard and
 | 
			
		||||
thus a standard conforming answer can be sent to the server. For a
 | 
			
		||||
longer chain, the client must send the complete chain (with the option
 | 
			
		||||
to leave out the root CA certificate). This can only be accomplished by
 | 
			
		||||
either adding the intermediate CA certificates into the trusted
 | 
			
		||||
certificate store for the SSL_CTX object (resulting in having to add
 | 
			
		||||
CA certificates that otherwise maybe would not be trusted), or by adding
 | 
			
		||||
the chain certificates using the
 | 
			
		||||
L<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>
 | 
			
		||||
function, which is only available for the SSL_CTX object as a whole and that
 | 
			
		||||
therefore probably can only apply for one client certificate, making
 | 
			
		||||
the concept of the callback function (to allow the choice from several
 | 
			
		||||
certificates) questionable.
 | 
			
		||||
 | 
			
		||||
Once the SSL object has been used in conjunction with the callback function,
 | 
			
		||||
the certificate will be set for the SSL object and will not be cleared
 | 
			
		||||
even when L<SSL_clear(3)|SSL_clear(3)> is being called. It is therefore
 | 
			
		||||
mandatory to destroy the SSL object using L<SSL_free(3)|SSL_free(3)>
 | 
			
		||||
and create a new one to return to the previous state.
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<ssl(3)|ssl(3)>, L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
 | 
			
		||||
L<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>,
 | 
			
		||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>,
 | 
			
		||||
L<SSL_clear(3)|SSL_clear(3)>, L<SSL_free(3)|SSL_free(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
@@ -55,59 +55,6 @@
 | 
			
		||||
 * 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).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <openssl/buffer.h>
 | 
			
		||||
@@ -1367,7 +1314,6 @@ static int ssl3_get_server_done(SSL *s)
 | 
			
		||||
		/* should contain no data */
 | 
			
		||||
		ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECODE_ERROR);
 | 
			
		||||
		SSLerr(SSL_F_SSL3_GET_SERVER_DONE,SSL_R_LENGTH_MISMATCH);
 | 
			
		||||
		return -1;
 | 
			
		||||
		}
 | 
			
		||||
	ret=1;
 | 
			
		||||
	return(ret);
 | 
			
		||||
 
 | 
			
		||||
@@ -1077,7 +1077,6 @@ start:
 | 
			
		||||
		/* TLS just ignores unknown message types */
 | 
			
		||||
		if (s->version == TLS1_VERSION)
 | 
			
		||||
			{
 | 
			
		||||
			rr->length = 0;
 | 
			
		||||
			goto start;
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@
 | 
			
		||||
 * [including the GNU Public Licence.]
 | 
			
		||||
 */
 | 
			
		||||
/* ====================================================================
 | 
			
		||||
 * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
 | 
			
		||||
 * Copyright (c) 1998-2001 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
 | 
			
		||||
@@ -167,6 +167,7 @@ int ssl3_accept(SSL *s)
 | 
			
		||||
	long num1;
 | 
			
		||||
	int ret= -1;
 | 
			
		||||
	int new_state,state,skip=0;
 | 
			
		||||
	int got_new_session=0;
 | 
			
		||||
 | 
			
		||||
	RAND_add(&Time,sizeof(Time),0);
 | 
			
		||||
	ERR_clear_error();
 | 
			
		||||
@@ -279,7 +280,7 @@ int ssl3_accept(SSL *s)
 | 
			
		||||
			s->shutdown=0;
 | 
			
		||||
			ret=ssl3_get_client_hello(s);
 | 
			
		||||
			if (ret <= 0) goto end;
 | 
			
		||||
			s->new_session = 2;
 | 
			
		||||
			got_new_session=1;
 | 
			
		||||
			s->state=SSL3_ST_SW_SRVR_HELLO_A;
 | 
			
		||||
			s->init_num=0;
 | 
			
		||||
			break;
 | 
			
		||||
@@ -512,7 +513,7 @@ int ssl3_accept(SSL *s)
 | 
			
		||||
 | 
			
		||||
			s->init_num=0;
 | 
			
		||||
 | 
			
		||||
			if (s->new_session == 2) /* skipped if we just sent a HelloRequest */
 | 
			
		||||
			if (got_new_session) /* skipped if we just sent a HelloRequest */
 | 
			
		||||
				{
 | 
			
		||||
				/* actually not necessarily a 'new' session  */
 | 
			
		||||
				
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										56
									
								
								ssl/ssl.h
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								ssl/ssl.h
									
									
									
									
									
								
							@@ -55,59 +55,6 @@
 | 
			
		||||
 * 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).
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef HEADER_SSL_H 
 | 
			
		||||
#define HEADER_SSL_H 
 | 
			
		||||
@@ -637,8 +584,6 @@ struct ssl_st
 | 
			
		||||
	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 */
 | 
			
		||||
	int quiet_shutdown;/* don't send shutdown packets */
 | 
			
		||||
@@ -1267,7 +1212,6 @@ int SSL_COMP_add_compression_method(int id,char *cm);
 | 
			
		||||
/* 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. */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -795,10 +795,7 @@ int SSL_shutdown(SSL *s)
 | 
			
		||||
 | 
			
		||||
int SSL_renegotiate(SSL *s)
 | 
			
		||||
	{
 | 
			
		||||
	if (s->new_session == 0)
 | 
			
		||||
		{
 | 
			
		||||
		s->new_session=1;
 | 
			
		||||
		}
 | 
			
		||||
	s->new_session=1;
 | 
			
		||||
	return(s->method->ssl_renegotiate(s));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -1472,10 +1469,9 @@ void ssl_update_cache(SSL *s,int mode)
 | 
			
		||||
	 * and it would be rather hard to do anyway :-) */
 | 
			
		||||
	if (s->session->session_id_length == 0) return;
 | 
			
		||||
 | 
			
		||||
	i=s->ctx->session_cache_mode;
 | 
			
		||||
	if ((i & mode) && (!s->hit)
 | 
			
		||||
		&& ((i & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)
 | 
			
		||||
		    || SSL_CTX_add_session(s->ctx,s->session))
 | 
			
		||||
	if ((s->ctx->session_cache_mode & mode)
 | 
			
		||||
		&& (!s->hit)
 | 
			
		||||
		&& SSL_CTX_add_session(s->ctx,s->session)
 | 
			
		||||
		&& (s->ctx->new_session_cb != NULL))
 | 
			
		||||
		{
 | 
			
		||||
		CRYPTO_add(&s->session->references,1,CRYPTO_LOCK_SSL_SESSION);
 | 
			
		||||
@@ -1484,6 +1480,7 @@ void ssl_update_cache(SSL *s,int mode)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	/* auto flush every 255 connections */
 | 
			
		||||
	i=s->ctx->session_cache_mode;
 | 
			
		||||
	if ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) &&
 | 
			
		||||
		((i & mode) == mode))
 | 
			
		||||
		{
 | 
			
		||||
 
 | 
			
		||||
@@ -423,10 +423,10 @@ static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
 | 
			
		||||
	if ((c != NULL) && (c->session_id_length != 0))
 | 
			
		||||
		{
 | 
			
		||||
		if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
 | 
			
		||||
		if ((r = (SSL_SESSION *)lh_retrieve(ctx->sessions,c)) == c)
 | 
			
		||||
		r=(SSL_SESSION *)lh_delete(ctx->sessions,c);
 | 
			
		||||
		if (r != NULL)
 | 
			
		||||
			{
 | 
			
		||||
			ret=1;
 | 
			
		||||
			r=(SSL_SESSION *)lh_delete(ctx->sessions,c);
 | 
			
		||||
			SSL_SESSION_list_remove(ctx,c);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -57,7 +57,7 @@ chomp $cversion;
 | 
			
		||||
 | 
			
		||||
if (open(IN,"<CHANGES")) {
 | 
			
		||||
    while(<IN>) {
 | 
			
		||||
	if (/\*\) (.{0,55})/ && !/applies to/) {
 | 
			
		||||
	if (/\*\) (.{0,55})/) {
 | 
			
		||||
	    $last=$1;
 | 
			
		||||
	    last;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user