Compare commits
55 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9dbd24db5 | ||
|
|
b135819d71 | ||
|
|
cbcbd07da2 | ||
|
|
24f6ab73a7 | ||
|
|
5e88347e1b | ||
|
|
cac0d4ee6f | ||
|
|
428759b3d4 | ||
|
|
898d3ecce0 | ||
|
|
004f16f6c4 | ||
|
|
4e2a0e58f2 | ||
|
|
39d29195a7 | ||
|
|
727c9b8027 | ||
|
|
bd4e9b0512 | ||
|
|
7844ff735f | ||
|
|
49e96badcf | ||
|
|
eb6a81bacc | ||
|
|
6687f12988 | ||
|
|
fcd12fc0f1 | ||
|
|
0fb4d54068 | ||
|
|
830a468a23 | ||
|
|
af3ca7b4a9 | ||
|
|
7a6bb17255 | ||
|
|
bc6d459a6e | ||
|
|
ff7f34e353 | ||
|
|
2e3d79aaec | ||
|
|
8a41bcc934 | ||
|
|
e2414b41ad | ||
|
|
266958bce7 | ||
|
|
bc5354cbf0 | ||
|
|
cc4997843e | ||
|
|
ab95eac286 | ||
|
|
1cd76233d1 | ||
|
|
3d5afc8b83 | ||
|
|
d28b7799dd | ||
|
|
b0fb889c29 | ||
|
|
460e80bd1d | ||
|
|
bc1e96e942 | ||
|
|
7ea61df414 | ||
|
|
431712293d | ||
|
|
335ed97263 | ||
|
|
e00b165e9b | ||
|
|
5467ddf0e1 | ||
|
|
7a37dd92ed | ||
|
|
d0c11e9d72 | ||
|
|
5ec52fee2c | ||
|
|
5026bc13bb | ||
|
|
c7d27e5247 | ||
|
|
b7d7af7ea9 | ||
|
|
39663d2c40 | ||
|
|
000299a0e6 | ||
|
|
0a47d82b9b | ||
|
|
198bcece58 | ||
|
|
053677d124 | ||
|
|
804072f014 | ||
|
|
e9429b43ce |
4
CHANGES
4
CHANGES
@@ -806,6 +806,10 @@
|
||||
|
||||
Changes between 0.9.7g and 0.9.7h [XX xxx XXXX]
|
||||
|
||||
*) Minimal support for X9.31 signatures and PSS padding modes. This is
|
||||
mainly for FIPS compliance and not fully integrated at this stage.
|
||||
[Steve Henson]
|
||||
|
||||
*) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform
|
||||
the exponentiation using a fixed-length exponent. (Otherwise,
|
||||
the information leaked through timing could expose the secret key
|
||||
|
||||
35
Configure
35
Configure
@@ -119,7 +119,7 @@ my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax8
|
||||
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
|
||||
|
||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
|
||||
my $ia64_asm=":ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
|
||||
my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
|
||||
|
||||
my $no_asm="::::::::::";
|
||||
|
||||
@@ -164,8 +164,8 @@ my %table=(
|
||||
"debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"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)",
|
||||
"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-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 -march=i486 -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)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown)::::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -184,7 +184,7 @@ 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 -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -march=i486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -shared -static-libgcc might appear controversial, but modules taken
|
||||
# from static libgcc do not have relocations and linking them into our
|
||||
# shared objects doesn't have any negative side-effects. On the contrary,
|
||||
@@ -287,7 +287,7 @@ my %table=(
|
||||
# with debugging of the following config.
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# GCC builds...
|
||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT::ia64.o::aes-ia64.o:::sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT::bn-ia64.o::aes-ia64.o:::sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-ia64-gcc","gcc:-mlp64 -O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-mlp64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# Legacy HPUX 9.X configs...
|
||||
@@ -320,13 +320,14 @@ my %table=(
|
||||
#### IA-32 targets...
|
||||
"linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"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-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
####
|
||||
"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -bpowerpc64-linux is transient option, -m64 should be the one to use...
|
||||
"linux-ppc64", "gcc:-bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-bpowerpc64-linux:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
@@ -370,7 +371,7 @@ my %table=(
|
||||
"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_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)",
|
||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -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}:::",
|
||||
@@ -397,10 +398,9 @@ my %table=(
|
||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.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}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
|
||||
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -484,17 +484,20 @@ my %table=(
|
||||
|
||||
# NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
|
||||
# netware-clib => legacy CLib c-runtime support
|
||||
"netware-clib", "mwccnlm:::::${x86_gcc_opts}:::",
|
||||
"netware-clib", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
# netware-libc => LibC/NKS support
|
||||
"netware-libc", "mwccnlm:::::BN_LLONG ${x86_gcc_opts}:::",
|
||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall::::${x86_gcc_opts}:::",
|
||||
# NetWare defaults socket bio to WinSock sockets. However, the LibC build can be
|
||||
# configured to use BSD sockets instead.
|
||||
"netware-libc", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
"netware-libc-bsdsock", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::",
|
||||
|
||||
# DJGPP
|
||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
|
||||
|
||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
||||
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
|
||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
|
||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::BN_LLONG::::",
|
||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
|
||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
|
||||
|
||||
@@ -511,7 +514,7 @@ my %table=(
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### GNU Hurd
|
||||
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
|
||||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
@@ -530,7 +533,7 @@ my %table=(
|
||||
|
||||
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
|
||||
VC-NT VC-CE VC-WIN32
|
||||
BC-32 OS2-EMX netware-clib netware-libc);
|
||||
BC-32 OS2-EMX netware-clib netware-libc netware-libc-bsdsock);
|
||||
|
||||
my $idx = 0;
|
||||
my $idx_cc = $idx++;
|
||||
@@ -761,7 +764,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
else
|
||||
{
|
||||
die "target already defined - $target\n" if ($target ne "");
|
||||
die "target already defined - $target (offending arg: $_)\n" if ($target ne "");
|
||||
$target=$_;
|
||||
}
|
||||
|
||||
|
||||
10
FAQ
10
FAQ
@@ -47,6 +47,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
|
||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
|
||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
|
||||
* Why does compiler fail to compile sha512.c?
|
||||
|
||||
[PROG] Questions about programming with OpenSSL
|
||||
|
||||
@@ -607,6 +608,15 @@ Intel P4, under control of kernel which does not support SSE2
|
||||
instruction extentions. See accompanying INSTALL file and
|
||||
OPENSSL_ia32cap(3) documentation page for further information.
|
||||
|
||||
* Why does compiler fail to compile sha512.c?
|
||||
|
||||
OpenSSL SHA-512 implementation depends on compiler support for 64-bit
|
||||
integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a
|
||||
couple] lack support for this and therefore are incapable of compiling
|
||||
the module in question. The recommendation is to disable SHA-512 by
|
||||
adding no-sha512 to ./config [or ./Configure] command line. Another
|
||||
possible alternative might be to switch to GCC.
|
||||
|
||||
[PROG] ========================================================================
|
||||
|
||||
* Is OpenSSL thread-safe?
|
||||
|
||||
36
INSTALL.NW
36
INSTALL.NW
@@ -32,6 +32,10 @@ The necessary LibC functionality ships with NetWare 6. However, earlier
|
||||
NetWare 5.x versions will require updates in order to run the OpenSSL LibC
|
||||
build.
|
||||
|
||||
As of June 2005, the LibC build can be configured to use BSD sockets instead
|
||||
of WinSock sockets. Call Configure (usually through netware\build.bat) using
|
||||
a target of "netware-libc-bsdsock" instead of "netware-libc".
|
||||
|
||||
|
||||
REQUIRED TOOLS:
|
||||
---------------
|
||||
@@ -95,7 +99,12 @@ following tools may be required:
|
||||
Microsoft SDK. Note: The winsock2.h support headers may change
|
||||
with various versions of winsock2.h. Check the dependencies
|
||||
section on the NDK WinSock2 download page for the latest
|
||||
information on dependencies.
|
||||
information on dependencies. These components are unsupported by
|
||||
Novell. They are provided as a courtesy, but it is strongly
|
||||
suggested that all development be done using LIBC, not CLIB.
|
||||
|
||||
As of June 2005, the WinSock2 components are available at:
|
||||
http://forgeftp.novell.com//ws2comp/
|
||||
|
||||
|
||||
NLM and NetWare libraries for C (including CLIB and XPlat):
|
||||
@@ -121,7 +130,8 @@ following tools may be required:
|
||||
|
||||
NOTE: The LibC SDK includes the necessary WinSock2 support. It
|
||||
It is not necessary to download the WinSock2 Developer when building
|
||||
for LibC.
|
||||
for LibC. The LibC SDK also includes the appropriate BSD socket support
|
||||
if configuring to use BSD sockets.
|
||||
|
||||
|
||||
BUILDING:
|
||||
@@ -172,8 +182,9 @@ the assembly code. Always run build.bat from the "openssl" directory.
|
||||
|
||||
netware\build [target] [debug opts] [assembly opts] [configure opts]
|
||||
|
||||
target - "netware-clib" - CLib NetWare build
|
||||
- "netware-libc" - LibC NetWare build
|
||||
target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
- "netware-libc" - LibC NetWare build (WinSock Sockets)
|
||||
- "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
|
||||
|
||||
debug opts - "debug" - build debug
|
||||
|
||||
@@ -192,25 +203,29 @@ the assembly code. Always run build.bat from the "openssl" directory.
|
||||
LibC build, non-debug, using NASM assembly:
|
||||
netware\build.bat netware-libc nw-nasm
|
||||
|
||||
LibC build, BSD sockets, non-debug, without assembly:
|
||||
netware\build.bat netware-libc-bsdsock no-asm
|
||||
|
||||
Running build.bat generates a make file to be processed by your make
|
||||
tool (gmake or nmake):
|
||||
|
||||
CLIB ex: gmake -f netware\nlm_clib.mak
|
||||
CLIB ex: gmake -f netware\nlm_clib_dbg.mak
|
||||
LibC ex: gmake -f netware\nlm_libc.mak
|
||||
LibC ex: gmake -f netware\nlm_libc_bsdsock.mak
|
||||
|
||||
|
||||
You can also run the build scripts manually if you do not want to use the
|
||||
build.bat file. Run the following scripts in the "\openssl"
|
||||
subdirectory (in the order listed below):
|
||||
|
||||
perl configure no-asm [other config opts] [netware-clib|netware-libc]
|
||||
perl configure no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock]
|
||||
configures no assembly build for specified netware environment
|
||||
(CLIB or LibC).
|
||||
|
||||
perl util\mkfiles.pl >MINFO
|
||||
generates a listing of source files (used by mk1mf)
|
||||
|
||||
perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc >netware\nlm.mak
|
||||
perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock >netware\nlm.mak
|
||||
generates the makefile for NetWare
|
||||
|
||||
gmake -f netware\nlm.mak
|
||||
@@ -288,13 +303,6 @@ The do_tests.pl script generates a log file "\openssl\test_out\tests.log"
|
||||
which should be reviewed for errors. Any errors will be denoted by the word
|
||||
"ERROR" in the log.
|
||||
|
||||
NOTE: Currently (11/2002), the LibC test nlms report an error while loading
|
||||
when launched from the perl script (do_tests.pl). The problems are
|
||||
being addressed by the LibC development team and should be fixed in the
|
||||
next release. Until the problems are corrected, the LibC test nlms
|
||||
will have to be executed manually.
|
||||
|
||||
|
||||
DEVELOPING WITH THE OPENSSL SDK:
|
||||
--------------------------------
|
||||
Now that everything is built and tested, you are ready to use the OpenSSL
|
||||
|
||||
@@ -150,9 +150,10 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
|
||||
CC='${CC}' CFLAG='${CFLAG}' \
|
||||
AS='${CC}' ASFLAG='${CFLAG} -c' \
|
||||
AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
|
||||
INSTALL_PREFIX='${INSTALL_PREFIX}' \
|
||||
INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
|
||||
MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD ${MAKEDEPPROG}'\
|
||||
MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD ${MAKEDEPPROG}' \
|
||||
DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
|
||||
MAKEDEPPROG='${MAKEDEPPROG}' \
|
||||
LDFLAGS='${LDFLAGS}' SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
|
||||
|
||||
@@ -6,14 +6,15 @@ rem
|
||||
rem usage:
|
||||
rem build [target] [debug opts] [assembly opts] [configure opts]
|
||||
rem
|
||||
rem target - "netware-clib" - CLib NetWare build
|
||||
rem - "netware-libc" - LibC NKS NetWare build
|
||||
rem target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
rem - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)
|
||||
rem - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)
|
||||
rem
|
||||
rem debug opts - "debug" - build debug
|
||||
rem
|
||||
rem assembly opts - "nw-mwasm" - use Metrowerks assembler
|
||||
rem "nw-nasm" - use NASM assembler
|
||||
rem "no-asm" - don't use assembly
|
||||
rem - "nw-nasm" - use NASM assembler
|
||||
rem - "no-asm" - don't use assembly
|
||||
rem
|
||||
rem configure opts- all unrecognized arguments are passed to the
|
||||
rem perl configure script
|
||||
@@ -76,6 +77,8 @@ if "%1" == "netware-clib" set BLD_TARGET=netware-clib
|
||||
if "%1" == "netware-clib" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-libc" set BLD_TARGET=netware-libc
|
||||
if "%1" == "netware-libc" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsock
|
||||
if "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YES
|
||||
|
||||
rem If we didn't recognize the argument, consider it an option for config
|
||||
if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1
|
||||
@@ -92,6 +95,7 @@ rem build the nlm make file name which includes target and debug info
|
||||
set NLM_MAKE=
|
||||
if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib
|
||||
if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc
|
||||
if "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsock
|
||||
if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak
|
||||
if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak
|
||||
|
||||
@@ -184,8 +188,9 @@ echo . No build target specified!!!
|
||||
echo .
|
||||
echo . usage: build [target] [debug opts] [assembly opts] [configure opts]
|
||||
echo .
|
||||
echo . target - "netware-clib" - CLib NetWare build
|
||||
echo . - "netware-libc" - LibC NKS NetWare build
|
||||
echo . target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
echo . - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)
|
||||
echo . - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)
|
||||
echo .
|
||||
echo . debug opts - "debug" - build debug
|
||||
echo .
|
||||
|
||||
@@ -42,8 +42,8 @@ sub main()
|
||||
encryption_tests();
|
||||
pem_tests();
|
||||
verify_tests();
|
||||
ssl_tests();
|
||||
ca_tests();
|
||||
ssl_tests();
|
||||
|
||||
close(OUT);
|
||||
|
||||
@@ -67,10 +67,17 @@ sub algorithm_tests
|
||||
|
||||
foreach $i (@tests)
|
||||
{
|
||||
$outFile = "$output_path\\$i.out";
|
||||
system("$i > $outFile");
|
||||
log_desc("Test: $i\.nlm:");
|
||||
log_output("", $outFile );
|
||||
if (-e "$base_path\\$i.nlm")
|
||||
{
|
||||
$outFile = "$output_path\\$i.out";
|
||||
system("$i > $outFile");
|
||||
log_desc("Test: $i\.nlm:");
|
||||
log_output("", $outFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
log_desc("Test: $i\.nlm: file not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,61 +253,63 @@ sub verify_tests
|
||||
sub ssl_tests
|
||||
{
|
||||
my $outFile = "$output_path\\ssl_tst.out";
|
||||
my($CAcert) = "$output_path\\certCA.ss";
|
||||
my($Ukey) = "$output_path\\keyU.ss";
|
||||
my($Ucert) = "$output_path\\certU.ss";
|
||||
my($ssltest)= "ssltest -key $Ukey -cert $Ucert -c_key $Ukey -c_cert $Ucert -CAfile $CAcert";
|
||||
|
||||
print( "\nRUNNING SSL TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "SSL TESTS:\n\n");
|
||||
|
||||
make_tmp_cert_file();
|
||||
|
||||
system("ssltest -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2:");
|
||||
log_output("ssltest -ssl2", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -server_auth >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication:");
|
||||
log_output("ssltest -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3:");
|
||||
log_output("ssltest -ssl3", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -server_auth >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication:");
|
||||
log_output("ssltest -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest >$outFile");
|
||||
log_desc("Testing sslv2/sslv3:");
|
||||
log_output("ssltest", $outFile);
|
||||
|
||||
system("ssltest -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -server_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication:");
|
||||
log_output("ssltest -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -server_auth", $outFile);
|
||||
|
||||
system("ssltest -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication:");
|
||||
log_output("ssltest -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -client_auth ", $outFile);
|
||||
|
||||
system("ssltest -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2 via BIO pair:");
|
||||
@@ -310,49 +319,49 @@ sub ssl_tests
|
||||
log_desc("Testing sslv2/sslv3 with 1024 bit DHE via BIO pair:");
|
||||
log_output("ssltest -bio_pair -dhe1024dsa -v", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -server_auth >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -server_auth >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -server_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -server_auth -client_auth", $outFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
66
PROBLEMS
66
PROBLEMS
@@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries. This
|
||||
means that -L switches won't matter unless OpenSSL is built with shared
|
||||
library support.
|
||||
|
||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
||||
test/Makefile.ssl:
|
||||
The workaround may be to change the following lines in apps/Makefile and
|
||||
test/Makefile:
|
||||
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
@@ -48,20 +48,34 @@ will interfere with each other and lead to test failure.
|
||||
The solution is simple for now: don't run parallell make when testing.
|
||||
|
||||
|
||||
* Bugs in gcc 3.0 triggered
|
||||
* Bugs in gcc triggered
|
||||
|
||||
According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
- According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
|
||||
header+=11;
|
||||
if (*header != '4') return(0); header++;
|
||||
if (*header != ',') return(0); header++;
|
||||
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
|
||||
- According to multiple problem reports, some of our message digest
|
||||
implementations trigger bug[s] in code optimizer in gcc 3.3 for sparc64
|
||||
and gcc 2.96 for ppc. Former fails to complete RIPEMD160 test, while
|
||||
latter - SHA one.
|
||||
|
||||
The recomendation is to upgrade your compiler. This naturally applies to
|
||||
other similar cases.
|
||||
|
||||
- There is a subtle Solaris x86-specific gcc run-time environment bug, which
|
||||
"falls between" OpenSSL [0.9.8 and later], Solaris ld and GCC. The bug
|
||||
manifests itself as Segmentation Fault upon early application start-up.
|
||||
The problem can be worked around by patching the environment according to
|
||||
http://www.openssl.org/~appro/values.c.
|
||||
|
||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
|
||||
|
||||
@@ -120,3 +134,37 @@ Any information helping to solve this issue would be deeply
|
||||
appreciated.
|
||||
|
||||
NOTE: building non-shared doesn't come with this problem.
|
||||
|
||||
* ULTRIX build fails with shell errors, such as "bad substitution"
|
||||
and "test: argument expected"
|
||||
|
||||
The problem is caused by ULTRIX /bin/sh supporting only original
|
||||
Bourne shell syntax/semantics, and the trouble is that the vast
|
||||
majority is so accustomed to more modern syntax, that very few
|
||||
people [if any] would recognize the ancient syntax even as valid.
|
||||
This inevitably results in non-trivial scripts breaking on ULTRIX,
|
||||
and OpenSSL isn't an exclusion. Fortunately there is workaround,
|
||||
hire /bin/ksh to do the job /bin/sh fails to do.
|
||||
|
||||
1. Trick make(1) to use /bin/ksh by setting up following environ-
|
||||
ment variables *prior* you execute ./Configure and make:
|
||||
|
||||
PROG_ENV=POSIX
|
||||
MAKESHELL=/bin/ksh
|
||||
export PROG_ENV MAKESHELL
|
||||
|
||||
or if your shell is csh-compatible:
|
||||
|
||||
setenv PROG_ENV POSIX
|
||||
setenv MAKESHELL /bin/ksh
|
||||
|
||||
2. Trick /bin/sh to use alternative expression evaluator. Create
|
||||
following 'test' script for example in /tmp:
|
||||
|
||||
#!/bin/ksh
|
||||
${0##*/} "$@"
|
||||
|
||||
Then 'chmod a+x /tmp/test; ln /tmp/test /tmp/[' and *prepend*
|
||||
your $PATH with chosen location, e.g. PATH=/tmp:$PATH. Alter-
|
||||
natively just replace system /bin/test and /bin/[ with the
|
||||
above script.
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.8-beta4-dev XX xxx XXXX
|
||||
OpenSSL 0.9.8-beta5 13 June 2005
|
||||
|
||||
Copyright (c) 1998-2005 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
4
STATUS
4
STATUS
@@ -1,10 +1,12 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2005/05/30 22:56:49 $
|
||||
______________ $Date: 2005/06/13 03:36:21 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.9: Under development...
|
||||
o OpenSSL 0.9.8-beta5: Released on June 13th, 2005
|
||||
o OpenSSL 0.9.8-beta4: Released on June 6th, 2005
|
||||
o OpenSSL 0.9.8-beta3: Released on May 31th, 2005
|
||||
o OpenSSL 0.9.8-beta2: Released on May 24th, 2005
|
||||
o OpenSSL 0.9.8-beta1: Released on May 19th, 2005
|
||||
|
||||
123
TABLE
123
TABLE
@@ -117,7 +117,7 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -866,7 +866,7 @@ $arflags =
|
||||
|
||||
*** bsdi-elf-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
|
||||
$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
@@ -1433,7 +1433,7 @@ $arflags =
|
||||
|
||||
*** debug-linux-elf
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -1460,7 +1460,7 @@ $arflags =
|
||||
|
||||
*** debug-linux-elf-noefence
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2007,7 +2007,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2034,7 +2034,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2223,7 +2223,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2250,7 +2250,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2324,7 +2324,7 @@ $arflags =
|
||||
|
||||
*** hurd-x86
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2621,7 +2621,7 @@ $arflags =
|
||||
|
||||
*** linux-aout
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
@@ -2763,7 +2763,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2790,7 +2790,34 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-ia64-icc
|
||||
$cc = icc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -3030,8 +3057,8 @@ $cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3057,8 +3084,35 @@ $cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = BN_LLONG RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_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 =
|
||||
$arflags =
|
||||
|
||||
*** netware-libc-bsdsock
|
||||
$cc = mwccnlm
|
||||
$cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3084,8 +3138,8 @@ $cflags = -nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_EN
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3348,33 +3402,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sco3-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_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 =
|
||||
$arflags =
|
||||
|
||||
*** sco5-cc
|
||||
$cc = cc
|
||||
$cflags = -belf
|
||||
@@ -3620,7 +3647,7 @@ $arflags =
|
||||
|
||||
*** solaris-x86-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
|
||||
$cflags = -O3 -fomit-frame-pointer -march=i486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -3868,7 +3895,7 @@ $unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops =
|
||||
$bn_ops = BN_LLONG
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3971,7 +3998,7 @@ $arflags =
|
||||
|
||||
*** unixware-7-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
* Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/* pkcs12.c */
|
||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
|
||||
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project.
|
||||
*/
|
||||
@@ -58,6 +56,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -87,8 +87,12 @@ typedef unsigned int u_int;
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
|
||||
#include "netdb.h"
|
||||
#endif
|
||||
|
||||
static struct hostent *GetHostByName(char *name);
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
static void ssl_sock_cleanup(void);
|
||||
#endif
|
||||
static int ssl_sock_init(void);
|
||||
@@ -104,7 +108,7 @@ static int host_ip(char *str, unsigned char ip[4]);
|
||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
@@ -156,7 +160,7 @@ static void ssl_sock_cleanup(void)
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
static void sock_cleanup(void)
|
||||
{
|
||||
if (wsa_init_done)
|
||||
@@ -199,7 +203,7 @@ static int ssl_sock_init(void)
|
||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
||||
#endif /* OPENSSL_SYS_WIN16 */
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
@@ -398,7 +402,7 @@ redoit:
|
||||
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
||||
if (ret == INVALID_SOCKET)
|
||||
{
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
i=WSAGetLastError();
|
||||
BIO_printf(bio_err,"accept error %d\n",i);
|
||||
#else
|
||||
|
||||
@@ -527,6 +527,7 @@ int MAIN(int argc, char **argv)
|
||||
static const unsigned char key16[16]=
|
||||
{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static const unsigned char key24[24]=
|
||||
{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
|
||||
@@ -536,6 +537,7 @@ int MAIN(int argc, char **argv)
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
|
||||
0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,
|
||||
0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,0x56};
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_AES
|
||||
#define MAX_BLOCK_SIZE 128
|
||||
#else
|
||||
|
||||
10
config
10
config
@@ -660,7 +660,9 @@ case "$GUESSOS" in
|
||||
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
|
||||
ia64-*-*bsd*) OUT="BSD-ia64" ;;
|
||||
amd64-*-*bsd*) OUT="BSD-x86_64" ;;
|
||||
*86*-*-*bsd*) case "`(file -L /usr/lib/libc.so.*) 2>/dev/null`" in
|
||||
*86*-*-*bsd*) # assume highest libc.so.* version is the one in effect
|
||||
libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null`
|
||||
case "`(file $libc) 2>/dev/null`" in
|
||||
*ELF*) OUT="BSD-x86-elf" ;;
|
||||
*) OUT="BSD-x86"; options="$options no-sse2" ;;
|
||||
esac ;;
|
||||
@@ -675,9 +677,9 @@ case "$GUESSOS" in
|
||||
OUT="OpenUNIX-8"
|
||||
fi
|
||||
;;
|
||||
*-*-[Uu]nix[Ww]are7) OUT="unixware-7" ;;
|
||||
*-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0" ;;
|
||||
*-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1" ;;
|
||||
*-*-[Uu]nix[Ww]are7) OUT="unixware-7"; options="$options no-sse2" ;;
|
||||
*-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0"; options="$options no-sse2 no-sha512" ;;
|
||||
*-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1"; options="$options no-sse2 no-sha512" ;;
|
||||
*-*-vos)
|
||||
options="$options no-threads no-shared no-asm no-dso"
|
||||
EXE=".pm"
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
#define USE_SOCKETS
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bio.h>
|
||||
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
|
||||
#include "netdb.h"
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
@@ -79,7 +82,7 @@
|
||||
#define MAX_LISTEN 32
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
@@ -474,7 +477,7 @@ int BIO_sock_init(void)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
@@ -512,7 +515,7 @@ void BIO_sock_cleanup(void)
|
||||
#endif
|
||||
WSACleanup();
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
if (wsa_init_done)
|
||||
{
|
||||
wsa_init_done=0;
|
||||
|
||||
@@ -65,6 +65,24 @@
|
||||
#ifndef HEADER_BSS_FILE_C
|
||||
#define HEADER_BSS_FILE_C
|
||||
|
||||
#if defined(__linux) || defined(__sun) || defined(__hpux)
|
||||
/* Following definition aliases fopen to fopen64 on above mentioned
|
||||
* platforms. This makes it possible to open and sequentially access
|
||||
* files larger than 2GB from 32-bit application. It does not allow to
|
||||
* traverse them beyond 2GB with fseek/ftell, but on the other hand *no*
|
||||
* 32-bit platform permits that, not with fseek/ftell. Not to mention
|
||||
* that breaking 2GB limit for seeking would require surgery to *our*
|
||||
* API. But sequential access suffices for practical cases when you
|
||||
* can run into large files, such as fingerprinting, so we can let API
|
||||
* alone. For reference, the list of 32-bit platforms which allow for
|
||||
* sequential access of large files without extra "magic" comprise *BSD,
|
||||
* Darwin, IRIX...
|
||||
*/
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "cryptlib.h"
|
||||
|
||||
@@ -79,7 +79,7 @@ co86-out.s: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) co-586.pl a.out $(CFLAGS) > ../$@)
|
||||
|
||||
sparcv8.o: asm/sparcv8.S
|
||||
|
||||
$(CC) $(CFLAGS) -c asm/sparcv8.S
|
||||
sparcv8plus.o: asm/sparcv8plus.S
|
||||
$(CC) $(CFLAGS) -c asm/sparcv8plus.S
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
if (d == 0) return(BN_MASK2);
|
||||
|
||||
i=BN_num_bits_word(d);
|
||||
assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i));
|
||||
assert((i == BN_BITS2) || (h <= (BN_ULONG)1<<i));
|
||||
|
||||
i=BN_BITS2-i;
|
||||
if (h >= d) h-=d;
|
||||
|
||||
@@ -214,6 +214,7 @@ $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
||||
"bss_file,bss_sock,bss_conn,"+ -
|
||||
"bf_null,bf_buff,b_print,b_dump,"+ -
|
||||
"b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ -
|
||||
"bss_dgram,"+ -
|
||||
"bf_lbuf"
|
||||
$ LIB_STACK = "stack"
|
||||
$ LIB_LHASH = "lhash,lh_stats"
|
||||
|
||||
@@ -128,7 +128,8 @@ static int dl_load(DSO *dso)
|
||||
DSOerr(DSO_F_DL_LOAD,DSO_R_NO_FILENAME);
|
||||
goto err;
|
||||
}
|
||||
ptr = shl_load(filename, BIND_IMMEDIATE|DYNAMIC_PATH, 0L);
|
||||
ptr = shl_load(filename, BIND_IMMEDIATE |
|
||||
(dso->flags&DSO_FLAG_NO_NAME_TRANSLATION?0:DYNAMIC_PATH), 0L);
|
||||
if(ptr == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
|
||||
|
||||
@@ -66,11 +66,14 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/dso.h>
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/evp.h>
|
||||
#ifndef OPENSSL_NO_AES
|
||||
#include <openssl/aes.h>
|
||||
#endif
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#ifndef OPENSSL_NO_HW
|
||||
@@ -134,7 +137,9 @@ static int padlock_init(ENGINE *e);
|
||||
static RAND_METHOD padlock_rand;
|
||||
|
||||
/* Cipher Stuff */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
|
||||
#endif
|
||||
|
||||
/* Engine names */
|
||||
static const char *padlock_id = "padlock";
|
||||
@@ -143,7 +148,9 @@ static char padlock_name[100];
|
||||
/* Available features */
|
||||
static int padlock_use_ace = 0; /* Advanced Cryptography Engine */
|
||||
static int padlock_use_rng = 0; /* Random Number Generator */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static int padlock_aes_align_required = 1;
|
||||
#endif
|
||||
|
||||
/* ===== Engine "management" functions ===== */
|
||||
|
||||
@@ -169,8 +176,9 @@ padlock_bind_helper(ENGINE *e)
|
||||
!ENGINE_set_name(e, padlock_name) ||
|
||||
|
||||
!ENGINE_set_init_function(e, padlock_init) ||
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
(padlock_use_ace && !ENGINE_set_ciphers (e, padlock_ciphers)) ||
|
||||
#endif
|
||||
(padlock_use_rng && !ENGINE_set_RAND (e, &padlock_rand))) {
|
||||
return 0;
|
||||
}
|
||||
@@ -228,6 +236,7 @@ IMPLEMENT_DYNAMIC_BIND_FN (padlock_bind_fn);
|
||||
|
||||
/* ===== Here comes the "real" engine ===== */
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/* Some AES-related constants */
|
||||
#define AES_BLOCK_SIZE 16
|
||||
#define AES_KEY_SIZE_128 16
|
||||
@@ -264,6 +273,7 @@ struct padlock_cipher_data
|
||||
* so we accept the penatly...
|
||||
*/
|
||||
static volatile struct padlock_cipher_data *padlock_saved_context;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* =======================================================
|
||||
@@ -355,6 +365,7 @@ padlock_available(void)
|
||||
return padlock_use_ace + padlock_use_rng;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/* Our own htonl()/ntohl() */
|
||||
static inline void
|
||||
padlock_bswapl(AES_KEY *ks)
|
||||
@@ -367,6 +378,7 @@ padlock_bswapl(AES_KEY *ks)
|
||||
key++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Force key reload from memory to the CPU microcode.
|
||||
Loading EFLAGS from the stack clears EFLAGS[30]
|
||||
@@ -377,6 +389,7 @@ padlock_reload_key(void)
|
||||
asm volatile ("pushfl; popfl");
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/*
|
||||
* This is heuristic key context tracing. At first one
|
||||
* believes that one should use atomic swap instructions,
|
||||
@@ -430,6 +443,7 @@ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryp
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcbc */
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptcfb */
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") /* rep xcryptofb */
|
||||
#endif
|
||||
|
||||
/* The RNG call itself */
|
||||
static inline unsigned int
|
||||
@@ -600,6 +614,7 @@ padlock_bswapl(void *key)
|
||||
#endif
|
||||
|
||||
/* ===== AES encryption/decryption ===== */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
|
||||
#if defined(NID_aes_128_cfb128) && ! defined (NID_aes_128_cfb)
|
||||
#define NID_aes_128_cfb NID_aes_128_cfb128
|
||||
@@ -1030,6 +1045,8 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* OPENSSL_NO_AES */
|
||||
|
||||
/* ===== Random Number Generator ===== */
|
||||
/*
|
||||
* This code is not engaged. The reason is that it does not comply
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/evp.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
@@ -395,6 +396,27 @@ int main(int argc,char **argv)
|
||||
if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec)
|
||||
&& !test_digest(cipher,plaintext,pn,ciphertext,cn))
|
||||
{
|
||||
#ifdef OPENSSL_NO_AES
|
||||
if (strstr(cipher, "AES") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef OPENSSL_NO_DES
|
||||
if (strstr(cipher, "DES") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef OPENSSL_NO_RC4
|
||||
if (strstr(cipher, "RC4") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
fprintf(stderr,"Can't find %s\n",cipher);
|
||||
EXIT(3);
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x00908004L
|
||||
#define OPENSSL_VERSION_NUMBER 0x00908005L
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-fips-beta4-dev XX xxx XXXX"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-fips-beta5 13 Jun 2005"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta4-dev XX xxx XXXX"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta5 13 Jun 2005"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -63,14 +63,19 @@
|
||||
/*
|
||||
* The purpose of this header file is for supporting 64-bit integer
|
||||
* manipulation on 32-bit (and lower) machines. Currently the only
|
||||
* such environment is VMS. Other environments that do not natively
|
||||
* support 64-bit integers can safely use the code developed for VMS.
|
||||
* such environment is VMS, Utrix and those with smaller default integer
|
||||
* sizes than 32 bits. For all such environment, we fall back to using
|
||||
* BIGNUM. We may need to fine tune the conditions for systems that
|
||||
* are incorrectly configured.
|
||||
*
|
||||
* The only clients of this code are (1) pqueue for priority, and
|
||||
* (2) DTLS, for sequence number manipulation.
|
||||
*/
|
||||
|
||||
#if defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)
|
||||
#if (defined(THIRTY_TWO_BIT) && !defined(BN_LLONG)) || defined(SIXTEEN_BIT) || defined(EIGHT_BIT)
|
||||
|
||||
#define PQ_64BIT_IS_INTEGER 0
|
||||
#define PQ_64BIT_IS_BIGNUM 1
|
||||
|
||||
#define PQ_64BIT BIGNUM
|
||||
#define PQ_64BIT_CTX BN_CTX
|
||||
@@ -100,6 +105,9 @@
|
||||
|
||||
#else
|
||||
|
||||
#define PQ_64BIT_IS_INTEGER 1
|
||||
#define PQ_64BIT_IS_BIGNUM 0
|
||||
|
||||
#if defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG)
|
||||
#define PQ_64BIT BN_ULONG
|
||||
#elif defined(THIRTY_TWO_BIT)
|
||||
|
||||
@@ -199,7 +199,7 @@ pqueue_find(pqueue_s *pq, PQ_64BIT priority)
|
||||
return found;
|
||||
}
|
||||
|
||||
#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST))
|
||||
#if PQ_64BIT_IS_INTEGER
|
||||
void
|
||||
pqueue_print(pqueue_s *pq)
|
||||
{
|
||||
|
||||
@@ -411,7 +411,7 @@ void ERR_load_RSA_strings(void);
|
||||
#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
|
||||
#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127
|
||||
#define RSA_R_OAEP_DECODING_ERROR 121
|
||||
#define RSA_R_ONE_CHECK_FAILED 135
|
||||
#define RSA_R_SLEN_RECOVERY_FAILED 135
|
||||
#define RSA_R_PADDING_CHECK_FAILED 114
|
||||
#define RSA_R_P_NOT_PRIME 128
|
||||
#define RSA_R_Q_NOT_PRIME 129
|
||||
@@ -421,7 +421,7 @@ void ERR_load_RSA_strings(void);
|
||||
#define RSA_R_UNKNOWN_ALGORITHM_TYPE 117
|
||||
#define RSA_R_UNKNOWN_PADDING_TYPE 118
|
||||
#define RSA_R_WRONG_SIGNATURE_LENGTH 119
|
||||
#define RSA_R_ZERO_CHECK_FAILED 136
|
||||
#define RSA_R_SLEN_CHECK_FAILED 136
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ static ERR_STRING_DATA RSA_str_reasons[]=
|
||||
{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"},
|
||||
{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"},
|
||||
{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"},
|
||||
{ERR_REASON(RSA_R_ONE_CHECK_FAILED) ,"one check failed"},
|
||||
{ERR_REASON(RSA_R_SLEN_RECOVERY_FAILED) ,"salt length recovery failed"},
|
||||
{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"},
|
||||
{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"},
|
||||
{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"},
|
||||
@@ -151,7 +151,7 @@ static ERR_STRING_DATA RSA_str_reasons[]=
|
||||
{ERR_REASON(RSA_R_UNKNOWN_ALGORITHM_TYPE),"unknown algorithm type"},
|
||||
{ERR_REASON(RSA_R_UNKNOWN_PADDING_TYPE) ,"unknown padding type"},
|
||||
{ERR_REASON(RSA_R_WRONG_SIGNATURE_LENGTH),"wrong signature length"},
|
||||
{ERR_REASON(RSA_R_ZERO_CHECK_FAILED) ,"zero check failed"},
|
||||
{ERR_REASON(RSA_R_SLEN_CHECK_FAILED) ,"salt length check failed"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -402,6 +402,11 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx)
|
||||
|
||||
ret = BN_BLINDING_create_param(NULL, e, rsa->n, ctx,
|
||||
rsa->meth->bn_mod_exp, rsa->_method_mod_n);
|
||||
if (ret == NULL)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
BN_BLINDING_set_thread_id(ret, CRYPTO_thread_id());
|
||||
err:
|
||||
BN_CTX_end(ctx);
|
||||
|
||||
@@ -71,15 +71,40 @@ int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
int hLen, maskedDBLen, emBits, emLen;
|
||||
int hLen, maskedDBLen, MSBits, emLen;
|
||||
const unsigned char *H;
|
||||
unsigned char *DB = NULL;
|
||||
EVP_MD_CTX ctx;
|
||||
unsigned char H_[EVP_MAX_MD_SIZE];
|
||||
emBits = BN_num_bits(rsa->n) - 1;
|
||||
emLen = (emBits + 7) >> 3;
|
||||
|
||||
hLen = EVP_MD_size(Hash);
|
||||
if (emLen < (hLen + sLen + 2))
|
||||
/*
|
||||
* Negative sLen has special meanings:
|
||||
* -1 sLen == hLen
|
||||
* -2 salt length is autorecovered from signature
|
||||
* -N reserved
|
||||
*/
|
||||
if (sLen == -1) sLen = hLen;
|
||||
else if (sLen == -2) sLen = -2;
|
||||
else if (sLen < -2)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
|
||||
emLen = RSA_size(rsa);
|
||||
if (EM[0] & (0xFF << MSBits))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_FIRST_OCTET_INVALID);
|
||||
goto err;
|
||||
}
|
||||
if (MSBits == 0)
|
||||
{
|
||||
EM++;
|
||||
emLen--;
|
||||
}
|
||||
if (emLen < (hLen + sLen + 2)) /* sLen can be small negative */
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_DATA_TOO_LARGE);
|
||||
goto err;
|
||||
@@ -89,11 +114,6 @@ int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_LAST_OCTET_INVALID);
|
||||
goto err;
|
||||
}
|
||||
if (EM[0] & (0xFF << (emBits & 0x7)))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_FIRST_OCTET_INVALID);
|
||||
goto err;
|
||||
}
|
||||
maskedDBLen = emLen - hLen - 1;
|
||||
H = EM + maskedDBLen;
|
||||
DB = OPENSSL_malloc(maskedDBLen);
|
||||
@@ -105,27 +125,25 @@ int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
|
||||
PKCS1_MGF1(DB, maskedDBLen, H, hLen, Hash);
|
||||
for (i = 0; i < maskedDBLen; i++)
|
||||
DB[i] ^= EM[i];
|
||||
DB[0] &= 0xFF >> (8 - (emBits & 0x7));
|
||||
for (i = 0; i < (emLen - hLen - sLen - 2); i++)
|
||||
if (MSBits)
|
||||
DB[0] &= 0xFF >> (8 - MSBits);
|
||||
for (i = 0; DB[i] == 0 && i < (maskedDBLen-1); i++) ;
|
||||
if (DB[i++] != 0x1)
|
||||
{
|
||||
if (DB[i] != 0)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS,
|
||||
RSA_R_ZERO_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_RECOVERY_FAILED);
|
||||
goto err;
|
||||
}
|
||||
if (DB[i] != 0x1)
|
||||
if (sLen >= 0 && (maskedDBLen - i) != sLen)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_ONE_CHECK_FAILED);
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
EVP_DigestInit_ex(&ctx, Hash, NULL);
|
||||
EVP_DigestUpdate(&ctx, zeroes, sizeof zeroes);
|
||||
EVP_DigestUpdate(&ctx, mHash, hLen);
|
||||
if (sLen)
|
||||
EVP_DigestUpdate(&ctx, DB + maskedDBLen - sLen, sLen);
|
||||
if (maskedDBLen - i)
|
||||
EVP_DigestUpdate(&ctx, DB + i, maskedDBLen - i);
|
||||
EVP_DigestFinal(&ctx, H_, NULL);
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
if (memcmp(H_, H, hLen))
|
||||
@@ -150,15 +168,37 @@ int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
int hLen, maskedDBLen, emBits, emLen;
|
||||
int hLen, maskedDBLen, MSBits, emLen;
|
||||
unsigned char *H, *salt = NULL, *p;
|
||||
EVP_MD_CTX ctx;
|
||||
emBits = BN_num_bits(rsa->n) - 1;
|
||||
emLen = (emBits + 7) >> 3;
|
||||
|
||||
hLen = EVP_MD_size(Hash);
|
||||
if (sLen < 0)
|
||||
sLen = 0;
|
||||
if (emLen < (hLen + sLen + 2))
|
||||
/*
|
||||
* Negative sLen has special meanings:
|
||||
* -1 sLen == hLen
|
||||
* -2 salt length is maximized
|
||||
* -N reserved
|
||||
*/
|
||||
if (sLen == -1) sLen = hLen;
|
||||
else if (sLen == -2) sLen = -2;
|
||||
else if (sLen < -2)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
|
||||
emLen = RSA_size(rsa);
|
||||
if (MSBits == 0)
|
||||
{
|
||||
*EM++ = 0;
|
||||
emLen--;
|
||||
}
|
||||
if (sLen == -2)
|
||||
{
|
||||
sLen = emLen - hLen - 2;
|
||||
}
|
||||
else if (emLen < (hLen + sLen + 2))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS,
|
||||
RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
|
||||
@@ -203,7 +243,8 @@ int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
|
||||
for (i = 0; i < sLen; i++)
|
||||
*p++ ^= salt[i];
|
||||
}
|
||||
EM[0] &= 0xFF >> (8 - (emBits & 0x7));
|
||||
if (MSBits)
|
||||
EM[0] &= 0xFF >> (8 - MSBits);
|
||||
|
||||
/* H is already in place so just set final 0xbc */
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ int RSA_padding_add_X931(unsigned char *to, int tlen,
|
||||
int RSA_padding_check_X931(unsigned char *to, int tlen,
|
||||
const unsigned char *from, int flen, int num)
|
||||
{
|
||||
int i,j;
|
||||
int i = 0,j;
|
||||
const unsigned char *p;
|
||||
|
||||
p=from;
|
||||
@@ -115,9 +115,9 @@ int RSA_padding_check_X931(unsigned char *to, int tlen,
|
||||
return -1;
|
||||
}
|
||||
|
||||
j=flen-3;
|
||||
if (*p++ == 0x6B)
|
||||
{
|
||||
j=flen-3;
|
||||
for (i = 0; i < j; i++)
|
||||
{
|
||||
unsigned char c = *p++;
|
||||
@@ -130,15 +130,17 @@ int RSA_padding_check_X931(unsigned char *to, int tlen,
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
j -= i;
|
||||
j -= i;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931, RSA_R_INVALID_PADDING);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931, RSA_R_INVALID_PADDING);
|
||||
return -1;
|
||||
}
|
||||
else j = flen - 2;
|
||||
|
||||
if (p[j] != 0xCC)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
|
||||
|
||||
#undef SHA_0
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
* according to the OpenSSL license [found in ../../LICENSE].
|
||||
* ====================================================================
|
||||
*/
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* according to the OpenSSL license [found in ../../LICENSE].
|
||||
* ====================================================================
|
||||
*/
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512)
|
||||
/*
|
||||
* IMPLEMENTATION NOTES.
|
||||
@@ -43,7 +44,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
|
||||
|
||||
#undef SHA_1
|
||||
|
||||
@@ -1079,7 +1079,7 @@ int X509_cmp_time(ASN1_TIME *ctm, time_t *cmp_time)
|
||||
offset=0;
|
||||
else
|
||||
{
|
||||
if ((*str != '+') && (str[5] != '-'))
|
||||
if ((*str != '+') && (*str != '-'))
|
||||
return 0;
|
||||
offset=((str[1]-'0')*10+(str[2]-'0'))*60;
|
||||
offset+=(str[3]-'0')*10+(str[4]-'0');
|
||||
|
||||
@@ -35,7 +35,7 @@ calls OPENSSL_add_all_algorithms() by compiling an application with the
|
||||
preprocessor symbol B<OPENSSL_LOAD_CONF> #define'd. In this way configuration
|
||||
can be added without source changes.
|
||||
|
||||
The environment variable B<OPENSSL_CONFIG> can be set to specify the location
|
||||
The environment variable B<OPENSSL_CONF> can be set to specify the location
|
||||
of the configuration file.
|
||||
|
||||
Currently ASN1 OBJECTs and ENGINE configuration can be performed future
|
||||
|
||||
@@ -130,7 +130,7 @@ You can find out if OpenSSL was configured with thread support:
|
||||
|
||||
#define OPENSSL_THREAD_DEFINES
|
||||
#include <openssl/opensslconf.h>
|
||||
#if defined(THREADS)
|
||||
#if defined(OPENSSL_THREADS)
|
||||
// thread support enabled
|
||||
#else
|
||||
// no thread support
|
||||
|
||||
20
e_os.h
20
e_os.h
@@ -182,10 +182,18 @@ extern "C" {
|
||||
#define readsocket(s,b,n) read((s),(b),(n))
|
||||
#define writesocket(s,b,n) write((s),(char *)(b),(n))
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(NETWARE_BSDSOCK)
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
#define closesocket(s) close(s)
|
||||
#define readsocket(s,b,n) recv((s),(b),(n),0)
|
||||
#define writesocket(s,b,n) send((s),(b),(n),0)
|
||||
#else
|
||||
#define get_last_socket_error() WSAGetLastError()
|
||||
#define clear_socket_error() WSASetLastError(0)
|
||||
#define readsocket(s,b,n) recv((s),(b),(n),0)
|
||||
#define writesocket(s,b,n) send((s),(b),(n),0)
|
||||
#endif
|
||||
#else
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
@@ -436,11 +444,15 @@ extern HINSTANCE _hInstance;
|
||||
# define SHUTDOWN2(fd) MacSocket_close(fd)
|
||||
|
||||
# elif defined(OPENSSL_SYS_NETWARE)
|
||||
/* NetWare uses the WinSock2 interfaces
|
||||
/* NetWare uses the WinSock2 interfaces by default, but can be configured for BSD
|
||||
*/
|
||||
# if defined(NETWARE_CLIB)
|
||||
# include <ws2nlm.h>
|
||||
# elif defined(NETWARE_LIBC)
|
||||
# if defined(NETWARE_BSDSOCK)
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/select.h>
|
||||
# define INVALID_SOCKET (int)(~0)
|
||||
# else
|
||||
# include <novsock2.h>
|
||||
# endif
|
||||
# define SSLeay_Write(a,b,c) send((a),(b),(c),0)
|
||||
|
||||
@@ -202,8 +202,10 @@ static RAND_METHOD ibm_4758_cca_rand =
|
||||
|
||||
static const char *engine_4758_cca_id = "4758cca";
|
||||
static const char *engine_4758_cca_name = "IBM 4758 CCA hardware engine support";
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||
static const char *engine_4758_cca_id_alt = "4758_cca";
|
||||
#endif
|
||||
|
||||
/* engine implementation */
|
||||
/*-----------------------*/
|
||||
|
||||
@@ -224,8 +224,11 @@ static RAND_METHOD hwcrhk_rand =
|
||||
/* Constants used when creating the ENGINE */
|
||||
static const char *engine_hwcrhk_id = "chil";
|
||||
static const char *engine_hwcrhk_name = "CHIL hardware engine support";
|
||||
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||
static const char *engine_hwcrhk_id_alt = "ncipher";
|
||||
#endif
|
||||
|
||||
/* Internal stuff for HWCryptoHook */
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ $ LOOP_SDIRS_END:
|
||||
$!
|
||||
$! Copy All The ".H" Files From The [.SSL] Directory.
|
||||
$!
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
|
||||
$ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
|
||||
$!
|
||||
$! Purge all doubles
|
||||
|
||||
12
ms/uplink.pl
12
ms/uplink.pl
@@ -168,23 +168,23 @@ _DATA SEGMENT
|
||||
PUBLIC OPENSSL_UplinkTable
|
||||
OPENSSL_UplinkTable DQ $N
|
||||
___
|
||||
for ($i=1;$i<=$N;$i++) { print " DQ FLAT:\$lazy$i\n"; }
|
||||
for ($i=1;$i<=$N;$i++) { print " DQ \$lazy$i\n"; }
|
||||
print <<___;
|
||||
_DATA ENDS
|
||||
|
||||
TEXT SEGMENT
|
||||
EXTERN OPENSSL_Uplink:NEAR
|
||||
_TEXT SEGMENT
|
||||
EXTERN OPENSSL_Uplink:PROC
|
||||
___
|
||||
for ($i=1;$i<=$N;$i++) {
|
||||
print <<___;
|
||||
ALIGN 4
|
||||
\$lazy$i PROC NEAR
|
||||
\$lazy$i PROC
|
||||
push r9
|
||||
push r8
|
||||
push rdx
|
||||
push rcx
|
||||
sub rsp,40
|
||||
mov rcx,OFFSET FLAT:OPENSSL_UplinkTable
|
||||
lea rcx,OFFSET OPENSSL_UplinkTable
|
||||
mov rdx,$i
|
||||
call OPENSSL_Uplink
|
||||
add rsp,40
|
||||
@@ -197,7 +197,7 @@ ALIGN 4
|
||||
___
|
||||
}
|
||||
print <<___;
|
||||
TEXT ENDS
|
||||
_TEXT ENDS
|
||||
END
|
||||
___
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
%define libmin 9
|
||||
%define librel 8
|
||||
#%define librev a
|
||||
Release: 1
|
||||
Release: 2
|
||||
|
||||
%define openssldir /var/ssl
|
||||
|
||||
@@ -121,7 +121,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%config %attr(0644,root,root) %{openssldir}/openssl.cnf
|
||||
%dir %attr(0755,root,root) %{openssldir}/certs
|
||||
%dir %attr(0755,root,root) %{openssldir}/lib
|
||||
%dir %attr(0755,root,root) %{openssldir}/misc
|
||||
%dir %attr(0750,root,root) %{openssldir}/private
|
||||
|
||||
@@ -146,6 +145,8 @@ ldconfig
|
||||
ldconfig
|
||||
|
||||
%changelog
|
||||
* Sun Jun 6 2005 Richard Levitte <richard@levitte.org>
|
||||
- Remove the incorrect installation of '%{openssldir}/lib'.
|
||||
* Wed May 7 2003 Richard Levitte <richard@levitte.org>
|
||||
- Add /usr/lib/pkgconfig/openssl.pc to the development section.
|
||||
* Thu Mar 22 2001 Richard Levitte <richard@levitte.org>
|
||||
|
||||
@@ -135,7 +135,7 @@ static int dtls1_record_needs_buffering(SSL *s, SSL3_RECORD *rr,
|
||||
static int dtls1_buffer_record(SSL *s, record_pqueue *q,
|
||||
PQ_64BIT priority);
|
||||
static int dtls1_process_record(SSL *s);
|
||||
#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST))
|
||||
#if PQ_64BIT_IS_INTEGER
|
||||
static PQ_64BIT bytes_to_long_long(unsigned char *bytes, PQ_64BIT *num);
|
||||
#endif
|
||||
static void dtls1_clear_timeouts(SSL *s);
|
||||
@@ -1453,7 +1453,7 @@ err:
|
||||
static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap,
|
||||
PQ_64BIT *seq_num)
|
||||
{
|
||||
#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST))
|
||||
#if PQ_64BIT_IS_INTEGER
|
||||
PQ_64BIT mask = 0x0000000000000001L;
|
||||
#endif
|
||||
PQ_64BIT rcd_num, tmp;
|
||||
@@ -1483,7 +1483,7 @@ static int dtls1_record_replay_check(SSL *s, DTLS1_BITMAP *bitmap,
|
||||
return 0; /* stale, outside the window */
|
||||
}
|
||||
|
||||
#if (defined(OPENSSL_SYS_VMS) || defined(VMS_TEST))
|
||||
#if PQ_64BIT_IS_BIGNUM
|
||||
{
|
||||
int offset;
|
||||
pq_64bit_sub(&tmp, &(bitmap->max_seq_num), &rcd_num);
|
||||
@@ -1736,7 +1736,7 @@ dtls1_reset_seq_numbers(SSL *s, int rw)
|
||||
memset(seq, 0x00, seq_bytes);
|
||||
}
|
||||
|
||||
#if !(defined(OPENSSL_SYS_VMS) || defined(VMS_TEST))
|
||||
#if PQ_64BIT_IS_INTEGER
|
||||
static PQ_64BIT
|
||||
bytes_to_long_long(unsigned char *bytes, PQ_64BIT *num)
|
||||
{
|
||||
|
||||
@@ -1075,7 +1075,7 @@ int dtls1_send_certificate_request(SSL *s)
|
||||
d=(unsigned char *)buf->data;
|
||||
*(d++)=SSL3_MT_CERTIFICATE_REQUEST;
|
||||
l2n3(n,d);
|
||||
l2n(s->d1->handshake_write_seq,d);
|
||||
s2n(s->d1->handshake_write_seq,d);
|
||||
s->d1->handshake_write_seq++;
|
||||
|
||||
/* we should now have things packed up, so lets send
|
||||
|
||||
@@ -38,7 +38,7 @@ $ IF F$PARSE("WRK_SSLVEXE:") .EQS. "" THEN -
|
||||
$ IF F$PARSE("WRK_SSLAEXE:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLAEXE:
|
||||
$
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
|
||||
$ E_EXE := ssl_task
|
||||
$ LIBS := LIBSSL
|
||||
$
|
||||
|
||||
@@ -174,6 +174,8 @@ $ LIB_SSL = "s2_meth,s2_srvr,s2_clnt,s2_lib,s2_enc,s2_pkt,"+ -
|
||||
"s3_meth,s3_srvr,s3_clnt,s3_lib,s3_enc,s3_pkt,s3_both,"+ -
|
||||
"s23_meth,s23_srvr,s23_clnt,s23_lib,s23_pkt,"+ -
|
||||
"t1_meth,t1_srvr,t1_clnt,t1_lib,t1_enc,"+ -
|
||||
"d1_meth,d1_srvr,d1_clnt,d1_lib,d1_pkt,"+ -
|
||||
"d1_both,d1_enc,"+ -
|
||||
"ssl_lib,ssl_err2,ssl_cert,ssl_sess,"+ -
|
||||
"ssl_ciph,ssl_stat,ssl_rsa,"+ -
|
||||
"ssl_asn1,ssl_txt,ssl_algs,"+ -
|
||||
|
||||
@@ -1655,6 +1655,7 @@ void ERR_load_SSL_strings(void);
|
||||
#define SSL_F_SSL_CTRL 232
|
||||
#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168
|
||||
#define SSL_F_SSL_CTX_NEW 169
|
||||
#define SSL_F_SSL_CTX_SET_CIPHER_LIST 1026
|
||||
#define SSL_F_SSL_CTX_SET_PURPOSE 226
|
||||
#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219
|
||||
#define SSL_F_SSL_CTX_SET_SSL_VERSION 170
|
||||
@@ -1685,6 +1686,7 @@ void ERR_load_SSL_strings(void);
|
||||
#define SSL_F_SSL_SESSION_PRINT_FP 190
|
||||
#define SSL_F_SSL_SESS_CERT_NEW 225
|
||||
#define SSL_F_SSL_SET_CERT 191
|
||||
#define SSL_F_SSL_SET_CIPHER_LIST 1027
|
||||
#define SSL_F_SSL_SET_FD 192
|
||||
#define SSL_F_SSL_SET_PKEY 193
|
||||
#define SSL_F_SSL_SET_PURPOSE 227
|
||||
|
||||
@@ -635,14 +635,13 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
|
||||
BIO *in;
|
||||
X509 *x=NULL;
|
||||
X509_NAME *xn=NULL;
|
||||
STACK_OF(X509_NAME) *ret,*sk;
|
||||
STACK_OF(X509_NAME) *ret = NULL,*sk;
|
||||
|
||||
ret=sk_X509_NAME_new_null();
|
||||
sk=sk_X509_NAME_new(xname_cmp);
|
||||
|
||||
in=BIO_new(BIO_s_file_internal());
|
||||
|
||||
if ((ret == NULL) || (sk == NULL) || (in == NULL))
|
||||
if ((sk == NULL) || (in == NULL))
|
||||
{
|
||||
SSLerr(SSL_F_SSL_LOAD_CLIENT_CA_FILE,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
@@ -655,6 +654,15 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
|
||||
{
|
||||
if (PEM_read_bio_X509(in,&x,NULL,NULL) == NULL)
|
||||
break;
|
||||
if (ret == NULL)
|
||||
{
|
||||
ret = sk_X509_NAME_new_null();
|
||||
if (ret == NULL)
|
||||
{
|
||||
SSLerr(SSL_F_SSL_LOAD_CLIENT_CA_FILE,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if ((xn=X509_get_subject_name(x)) == NULL) goto err;
|
||||
/* check for duplicates */
|
||||
xn=X509_NAME_dup(xn);
|
||||
@@ -677,6 +685,8 @@ err:
|
||||
if (sk != NULL) sk_X509_NAME_free(sk);
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (x != NULL) X509_free(x);
|
||||
if (ret != NULL)
|
||||
ERR_clear_error();
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -740,9 +740,18 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
|
||||
if (!found)
|
||||
break; /* ignore this entry */
|
||||
|
||||
algorithms |= ca_list[j]->algorithms;
|
||||
/* New algorithms:
|
||||
* 1 - any old restrictions apply outside new mask
|
||||
* 2 - any new restrictions apply outside old mask
|
||||
* 3 - enforce old & new where masks intersect
|
||||
*/
|
||||
algorithms = (algorithms & ~ca_list[j]->mask) | /* 1 */
|
||||
(ca_list[j]->algorithms & ~mask) | /* 2 */
|
||||
(algorithms & ca_list[j]->algorithms); /* 3 */
|
||||
mask |= ca_list[j]->mask;
|
||||
algo_strength |= ca_list[j]->algo_strength;
|
||||
algo_strength = (algo_strength & ~ca_list[j]->mask_strength) |
|
||||
(ca_list[j]->algo_strength & ~mask_strength) |
|
||||
(algo_strength & ca_list[j]->algo_strength);
|
||||
mask_strength |= ca_list[j]->mask_strength;
|
||||
|
||||
if (!multi) break;
|
||||
@@ -796,7 +805,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
{
|
||||
int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases;
|
||||
unsigned long disabled_mask;
|
||||
STACK_OF(SSL_CIPHER) *cipherstack;
|
||||
STACK_OF(SSL_CIPHER) *cipherstack, *tmp_cipher_list;
|
||||
const char *rule_p;
|
||||
CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
|
||||
SSL_CIPHER **ca_list = NULL;
|
||||
@@ -804,7 +813,8 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
/*
|
||||
* Return with error if nothing to do.
|
||||
*/
|
||||
if (rule_str == NULL) return(NULL);
|
||||
if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
|
||||
return NULL;
|
||||
|
||||
if (init_ciphers)
|
||||
{
|
||||
@@ -911,46 +921,18 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
}
|
||||
OPENSSL_free(co_list); /* Not needed any longer */
|
||||
|
||||
/*
|
||||
* The following passage is a little bit odd. If pointer variables
|
||||
* were supplied to hold STACK_OF(SSL_CIPHER) return information,
|
||||
* the old memory pointed to is free()ed. Then, however, the
|
||||
* cipher_list entry will be assigned just a copy of the returned
|
||||
* cipher stack. For cipher_list_by_id a copy of the cipher stack
|
||||
* will be created. See next comment...
|
||||
*/
|
||||
if (cipher_list != NULL)
|
||||
{
|
||||
if (*cipher_list != NULL)
|
||||
sk_SSL_CIPHER_free(*cipher_list);
|
||||
*cipher_list = cipherstack;
|
||||
}
|
||||
|
||||
if (cipher_list_by_id != NULL)
|
||||
{
|
||||
if (*cipher_list_by_id != NULL)
|
||||
sk_SSL_CIPHER_free(*cipher_list_by_id);
|
||||
*cipher_list_by_id = sk_SSL_CIPHER_dup(cipherstack);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now it is getting really strange. If something failed during
|
||||
* the previous pointer assignment or if one of the pointers was
|
||||
* not requested, the error condition is met. That might be
|
||||
* discussable. The strange thing is however that in this case
|
||||
* the memory "ret" pointed to is "free()ed" and hence the pointer
|
||||
* cipher_list becomes wild. The memory reserved for
|
||||
* cipher_list_by_id however is not "free()ed" and stays intact.
|
||||
*/
|
||||
if ( (cipher_list_by_id == NULL) ||
|
||||
(*cipher_list_by_id == NULL) ||
|
||||
(cipher_list == NULL) ||
|
||||
(*cipher_list == NULL))
|
||||
tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
|
||||
if (tmp_cipher_list == NULL)
|
||||
{
|
||||
sk_SSL_CIPHER_free(cipherstack);
|
||||
return(NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (*cipher_list != NULL)
|
||||
sk_SSL_CIPHER_free(*cipher_list);
|
||||
*cipher_list = cipherstack;
|
||||
if (*cipher_list_by_id != NULL)
|
||||
sk_SSL_CIPHER_free(*cipher_list_by_id);
|
||||
*cipher_list_by_id = tmp_cipher_list;
|
||||
sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
|
||||
|
||||
return(cipherstack);
|
||||
|
||||
@@ -183,6 +183,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
|
||||
{ERR_FUNC(SSL_F_SSL_CTRL), "SSL_ctrl"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_CHECK_PRIVATE_KEY), "SSL_CTX_check_private_key"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_NEW), "SSL_CTX_new"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_SET_CIPHER_LIST), "SSL_CTX_set_cipher_list"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_SET_PURPOSE), "SSL_CTX_set_purpose"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT), "SSL_CTX_set_session_id_context"},
|
||||
{ERR_FUNC(SSL_F_SSL_CTX_SET_SSL_VERSION), "SSL_CTX_set_ssl_version"},
|
||||
@@ -213,6 +214,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
|
||||
{ERR_FUNC(SSL_F_SSL_SESSION_PRINT_FP), "SSL_SESSION_print_fp"},
|
||||
{ERR_FUNC(SSL_F_SSL_SESS_CERT_NEW), "SSL_SESS_CERT_NEW"},
|
||||
{ERR_FUNC(SSL_F_SSL_SET_CERT), "SSL_SET_CERT"},
|
||||
{ERR_FUNC(SSL_F_SSL_SET_CIPHER_LIST), "SSL_set_cipher_list"},
|
||||
{ERR_FUNC(SSL_F_SSL_SET_FD), "SSL_set_fd"},
|
||||
{ERR_FUNC(SSL_F_SSL_SET_PKEY), "SSL_SET_PKEY"},
|
||||
{ERR_FUNC(SSL_F_SSL_SET_PURPOSE), "SSL_set_purpose"},
|
||||
|
||||
@@ -1153,8 +1153,21 @@ int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
|
||||
|
||||
sk=ssl_create_cipher_list(ctx->method,&ctx->cipher_list,
|
||||
&ctx->cipher_list_by_id,str);
|
||||
/* XXXX */
|
||||
return((sk == NULL)?0:1);
|
||||
/* ssl_create_cipher_list may return an empty stack if it
|
||||
* was unable to find a cipher matching the given rule string
|
||||
* (for example if the rule string specifies a cipher which
|
||||
* has been disabled). This is not an error as far as
|
||||
* ssl_create_cipher_list is concerned, and hence
|
||||
* ctx->cipher_list and ctx->cipher_list_by_id has been
|
||||
* updated. */
|
||||
if (sk == NULL)
|
||||
return 0;
|
||||
else if (sk_SSL_CIPHER_num(sk) == 0)
|
||||
{
|
||||
SSLerr(SSL_F_SSL_CTX_SET_CIPHER_LIST, SSL_R_NO_CIPHER_MATCH);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** specify the ciphers to be used by the SSL */
|
||||
@@ -1164,8 +1177,15 @@ int SSL_set_cipher_list(SSL *s,const char *str)
|
||||
|
||||
sk=ssl_create_cipher_list(s->ctx->method,&s->cipher_list,
|
||||
&s->cipher_list_by_id,str);
|
||||
/* XXXX */
|
||||
return((sk == NULL)?0:1);
|
||||
/* see comment in SSL_CTX_set_cipher_list */
|
||||
if (sk == NULL)
|
||||
return 0;
|
||||
else if (sk_SSL_CIPHER_num(sk) == 0)
|
||||
{
|
||||
SSLerr(SSL_F_SSL_SET_CIPHER_LIST, SSL_R_NO_CIPHER_MATCH);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* works well for SSLv2, not so good for SSLv3 */
|
||||
@@ -1377,8 +1397,8 @@ SSL_CTX *SSL_CTX_new(SSL_METHOD *meth)
|
||||
ret->default_passwd_callback=0;
|
||||
ret->default_passwd_callback_userdata=NULL;
|
||||
ret->client_cert_cb=0;
|
||||
ret->app_gen_cookie_cb=0;
|
||||
ret->app_verify_cookie_cb=0;
|
||||
ret->app_gen_cookie_cb=0;
|
||||
ret->app_verify_cookie_cb=0;
|
||||
|
||||
ret->sessions=lh_new(LHASH_HASH_FN(SSL_SESSION_hash),
|
||||
LHASH_COMP_FN(SSL_SESSION_cmp));
|
||||
|
||||
@@ -8,22 +8,22 @@ $ copy/concatenate [-.certs]*.pem certs.tmp
|
||||
$
|
||||
$ old_f :=
|
||||
$ loop_certs:
|
||||
$ c := NO
|
||||
$ verify := NO
|
||||
$ more := YES
|
||||
$ certs :=
|
||||
$ loop_certs2:
|
||||
$ f = f$search("[-.certs]*.pem")
|
||||
$ if f .nes. "" .and. f .nes. old_f
|
||||
$ then
|
||||
$ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem"
|
||||
$ c := YES
|
||||
$ verify := YES
|
||||
$ if f$length(certs) .lt. 180 then goto loop_certs2
|
||||
$ else
|
||||
$ more := NO
|
||||
$ endif
|
||||
$ certs = certs - " "
|
||||
$
|
||||
$ if c
|
||||
$ then
|
||||
$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs'
|
||||
$ goto loop_certs
|
||||
$ endif
|
||||
$ if verify then mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs'
|
||||
$ if more then goto loop_certs
|
||||
$
|
||||
$ delete certs.tmp;*
|
||||
|
||||
@@ -33,8 +33,9 @@ $infile="MINFO";
|
||||
"ultrix-mips","DEC mips ultrix",
|
||||
"FreeBSD","FreeBSD distribution",
|
||||
"OS2-EMX", "EMX GCC OS/2",
|
||||
"netware-clib", "CodeWarrior for NetWare - CLib",
|
||||
"netware-libc", "CodeWarrior for NetWare - LibC",
|
||||
"netware-clib", "CodeWarrior for NetWare - CLib - with WinSock Sockets",
|
||||
"netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets",
|
||||
"netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets",
|
||||
"default","cc under unix",
|
||||
);
|
||||
|
||||
@@ -163,9 +164,11 @@ elsif ($platform eq "OS2-EMX")
|
||||
$wc=1;
|
||||
require 'OS2-EMX.pl';
|
||||
}
|
||||
elsif (($platform eq "netware-clib") || ($platform eq "netware-libc"))
|
||||
elsif (($platform eq "netware-clib") || ($platform eq "netware-libc") ||
|
||||
($platform eq "netware-libc-bsdsock"))
|
||||
{
|
||||
$LIBC=1 if $platform eq "netware-libc";
|
||||
$LIBC=1 if $platform eq "netware-libc" || $platform eq "netware-libc-bsdsock";
|
||||
$BSDSOCK=1 if $platform eq "netware-libc-bsdsock";
|
||||
require 'netware.pl';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2,19 +2,25 @@
|
||||
#
|
||||
|
||||
# The import files and other misc imports needed to link
|
||||
@misc_imports = ("GetProcessSwitchCount", "RunningProcess",
|
||||
"GetSuperHighResolutionTimer");
|
||||
if ($LIBC)
|
||||
{
|
||||
@import_files = ("libc.imp", "ws2nlm.imp");
|
||||
@import_files = ("libc.imp");
|
||||
@module_files = ("libc");
|
||||
}
|
||||
else
|
||||
{
|
||||
# clib build
|
||||
@import_files = ("clib.imp", "ws2nlm.imp");
|
||||
@import_files = ("clib.imp");
|
||||
@module_files = ("clib");
|
||||
push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16");
|
||||
}
|
||||
@misc_imports = ("GetProcessSwitchCount", "RunningProcess",
|
||||
"GetSuperHighResolutionTimer" );
|
||||
if (!$BSDSOCK)
|
||||
{
|
||||
push(@import_files, "ws2nlm.imp");
|
||||
}
|
||||
|
||||
|
||||
# The "IMPORTS" environment variable must be set and point to the location
|
||||
# where import files (*.imp) can be found.
|
||||
@@ -82,10 +88,12 @@ else
|
||||
# paths for each subdirectory a recursive include directive
|
||||
# is used ( -ir crypto ).
|
||||
#
|
||||
# A similar issue exists for the engines and apps subdirectories.
|
||||
#
|
||||
# Turned off the "possible" warnings ( -w nopossible ). Metrowerks
|
||||
# complained a lot about various stuff. May want to turn back
|
||||
# on for further development.
|
||||
$cflags="-ir crypto -msgstyle gcc -align 4 -processor pentium \\
|
||||
$cflags="-ir crypto -ir engines -ir apps -msgstyle gcc -align 4 -processor pentium \\
|
||||
-char unsigned -w on -w nolargeargs -w nopossible -w nounusedarg \\
|
||||
-w noimplicitconv -relax_pointers -nosyspath -DL_ENDIAN \\
|
||||
-DOPENSSL_SYSNAME_NETWARE -U_WIN32 -maxerrors 20 ";
|
||||
@@ -120,6 +128,12 @@ else
|
||||
$lflags.=" -entry _Prelude -exit _Stop";
|
||||
}
|
||||
|
||||
# If BSD Socket support is requested, set a define for the compiler
|
||||
if ($BSDSOCK)
|
||||
{
|
||||
$cflags.=" -DNETWARE_BSDSOCK";
|
||||
}
|
||||
|
||||
|
||||
# linking stuff
|
||||
# for the output directories use the mk1mf.pl values with "_nw" appended
|
||||
|
||||
@@ -130,15 +130,21 @@ if (system("make 2>&1 | tee make.log") > 255) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
$_=$options;
|
||||
s/no-asm//;
|
||||
s/no-shared//;
|
||||
s/no-krb5//;
|
||||
if (/no-/)
|
||||
{
|
||||
print OUT "Test skipped.\n";
|
||||
goto err;
|
||||
}
|
||||
# Not sure why this is here. The tests themselves can detect if their
|
||||
# particular feature isn't included, and should therefore skip themselves.
|
||||
# To skip *all* tests just because one algorithm isn't included is like
|
||||
# shooting mosquito with an elephant gun...
|
||||
# -- Richard Levitte, inspired by problem report 1089
|
||||
#
|
||||
#$_=$options;
|
||||
#s/no-asm//;
|
||||
#s/no-shared//;
|
||||
#s/no-krb5//;
|
||||
#if (/no-/)
|
||||
#{
|
||||
# print OUT "Test skipped.\n";
|
||||
# goto err;
|
||||
#}
|
||||
|
||||
print "Running make test...\n";
|
||||
if (system("make test 2>&1 | tee maketest.log") > 255)
|
||||
|
||||
Reference in New Issue
Block a user