From e2414b41add4a9e49efbe3e6773be0addc93ec6c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 5 Jun 2005 21:46:57 +0000 Subject: [PATCH] Updated support for NetWare, submitted by Verdon Walker . PR: 1098 --- Configure | 6 +-- INSTALL.NW | 14 +++---- Netware/do_tests.pl | 95 +++++++++++++++++++++++++-------------------- e_os.h | 6 +-- util/pl/netware.pl | 4 +- 5 files changed, 65 insertions(+), 60 deletions(-) diff --git a/Configure b/Configure index fa6baff4ea..de69757c5b 100755 --- a/Configure +++ b/Configure @@ -483,10 +483,10 @@ 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-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:::::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}:", diff --git a/INSTALL.NW b/INSTALL.NW index 6ee02939c0..3dae72a144 100644 --- a/INSTALL.NW +++ b/INSTALL.NW @@ -95,7 +95,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): @@ -288,13 +293,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 diff --git a/Netware/do_tests.pl b/Netware/do_tests.pl index f4e11272d3..0be0838a13 100644 --- a/Netware/do_tests.pl +++ b/Netware/do_tests.pl @@ -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); } diff --git a/e_os.h b/e_os.h index cf76632b1e..54982cee00 100644 --- a/e_os.h +++ b/e_os.h @@ -438,11 +438,7 @@ extern HINSTANCE _hInstance; # elif defined(OPENSSL_SYS_NETWARE) /* NetWare uses the WinSock2 interfaces */ -# if defined(NETWARE_CLIB) -# include -# elif defined(NETWARE_LIBC) -# include -# endif +# include # 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); } diff --git a/util/pl/netware.pl b/util/pl/netware.pl index 233612a911..2258a39920 100644 --- a/util/pl/netware.pl +++ b/util/pl/netware.pl @@ -82,10 +82,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 "; -- 2.25.1