diff options
author | 1998-10-05 20:12:28 +0000 | |
---|---|---|
committer | 1998-10-05 20:12:28 +0000 | |
commit | 5b37fcf34e412bf0b6ad32ddb294e900d64c5855 (patch) | |
tree | cf5d52f4abf74eb3ee59fd705ef686e3c5b96d91 /lib/libssl/src/shlib | |
parent | add a reference to fork(2) \ (diff) | |
download | wireguard-openbsd-5b37fcf34e412bf0b6ad32ddb294e900d64c5855.tar.xz wireguard-openbsd-5b37fcf34e412bf0b6ad32ddb294e900d64c5855.zip |
Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD build
functionality for shared libs.
Note that routines such as sslv2_init and friends that use RSA will
not work due to lack of RSA in this library.
Needs documentation and help from ports for easy upgrade to full
functionality where legally possible.
Diffstat (limited to 'lib/libssl/src/shlib')
-rw-r--r-- | lib/libssl/src/shlib/README | 1 | ||||
-rw-r--r-- | lib/libssl/src/shlib/irix.sh | 7 | ||||
-rw-r--r-- | lib/libssl/src/shlib/linux.sh | 76 | ||||
-rw-r--r-- | lib/libssl/src/shlib/solaris.sh | 36 | ||||
-rw-r--r-- | lib/libssl/src/shlib/sun.sh | 8 | ||||
-rw-r--r-- | lib/libssl/src/shlib/win32.bat | 18 | ||||
-rw-r--r-- | lib/libssl/src/shlib/win32dll.bat | 13 |
7 files changed, 159 insertions, 0 deletions
diff --git a/lib/libssl/src/shlib/README b/lib/libssl/src/shlib/README new file mode 100644 index 00000000000..fea07a59eab --- /dev/null +++ b/lib/libssl/src/shlib/README @@ -0,0 +1 @@ +Only the windows NT and, linux builds have been tested for SSLeay 0.8.0 diff --git a/lib/libssl/src/shlib/irix.sh b/lib/libssl/src/shlib/irix.sh new file mode 100644 index 00000000000..22e4e6ad508 --- /dev/null +++ b/lib/libssl/src/shlib/irix.sh @@ -0,0 +1,7 @@ +FLAGS="-DTERMIOS -O2 -mips2 -DB_ENDIAN -fomit-frame-pointer -Wall -Iinclude" +SHFLAGS="-DPIC -fpic" + +gcc -c -Icrypto $SHFLAGS $FLAGS -o crypto.o crypto/crypto.c +ld -shared -o libcrypto.so crypto.o +gcc -c -Issl $SHFLAGS $FLAGS -o ssl.o ssl/ssl.c +ld -shared -o libssl.so ssl.o diff --git a/lib/libssl/src/shlib/linux.sh b/lib/libssl/src/shlib/linux.sh new file mode 100644 index 00000000000..f80292d90c5 --- /dev/null +++ b/lib/libssl/src/shlib/linux.sh @@ -0,0 +1,76 @@ +#!/bin/sh + +echo "#define DATE \"`date`\"" >crypto/date.h + +major="0" +minor="8.2" +slib=libssl +clib=libcrypto +CC=gcc +CPP='gcc -E' +AS=as +FLAGS='-DX86_ASM -DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -m486 -Wall' +#FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -m486 -Wall -DREF_CHECK -DCRYPTO_MDEBUG' +INCLUDE='-Iinclude -Icrypto -Issl' +SHFLAGS='-DPIC -fpic' + +CFLAGS="$FLAGS $INCLUDE $SHFLAGS" +ASM_OBJ=""; + +echo compiling bignum assember +$CPP -DELF crypto/bn/asm/bn86unix.cpp | $AS -o bn_asm.o +CFLAGS="$CFLAGS -DBN_ASM -DX86_ASM" +ASM_OBJ="$ASM_OBJ bn_asm.o" + +echo compiling des assember +$CPP -DELF crypto/des/asm/dx86unix.cpp | $AS -o des_enc.o +$CPP -DELF crypto/des/asm/yx86unix.cpp | $AS -o fcrypt-b.o +CFLAGS="$CFLAGS -DDES_ASM" +ASM_OBJ="$ASM_OBJ des_enc.o fcrypt-b.o" + +echo compiling blowfish assember +$CPP -DELF crypto/bf/asm/bx86unix.cpp | $AS -o bf_enc.o +CFLAGS="$CFLAGS -DBF_ASM" +ASM_OBJ="$ASM_OBJ bf_enc.o" + +echo compiling cast assember +$CPP -DELF crypto/cast/asm/cx86unix.cpp | $AS -o cast_enc.o +CFLAGS="$CFLAGS -DCAST_ASM" +ASM_OBJ="$ASM_OBJ cast_enc.o" + +echo compiling rc4 assember +$CPP -DELF crypto/rc4/asm/rx86unix.cpp | $AS -o rc4_enc.o +CFLAGS="$CFLAGS -DRC4_ASM" +ASM_OBJ="$ASM_OBJ rc4_enc.o" + +echo compiling md5 assember +$CPP -DELF crypto/md5/asm/mx86unix.cpp | $AS -o md5_enc.o +CFLAGS="$CFLAGS -DMD5_ASM" +ASM_OBJ="$ASM_OBJ md5_enc.o" + +echo compiling sha1 assember +$CPP -DELF crypto/sha/asm/sx86unix.cpp | $AS -o sha1_enc.o +CFLAGS="$CFLAGS -DSHA1_ASM" +ASM_OBJ="$ASM_OBJ sha1_enc.o" + +echo compiling $clib +$CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c + +echo linking $clib.so +gcc $CFLAGS -shared -Wl,-soname,$clib.so.$major -o $clib.so.$major.$minor crypto.o $ASM_OBJ +/bin/rm -f $clib.so $clib.so.$major +ln -s $clib.so.$major.$minor $clib.so +ln -s $clib.so.$major.$minor $clib.so.$major + +echo compiling $slib.so +$CC -c $CFLAGS -o ssl.o ssl/ssl.c + +echo building $slib.so +gcc $CFLAGS -shared -Wl,-soname,$slib.so.$major -o $slib.so.$major.$minor ssl.o +/bin/rm -f $slib.so $slib.so.$major +ln -s $slib.so.$major.$minor $slib.so +ln -s $slib.so.$major.$minor $slib.so.$major + +echo building ssleay executable +gcc $CFLAGS -o ssleay apps/eay.c -L. -lssl -lcrypto + diff --git a/lib/libssl/src/shlib/solaris.sh b/lib/libssl/src/shlib/solaris.sh new file mode 100644 index 00000000000..03475f12b41 --- /dev/null +++ b/lib/libssl/src/shlib/solaris.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +echo "#define DATE \"`date`\"" >crypto/date.h + +major="0" +minor="8.0" +slib=libssl +clib=libcrypto +CC=gcc +CPP='gcc -E' +AS=as +#FLAGS='-DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -mv8 -Wall' +FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -Wall -DREF_CHECK -DCRYPTO_MDEBUG' +INCLUDE='-Iinclude -Icrypto -Issl' +SHFLAGS='-DPIC -fpic' + +CFLAGS="$FLAGS $INCLUDE $SHFLAGS" +ASM_OBJ=""; + +echo compiling bignum assember +$AS -o bn_asm.o crypto/bn/asm/sparc.s +CFLAGS="$CFLAGS -DBN_ASM" +ASM_OBJ="$ASM_OBJ bn_asm.o" + +echo compiling $clib +$CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c + +echo linking $clib.so +gcc $CFLAGS -shared -o $clib.so.$major.$minor crypto.o $ASM_OBJ -lnsl -lsocket + +echo compiling $slib.so +$CC -c $CFLAGS -o ssl.o ssl/ssl.c + +echo building $slib.so +gcc $CFLAGS -shared -o $slib.so ssl.o -L. -lcrypto + diff --git a/lib/libssl/src/shlib/sun.sh b/lib/libssl/src/shlib/sun.sh new file mode 100644 index 00000000000..a890bbd3765 --- /dev/null +++ b/lib/libssl/src/shlib/sun.sh @@ -0,0 +1,8 @@ +FLAGS="-DTERMIO -O3 -DB_ENDIAN -fomit-frame-pointer -mv8 -Wall -Iinclude" +SHFLAGS="-DPIC -fpic" + +gcc -c -Icrypto $SHFLAGS -fpic $FLAGS -o crypto.o crypto/crypto.c +ld -G -z text -o libcrypto.so crypto.o + +gcc -c -Issl $SHFLAGS $FLAGS -o ssl.o ssl/ssl.c +ld -G -z text -o libssl.so ssl.o diff --git a/lib/libssl/src/shlib/win32.bat b/lib/libssl/src/shlib/win32.bat new file mode 100644 index 00000000000..c807a99d353 --- /dev/null +++ b/lib/libssl/src/shlib/win32.bat @@ -0,0 +1,18 @@ +rem win32 dll build + +set OPTIONS1=-DDES_ASM -DBN_ASM -DBF_ASM -DFLAT_INC -Iout -Itmp -DL_ENDIAN +set OPTIONS2=/W3 /WX /Ox /Gs0 /GF /Gy /nologo + +set OPTIONS=%OPTIONS1% %OPTIONS2% + +rem ml /coff /c crypto\bf\asm\b-win32.asm +rem ml /coff /c crypto\des\asm\c-win32.asm +rem ml /coff /c crypto\des\asm\d-win32.asm +rem ml /coff /c crypto\bn\asm\x86nt32.asm + +cl /Focrypto.obj -DWIN32 %OPTIONS% -c crypto\crypto.c +cl /Fossl.obj -DWIN32 %OPTIONS% -c ssl\ssl.c +cl /Foeay.obj -DWIN32 %OPTIONS% -c apps\eay.c + +cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib wsock32.lib + diff --git a/lib/libssl/src/shlib/win32dll.bat b/lib/libssl/src/shlib/win32dll.bat new file mode 100644 index 00000000000..294c94c81c0 --- /dev/null +++ b/lib/libssl/src/shlib/win32dll.bat @@ -0,0 +1,13 @@ +rem win32 dll build + +set OPTIONS1=-DDES_ASM -DBN_ASM -DBF_ASM -DFLAT_INC -Iout -Itmp -DL_ENDIAN +set OPTIONS2=/W3 /WX /Ox /Gf /nologo + +set OPTIONS=%OPTIONS1% %OPTIONS2% + +cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib wsock32.lib + +cl /Fessleay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\ssleay32.def ssl\ssl.c libeay32.lib + +cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib user32.lib wsock32.lib + |