提交 dac40f87 编写于 作者: D Dr. Stephen Henson

convert to Unix EOL form

上级 031c7890
perl Configure BC-32 perl Configure BC-32
perl util\mkfiles.pl > MINFO perl util\mkfiles.pl > MINFO
@rem create make file @rem create make file
perl util\mk1mf.pl no-asm BC-NT > bcb.mak perl util\mk1mf.pl no-asm BC-NT > bcb.mak
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl no-asm VC-NT >ms\nt.mak perl util\mk1mf.pl no-asm VC-NT >ms\nt.mak
perl util\mk1mf.pl dll no-asm VC-NT >ms\ntdll.mak perl util\mk1mf.pl dll no-asm VC-NT >ms\ntdll.mak
perl util\mkdef.pl libeay NT > ms\libeay32.def perl util\mkdef.pl libeay NT > ms\libeay32.def
perl util\mkdef.pl ssleay NT > ms\ssleay32.def perl util\mkdef.pl ssleay NT > ms\ssleay32.def
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
cmd /c "nasm -f win64 -v" >NUL: 2>&1 cmd /c "nasm -f win64 -v" >NUL: 2>&1
if %errorlevel% neq 0 goto ml64 if %errorlevel% neq 0 goto ml64
perl ms\uplink-x86_64.pl nasm > ms\uptable.asm perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
nasm -f win64 -o ms\uptable.obj ms\uptable.asm nasm -f win64 -o ms\uptable.obj ms\uptable.asm
goto proceed goto proceed
:ml64 :ml64
perl ms\uplink-x86_64.pl masm > ms\uptable.asm perl ms\uplink-x86_64.pl masm > ms\uptable.asm
ml64 -c -Foms\uptable.obj ms\uptable.asm ml64 -c -Foms\uptable.obj ms\uptable.asm
:proceed :proceed
perl util\mk1mf.pl no-asm VC-WIN64A >ms\nt.mak perl util\mk1mf.pl no-asm VC-WIN64A >ms\nt.mak
perl util\mk1mf.pl dll no-asm VC-WIN64A >ms\ntdll.mak perl util\mk1mf.pl dll no-asm VC-WIN64A >ms\ntdll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
perl ms\uplink-ia64.pl > ms\uptable.asm perl ms\uplink-ia64.pl > ms\uptable.asm
ias -o ms\uptable.obj ms\uptable.asm ias -o ms\uptable.obj ms\uptable.asm
perl util\mk1mf.pl no-asm VC-WIN64I >ms\nt.mak perl util\mk1mf.pl no-asm VC-WIN64I >ms\nt.mak
perl util\mk1mf.pl dll no-asm VC-WIN64I >ms\ntdll.mak perl util\mk1mf.pl dll no-asm VC-WIN64I >ms\ntdll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
@rem OpenSSL with Mingw32+GNU as @rem OpenSSL with Mingw32+GNU as
@rem --------------------------- @rem ---------------------------
perl Configure mingw %1 %2 %3 %4 %5 %6 %7 %8 perl Configure mingw %1 %2 %3 %4 %5 %6 %7 %8
@echo off @echo off
perl -e "exit 1 if '%1' eq 'no-asm'" perl -e "exit 1 if '%1' eq 'no-asm'"
if errorlevel 1 goto noasm if errorlevel 1 goto noasm
echo Generating x86 for GNU assember echo Generating x86 for GNU assember
echo Bignum echo Bignum
cd crypto\bn\asm cd crypto\bn\asm
perl bn-586.pl gaswin > bn-win32.s perl bn-586.pl gaswin > bn-win32.s
perl co-586.pl gaswin > co-win32.s perl co-586.pl gaswin > co-win32.s
cd ..\..\.. cd ..\..\..
echo DES echo DES
cd crypto\des\asm cd crypto\des\asm
perl des-586.pl gaswin > d-win32.s perl des-586.pl gaswin > d-win32.s
cd ..\..\.. cd ..\..\..
echo crypt echo crypt
cd crypto\des\asm cd crypto\des\asm
perl crypt586.pl gaswin > y-win32.s perl crypt586.pl gaswin > y-win32.s
cd ..\..\.. cd ..\..\..
echo Blowfish echo Blowfish
cd crypto\bf\asm cd crypto\bf\asm
perl bf-586.pl gaswin > b-win32.s perl bf-586.pl gaswin > b-win32.s
cd ..\..\.. cd ..\..\..
echo CAST5 echo CAST5
cd crypto\cast\asm cd crypto\cast\asm
perl cast-586.pl gaswin > c-win32.s perl cast-586.pl gaswin > c-win32.s
cd ..\..\.. cd ..\..\..
echo RC4 echo RC4
cd crypto\rc4\asm cd crypto\rc4\asm
perl rc4-586.pl gaswin > r4-win32.s perl rc4-586.pl gaswin > r4-win32.s
cd ..\..\.. cd ..\..\..
echo MD5 echo MD5
cd crypto\md5\asm cd crypto\md5\asm
perl md5-586.pl gaswin > m5-win32.s perl md5-586.pl gaswin > m5-win32.s
cd ..\..\.. cd ..\..\..
echo SHA1 echo SHA1
cd crypto\sha\asm cd crypto\sha\asm
perl sha1-586.pl gaswin > s1-win32.s perl sha1-586.pl gaswin > s1-win32.s
cd ..\..\.. cd ..\..\..
echo RIPEMD160 echo RIPEMD160
cd crypto\ripemd\asm cd crypto\ripemd\asm
perl rmd-586.pl gaswin > rm-win32.s perl rmd-586.pl gaswin > rm-win32.s
cd ..\..\.. cd ..\..\..
echo RC5\32 echo RC5\32
cd crypto\rc5\asm cd crypto\rc5\asm
perl rc5-586.pl gaswin > r5-win32.s perl rc5-586.pl gaswin > r5-win32.s
cd ..\..\.. cd ..\..\..
:noasm :noasm
echo Generating makefile echo Generating makefile
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak
echo Generating DLL definition files echo Generating DLL definition files
perl util\mkdef.pl 32 libeay >ms\libeay32.def perl util\mkdef.pl 32 libeay >ms\libeay32.def
if errorlevel 1 goto end if errorlevel 1 goto end
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
if errorlevel 1 goto end if errorlevel 1 goto end
rem copy ms\tlhelp32.h outinc rem copy ms\tlhelp32.h outinc
echo Building the libraries echo Building the libraries
mingw32-make -f ms/mingw32a.mak mingw32-make -f ms/mingw32a.mak
if errorlevel 1 goto end if errorlevel 1 goto end
echo Generating the DLLs and input libraries echo Generating the DLLs and input libraries
dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32 dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
if errorlevel 1 goto end if errorlevel 1 goto end
dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
if errorlevel 1 goto end if errorlevel 1 goto end
echo Done compiling OpenSSL echo Done compiling OpenSSL
:end :end
@rem OpenSSL with Mingw32 @rem OpenSSL with Mingw32
@rem -------------------- @rem --------------------
@rem Makefile @rem Makefile
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl Mingw32 >ms\mingw32.mak perl util\mk1mf.pl Mingw32 >ms\mingw32.mak
@rem DLL definition files @rem DLL definition files
perl util\mkdef.pl 32 libeay >ms\libeay32.def perl util\mkdef.pl 32 libeay >ms\libeay32.def
if errorlevel 1 goto end if errorlevel 1 goto end
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
if errorlevel 1 goto end if errorlevel 1 goto end
@rem Build the libraries @rem Build the libraries
make -f ms/mingw32.mak make -f ms/mingw32.mak
if errorlevel 1 goto end if errorlevel 1 goto end
@rem Generate the DLLs and input libraries @rem Generate the DLLs and input libraries
dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32 dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
if errorlevel 1 goto end if errorlevel 1 goto end
dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
if errorlevel 1 goto end if errorlevel 1 goto end
echo Done compiling OpenSSL echo Done compiling OpenSSL
:end :end
rem called by testenc rem called by testenc
echo test %1 %2 %3 %4 %5 %6 echo test %1 %2 %3 %4 %5 %6
%ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in %input% -out %tmp1% %ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in %input% -out %tmp1%
%ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in %tmp1% -out %out1% %ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in %tmp1% -out %out1%
%cmp% %input% %out1% %cmp% %input% %out1%
if errorlevel 1 goto err if errorlevel 1 goto err
echo test base64 %1 %2 %3 %4 %5 %6 echo test base64 %1 %2 %3 %4 %5 %6
%ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in %input% -out %tmp1% %ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in %input% -out %tmp1%
%ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in %tmp1% -out %out1% %ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in %tmp1% -out %out1%
%cmp% %input% %out1% %cmp% %input% %out1%
:err :err
rem called by testencce rem called by testencce
echo test %1 %2 %3 %4 %5 %6 echo test %1 %2 %3 %4 %5 %6
cecopy %input% CE:\OpenSSL cecopy %input% CE:\OpenSSL
cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1% cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1%
cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1% cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1%
del %out1% >nul 2>&1 del %out1% >nul 2>&1
cecopy CE:\OpenSSL\%out1% . cecopy CE:\OpenSSL\%out1% .
%cmp% %input% %out1% %cmp% %input% %out1%
if errorlevel 1 goto err if errorlevel 1 goto err
echo test base64 %1 %2 %3 %4 %5 %6 echo test base64 %1 %2 %3 %4 %5 %6
cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1% cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -e -bufsize 113 -k test -in \OpenSSL\%input% -out \OpenSSL\%tmp1%
cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1% cerun CE:\OpenSSL\%ssleay% %1 %2 %3 %4 %5 %6 -a -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1%
del %out1% >nul 2>&1 del %out1% >nul 2>&1
cecopy CE:\OpenSSL\%out1% . cecopy CE:\OpenSSL\%out1% .
%cmp% %input% %out1% %cmp% %input% %out1%
:err :err
@echo off @echo off
echo start testenc echo start testenc
path=..\ms;%path% path=..\ms;%path%
set ssleay=%1% set ssleay=%1%
set input=..\ms\testenc.bat set input=..\ms\testenc.bat
set tmp1=..\ms\cipher.out set tmp1=..\ms\cipher.out
set out1=..\ms\clear.out set out1=..\ms\clear.out
set cmp=perl ..\ms\cmp.pl set cmp=perl ..\ms\cmp.pl
cd cd
call tenc.bat enc call tenc.bat enc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat rc4 call tenc.bat rc4
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-cfb call tenc.bat des-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede-cfb call tenc.bat des-ede-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede3-cfb call tenc.bat des-ede3-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ofb call tenc.bat des-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede-ofb call tenc.bat des-ede-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede3-ofb call tenc.bat des-ede3-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ecb call tenc.bat des-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede call tenc.bat des-ede
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede3 call tenc.bat des-ede3
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-cbc call tenc.bat des-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede-cbc call tenc.bat des-ede-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat des-ede3-cbc call tenc.bat des-ede3-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat idea-ecb call tenc.bat idea-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat idea-cfb call tenc.bat idea-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat idea-ofb call tenc.bat idea-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat idea-cbc call tenc.bat idea-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat rc2-ecb call tenc.bat rc2-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat rc2-cfb call tenc.bat rc2-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat rc2-ofb call tenc.bat rc2-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat rc2-cbc call tenc.bat rc2-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat bf-ecb call tenc.bat bf-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat bf-cfb call tenc.bat bf-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat bf-ofb call tenc.bat bf-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tenc.bat bf-cbc call tenc.bat bf-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
echo OK echo OK
del %out1% del %out1%
del %tmp1% del %tmp1%
:err :err
@echo off @echo off
echo start testenc echo start testenc
path=..\ms;%path% path=..\ms;%path%
set ssleay=%1% set ssleay=%1%
copy ..\ms\testenc.bat >nul copy ..\ms\testenc.bat >nul
set input=testenc.bat set input=testenc.bat
set tmp1=cipher.out set tmp1=cipher.out
set out1=clear.out set out1=clear.out
set cmp=perl ..\ms\cmp.pl set cmp=perl ..\ms\cmp.pl
cecopy %ssleay% CE:\OpenSSL cecopy %ssleay% CE:\OpenSSL
cd cd
call tencce.bat enc call tencce.bat enc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat rc4 call tencce.bat rc4
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-cfb call tencce.bat des-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede-cfb call tencce.bat des-ede-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede3-cfb call tencce.bat des-ede3-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ofb call tencce.bat des-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede-ofb call tencce.bat des-ede-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede3-ofb call tencce.bat des-ede3-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ecb call tencce.bat des-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede call tencce.bat des-ede
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede3 call tencce.bat des-ede3
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-cbc call tencce.bat des-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede-cbc call tencce.bat des-ede-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat des-ede3-cbc call tencce.bat des-ede3-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat idea-ecb call tencce.bat idea-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat idea-cfb call tencce.bat idea-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat idea-ofb call tencce.bat idea-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat idea-cbc call tencce.bat idea-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat rc2-ecb call tencce.bat rc2-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat rc2-cfb call tencce.bat rc2-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat rc2-ofb call tencce.bat rc2-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat rc2-cbc call tencce.bat rc2-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat bf-ecb call tencce.bat bf-ecb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat bf-cfb call tencce.bat bf-cfb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat bf-ofb call tencce.bat bf-ofb
if errorlevel 1 goto err if errorlevel 1 goto err
call tencce.bat bf-cbc call tencce.bat bf-cbc
if errorlevel 1 goto err if errorlevel 1 goto err
echo OK echo OK
del %out1% >nul 2>&1 del %out1% >nul 2>&1
del %tmp1% >nul 2>&1 del %tmp1% >nul 2>&1
:err :err
@echo off @echo off
set ssleay=%1% set ssleay=%1%
set tmp1=pem.out set tmp1=pem.out
set cmp=fc.exe set cmp=fc.exe
call tpem.bat crl ..\test\testcrl.pem call tpem.bat crl ..\test\testcrl.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat pkcs7 ..\test\testp7.pem call tpem.bat pkcs7 ..\test\testp7.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat req ..\test\testreq2.pem call tpem.bat req ..\test\testreq2.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat rsa ..\test\testrsa.pem call tpem.bat rsa ..\test\testrsa.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat x509 ..\test\testx509.pem call tpem.bat x509 ..\test\testx509.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err if errorlevel 1 goto err
call tpem.bat sess_id ..\test\testsid.pem call tpem.bat sess_id ..\test\testsid.pem
if errorlevel 1 goto err if errorlevel 1 goto err
echo OK echo OK
del %tmp1% del %tmp1%
:err :err
@echo off @echo off
set ssleay=%1% set ssleay=%1%
set tmp1=pem.out set tmp1=pem.out
set cmp=fc.exe set cmp=fc.exe
cecopy %ssleay% CE:\OpenSSL cecopy %ssleay% CE:\OpenSSL
copy ..\test\testcrl.pem >nul copy ..\test\testcrl.pem >nul
call tpemce.bat crl testcrl.pem call tpemce.bat crl testcrl.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\testp7.pem >nul copy ..\test\testp7.pem >nul
call tpemce.bat pkcs7 testp7.pem call tpemce.bat pkcs7 testp7.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\testreq2.pem >nul copy ..\test\testreq2.pem >nul
call tpemce.bat req testreq2.pem call tpemce.bat req testreq2.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\testrsa.pem >nul copy ..\test\testrsa.pem >nul
call tpemce.bat rsa testrsa.pem call tpemce.bat rsa testrsa.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\testx509.pem >nul copy ..\test\testx509.pem >nul
call tpemce.bat x509 testx509.pem call tpemce.bat x509 testx509.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\v3-cert1.pem >nul copy ..\test\v3-cert1.pem >nul
call tpemce.bat x509 v3-cert1.pem call tpemce.bat x509 v3-cert1.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\v3-cert1.pem >nul copy ..\test\v3-cert1.pem >nul
call tpemce.bat x509 v3-cert1.pem call tpemce.bat x509 v3-cert1.pem
if errorlevel 1 goto err if errorlevel 1 goto err
copy ..\test\testsid.pem >nul copy ..\test\testsid.pem >nul
call tpemce.bat sess_id testsid.pem call tpemce.bat sess_id testsid.pem
if errorlevel 1 goto err if errorlevel 1 goto err
echo OK echo OK
del %tmp1% >nul 2>&1 del %tmp1% >nul 2>&1
:err :err
@echo off @echo off
rem set ssleay=..\out\ssleay rem set ssleay=..\out\ssleay
set ssleay=%1 set ssleay=%1
set reqcmd=%ssleay% req set reqcmd=%ssleay% req
set x509cmd=%ssleay% x509 -sha1 set x509cmd=%ssleay% x509 -sha1
set verifycmd=%ssleay% verify set verifycmd=%ssleay% verify
set CAkey=keyCA.ss set CAkey=keyCA.ss
set CAcert=certCA.ss set CAcert=certCA.ss
set CAserial=certCA.srl set CAserial=certCA.srl
set CAreq=reqCA.ss set CAreq=reqCA.ss
set CAconf=..\test\CAss.cnf set CAconf=..\test\CAss.cnf
set CAreq2=req2CA.ss set CAreq2=req2CA.ss
set Uconf=..\test\Uss.cnf set Uconf=..\test\Uss.cnf
set Ukey=keyU.ss set Ukey=keyU.ss
set Ureq=reqU.ss set Ureq=reqU.ss
set Ucert=certU.ss set Ucert=certU.ss
echo make a certificate request using 'req' echo make a certificate request using 'req'
%reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new %reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new
if errorlevel 1 goto e_req if errorlevel 1 goto e_req
echo convert the certificate request into a self signed certificate using 'x509' echo convert the certificate request into a self signed certificate using 'x509'
%x509cmd% -CAcreateserial -in %CAreq% -days 30 -req -out %CAcert% -signkey %CAkey% >err.ss %x509cmd% -CAcreateserial -in %CAreq% -days 30 -req -out %CAcert% -signkey %CAkey% >err.ss
if errorlevel 1 goto e_x509 if errorlevel 1 goto e_x509
echo -- echo --
echo convert a certificate into a certificate request using 'x509' echo convert a certificate into a certificate request using 'x509'
%x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% >err.ss %x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% >err.ss
if errorlevel 1 goto e_x509_2 if errorlevel 1 goto e_x509_2
%reqcmd% -verify -in %CAreq% -noout %reqcmd% -verify -in %CAreq% -noout
if errorlevel 1 goto e_vrfy_1 if errorlevel 1 goto e_vrfy_1
%reqcmd% -verify -in %CAreq2% -noout %reqcmd% -verify -in %CAreq2% -noout
if errorlevel 1 goto e_vrfy_2 if errorlevel 1 goto e_vrfy_2
%verifycmd% -CAfile %CAcert% %CAcert% %verifycmd% -CAfile %CAcert% %CAcert%
if errorlevel 1 goto e_vrfy_3 if errorlevel 1 goto e_vrfy_3
echo -- echo --
echo make another certificate request using 'req' echo make another certificate request using 'req'
%reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new >err.ss %reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new >err.ss
if errorlevel 1 goto e_req_gen if errorlevel 1 goto e_req_gen
echo -- echo --
echo sign certificate request with the just created CA via 'x509' echo sign certificate request with the just created CA via 'x509'
%x509cmd% -CAcreateserial -in %Ureq% -days 30 -req -out %Ucert% -CA %CAcert% -CAkey %CAkey% -CAserial %CAserial% %x509cmd% -CAcreateserial -in %Ureq% -days 30 -req -out %Ucert% -CA %CAcert% -CAkey %CAkey% -CAserial %CAserial%
if errorlevel 1 goto e_x_sign if errorlevel 1 goto e_x_sign
%verifycmd% -CAfile %CAcert% %Ucert% %verifycmd% -CAfile %CAcert% %Ucert%
echo -- echo --
echo Certificate details echo Certificate details
%x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert% %x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert%
echo Everything appeared to work echo Everything appeared to work
echo -- echo --
echo The generated CA certificate is %CAcert% echo The generated CA certificate is %CAcert%
echo The generated CA private key is %CAkey% echo The generated CA private key is %CAkey%
echo The current CA signing serial number is in %CAserial% echo The current CA signing serial number is in %CAserial%
echo The generated user certificate is %Ucert% echo The generated user certificate is %Ucert%
echo The generated user private key is %Ukey% echo The generated user private key is %Ukey%
echo -- echo --
del err.ss del err.ss
goto end goto end
:e_req :e_req
echo error using 'req' to generate a certificate request echo error using 'req' to generate a certificate request
goto end goto end
:e_x509 :e_x509
echo error using 'x509' to self sign a certificate request echo error using 'x509' to self sign a certificate request
goto end goto end
:e_x509_2 :e_x509_2
echo error using 'x509' convert a certificate to a certificate request echo error using 'x509' convert a certificate to a certificate request
goto end goto end
:e_vrfy_1 :e_vrfy_1
echo first generated request is invalid echo first generated request is invalid
goto end goto end
:e_vrfy_2 :e_vrfy_2
echo second generated request is invalid echo second generated request is invalid
goto end goto end
:e_vrfy_3 :e_vrfy_3
echo first generated cert is invalid echo first generated cert is invalid
goto end goto end
:e_req_gen :e_req_gen
echo error using 'req' to generate a certificate request echo error using 'req' to generate a certificate request
goto end goto end
:e_x_sign :e_x_sign
echo error using 'x509' to sign a certificate request echo error using 'x509' to sign a certificate request
goto end goto end
:end :end
rem set ssleay=..\out\ssleay rem set ssleay=..\out\ssleay
set ssleay=%1 set ssleay=%1
set reqcmd=%ssleay% req set reqcmd=%ssleay% req
set x509cmd=%ssleay% x509 set x509cmd=%ssleay% x509
set verifycmd=%ssleay% verify set verifycmd=%ssleay% verify
set CAkey=\OpenSSL\keyCA.ss set CAkey=\OpenSSL\keyCA.ss
set CAcert=\OpenSSL\certCA.ss set CAcert=\OpenSSL\certCA.ss
set CAserial=\OpenSSL\certCA.srl set CAserial=\OpenSSL\certCA.srl
set CAreq=\OpenSSL\reqCA.ss set CAreq=\OpenSSL\reqCA.ss
cecopy ..\test\CAss.cnf CE:\OpenSSL cecopy ..\test\CAss.cnf CE:\OpenSSL
set CAconf=\OpenSSL\CAss.cnf set CAconf=\OpenSSL\CAss.cnf
set CAreq2=\OpenSSL\req2CA.ss set CAreq2=\OpenSSL\req2CA.ss
cecopy ..\test\Uss.cnf CE:\OpenSSL cecopy ..\test\Uss.cnf CE:\OpenSSL
set Uconf=\OpenSSL\Uss.cnf set Uconf=\OpenSSL\Uss.cnf
set Ukey=\OpenSSL\keyU.ss set Ukey=\OpenSSL\keyU.ss
set Ureq=\OpenSSL\reqU.ss set Ureq=\OpenSSL\reqU.ss
set Ucert=\OpenSSL\certU.ss set Ucert=\OpenSSL\certU.ss
echo make a certificate request using 'req' echo make a certificate request using 'req'
cerun CE:\OpenSSL\%reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new cerun CE:\OpenSSL\%reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new
if errorlevel 1 goto e_req if errorlevel 1 goto e_req
echo convert the certificate request into a self signed certificate using 'x509' echo convert the certificate request into a self signed certificate using 'x509'
cerun CE:\OpenSSL\%x509cmd% -CAcreateserial -in %CAreq% -days 30 -req -out %CAcert% -signkey %CAkey% "> \OpenSSL\err.ss" cerun CE:\OpenSSL\%x509cmd% -CAcreateserial -in %CAreq% -days 30 -req -out %CAcert% -signkey %CAkey% "> \OpenSSL\err.ss"
if errorlevel 1 goto e_x509 if errorlevel 1 goto e_x509
echo -- echo --
echo convert a certificate into a certificate request using 'x509' echo convert a certificate into a certificate request using 'x509'
cerun CE:\OpenSSL\%x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% "> \OpenSSL\err.ss" cerun CE:\OpenSSL\%x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% "> \OpenSSL\err.ss"
if errorlevel 1 goto e_x509_2 if errorlevel 1 goto e_x509_2
cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq% -noout cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq% -noout
if errorlevel 1 goto e_vrfy_1 if errorlevel 1 goto e_vrfy_1
cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq2% -noout cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq2% -noout
if errorlevel 1 goto e_vrfy_2 if errorlevel 1 goto e_vrfy_2
cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %CAcert% cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %CAcert%
if errorlevel 1 goto e_vrfy_3 if errorlevel 1 goto e_vrfy_3
echo -- echo --
echo make another certificate request using 'req' echo make another certificate request using 'req'
cerun CE:\OpenSSL\%reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new "> \OpenSSL\err.ss" cerun CE:\OpenSSL\%reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new "> \OpenSSL\err.ss"
if errorlevel 1 goto e_req_gen if errorlevel 1 goto e_req_gen
echo -- echo --
echo sign certificate request with the just created CA via 'x509' echo sign certificate request with the just created CA via 'x509'
cerun CE:\OpenSSL\%x509cmd% -CAcreateserial -in %Ureq% -days 30 -req -out %Ucert% -CA %CAcert% -CAkey %CAkey% -CAserial %CAserial% cerun CE:\OpenSSL\%x509cmd% -CAcreateserial -in %Ureq% -days 30 -req -out %Ucert% -CA %CAcert% -CAkey %CAkey% -CAserial %CAserial%
if errorlevel 1 goto e_x_sign if errorlevel 1 goto e_x_sign
cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %Ucert% cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %Ucert%
echo -- echo --
echo Certificate details echo Certificate details
cerun CE:\OpenSSL\%x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert% cerun CE:\OpenSSL\%x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert%
cecopy CE:%CAcert% . cecopy CE:%CAcert% .
cecopy CE:%CAkey% . cecopy CE:%CAkey% .
cecopy CE:%CAserial% . cecopy CE:%CAserial% .
cecopy CE:%Ucert% . cecopy CE:%Ucert% .
cecopy CE:%Ukey% . cecopy CE:%Ukey% .
echo Everything appeared to work echo Everything appeared to work
echo -- echo --
echo The generated CA certificate is %CAcert% echo The generated CA certificate is %CAcert%
echo The generated CA private key is %CAkey% echo The generated CA private key is %CAkey%
echo The current CA signing serial number is in %CAserial% echo The current CA signing serial number is in %CAserial%
echo The generated user certificate is %Ucert% echo The generated user certificate is %Ucert%
echo The generated user private key is %Ukey% echo The generated user private key is %Ukey%
echo -- echo --
cedel CE:\OpenSSL\err.ss cedel CE:\OpenSSL\err.ss
goto end goto end
:e_req :e_req
echo error using 'req' to generate a certificate request echo error using 'req' to generate a certificate request
goto end goto end
:e_x509 :e_x509
echo error using 'x509' to self sign a certificate request echo error using 'x509' to self sign a certificate request
goto end goto end
:e_x509_2 :e_x509_2
echo error using 'x509' convert a certificate to a certificate request echo error using 'x509' convert a certificate to a certificate request
goto end goto end
:e_vrfy_1 :e_vrfy_1
echo first generated request is invalid echo first generated request is invalid
goto end goto end
:e_vrfy_2 :e_vrfy_2
echo second generated request is invalid echo second generated request is invalid
goto end goto end
:e_vrfy_3 :e_vrfy_3
echo first generated cert is invalid echo first generated cert is invalid
goto end goto end
:e_req_gen :e_req_gen
echo error using 'req' to generate a certificate request echo error using 'req' to generate a certificate request
goto end goto end
:e_x_sign :e_x_sign
echo error using 'x509' to sign a certificate request echo error using 'x509' to sign a certificate request
goto end goto end
:end :end
rem called by testpem rem called by testpem
echo test %1 %2 echo test %1 %2
%ssleay% %1 -in %2 -out %tmp1% %ssleay% %1 -in %2 -out %tmp1%
%cmp% %2 %tmp1% %cmp% %2 %tmp1%
rem called by testpemce rem called by testpemce
echo test %1 %2 echo test %1 %2
cecopy %2 CE:\OpenSSL cecopy %2 CE:\OpenSSL
cerun CE:\OpenSSL\%ssleay% %1 -in \OpenSSL\%2 -out \OpenSSL\%tmp1% cerun CE:\OpenSSL\%ssleay% %1 -in \OpenSSL\%2 -out \OpenSSL\%tmp1%
del %tmp1% >nul 2>&1 del %tmp1% >nul 2>&1
cecopy CE:\OpenSSL\%tmp1% . cecopy CE:\OpenSSL\%tmp1% .
%cmp% %2 %tmp1% %cmp% %2 %tmp1%
@echo off @echo off
echo Generating x86 assember echo Generating x86 assember
echo Bignum echo Bignum
cd crypto\bn\asm cd crypto\bn\asm
perl x86.pl win32n > bn-win32.asm perl x86.pl win32n > bn-win32.asm
cd ..\..\.. cd ..\..\..
echo DES echo DES
cd crypto\des\asm cd crypto\des\asm
perl des-586.pl win32n > d-win32.asm perl des-586.pl win32n > d-win32.asm
cd ..\..\.. cd ..\..\..
echo "crypt(3)" echo "crypt(3)"
cd crypto\des\asm cd crypto\des\asm
perl crypt586.pl win32n > y-win32.asm perl crypt586.pl win32n > y-win32.asm
cd ..\..\.. cd ..\..\..
echo Blowfish echo Blowfish
cd crypto\bf\asm cd crypto\bf\asm
perl bf-586.pl win32n > b-win32.asm perl bf-586.pl win32n > b-win32.asm
cd ..\..\.. cd ..\..\..
echo CAST5 echo CAST5
cd crypto\cast\asm cd crypto\cast\asm
perl cast-586.pl win32n > c-win32.asm perl cast-586.pl win32n > c-win32.asm
cd ..\..\.. cd ..\..\..
echo RC4 echo RC4
cd crypto\rc4\asm cd crypto\rc4\asm
perl rc4-586.pl win32n > r4-win32.asm perl rc4-586.pl win32n > r4-win32.asm
cd ..\..\.. cd ..\..\..
echo MD5 echo MD5
cd crypto\md5\asm cd crypto\md5\asm
perl md5-586.pl win32n > m5-win32.asm perl md5-586.pl win32n > m5-win32.asm
cd ..\..\.. cd ..\..\..
echo SHA1 echo SHA1
cd crypto\sha\asm cd crypto\sha\asm
perl sha1-586.pl win32n > s1-win32.asm perl sha1-586.pl win32n > s1-win32.asm
cd ..\..\.. cd ..\..\..
echo RIPEMD160 echo RIPEMD160
cd crypto\ripemd\asm cd crypto\ripemd\asm
perl rmd-586.pl win32n > rm-win32.asm perl rmd-586.pl win32n > rm-win32.asm
cd ..\..\.. cd ..\..\..
echo RC5\32 echo RC5\32
cd crypto\rc5\asm cd crypto\rc5\asm
perl rc5-586.pl win32n > r5-win32.asm perl rc5-586.pl win32n > r5-win32.asm
cd ..\..\.. cd ..\..\..
echo on echo on
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册