Compare commits
17 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 |
21
Configure
21
Configure
@@ -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,
|
||||
@@ -320,7 +320,7 @@ 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...
|
||||
@@ -371,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}:::",
|
||||
@@ -398,7 +398,7 @@ 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)",
|
||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
|
||||
@@ -486,7 +486,10 @@ my %table=(
|
||||
# netware-clib => legacy CLib c-runtime support
|
||||
"netware-clib", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
# netware-libc => LibC/NKS support
|
||||
# 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
|
||||
@@ -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?
|
||||
|
||||
22
INSTALL.NW
22
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:
|
||||
---------------
|
||||
@@ -126,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:
|
||||
@@ -177,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
|
||||
|
||||
@@ -197,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
|
||||
|
||||
@@ -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 .
|
||||
|
||||
4
PROBLEMS
4
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
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.8-beta4 06 Jun 2005
|
||||
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,12 +1,12 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2005/06/06 00:39:18 $
|
||||
______________ $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
|
||||
linux-elf (Debian [unstable]) SUCCESS
|
||||
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
|
||||
|
||||
96
TABLE
96
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 =
|
||||
@@ -3593,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 =
|
||||
@@ -3841,7 +3895,7 @@ $unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops =
|
||||
$bn_ops = BN_LLONG
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3944,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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 06 Jun 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-fips-beta5 13 Jun 2005"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta4 06 Jun 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta5 13 Jun 2005"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
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,9 +444,17 @@ 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
|
||||
*/
|
||||
# include <novsock2.h>
|
||||
# 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)
|
||||
# define SSLeay_Read(a,b,c) recv((a),(b),(c),0)
|
||||
# define SHUTDOWN(fd) { shutdown((fd),0); closesocket(fd); }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
@@ -122,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