Merge remote-tracking branch 'origin/master'

# Conflicts:
#	README.md
This commit is contained in:
Zhi Guan
2017-02-14 16:12:29 +08:00
parent d2254170b8
commit 43fed1108d
3503 changed files with 320546 additions and 408546 deletions

BIN
ms/.rnd

Binary file not shown.

View File

@@ -1,20 +0,0 @@
set OPTS=no-asm
perl Configure VC-WIN32
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak
perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak
perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak
perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
nmake -f d32.mak
@if errorlevel 1 goto end
nmake -f 32.mak
@if errorlevel 1 goto end
nmake -f d32dll.mak
@if errorlevel 1 goto end
nmake -f 32dll.mak
:end

View File

@@ -1,13 +0,0 @@
Run these makefiles from the top level as in
nmake -f ms\makefilename
to build with visual C++ 4.[01].
The results will be in the out directory.
These makefiles and def files were generated by typing
perl util\mk1mf.pl VC-NT >ms/nt.mak
perl util\mk1mf.pl VC-NT dll >ms/ntdll.mak
perl util\mkdef.pl 32 crypto > ms/crypto32.def
perl util\mkdef.pl 32 ssl > ms/ssl32.def

View File

@@ -1,3 +1,12 @@
/*
* Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#define APPLINK_STDIN 1
#define APPLINK_STDOUT 2
#define APPLINK_STDERR 3
@@ -81,9 +90,9 @@ void **
* decoration right with Borland C. Otherwise it works
* purely incidentally, as we pass no parameters.
*/
__stdcall
__stdcall
# else
__cdecl
__cdecl
# endif
OPENSSL_Applink(void)
{

View File

@@ -1,6 +0,0 @@
perl Configure BC-32
perl util\mkfiles.pl > MINFO
@rem create make file
perl util\mk1mf.pl no-asm BC-NT > bcb.mak

View File

@@ -1 +0,0 @@
1D

View File

@@ -1,10 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIBXDCCAQYCAQAwDQYJKoZIhvcNAQEEBQAwOTELMAkGA1UEBhMCQVUxFzAVBgNV
BAoTDkRvZGd5IEJyb3RoZXJzMREwDwYDVQQDEwhEb2RneSBDQTAeFw05ODA3MjEw
NjUwMTZaFw05ODA4MjAwNjUwMTZaMDkxCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5E
b2RneSBCcm90aGVyczERMA8GA1UEAxMIRG9kZ3kgQ0EwXDANBgkqhkiG9w0BAQEF
AANLADBIAkEA0DQLenM/ncK6CwSEJhOO1WfZUPUEi4pvos9fHW459jh3rRDADgi3
fiCYxoRVSQhvB47kDZ3ViNg5yrDhy7F9ywIDAQABMA0GCSqGSIb3DQEBBAUAA0EA
S564l3SBxJ+QcIXthGGDyP5zkxTf/1fHfelW9LNgu6lZTdy9Dlp/NecPekzRmZEM
WiGXGkKNeuo8PsnGJHP9Qg==
-----END CERTIFICATE-----

View File

@@ -1,10 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIBcTCCARsCARwwDQYJKoZIhvcNAQEEBQAwOTELMAkGA1UEBhMCQVUxFzAVBgNV
BAoTDkRvZGd5IEJyb3RoZXJzMREwDwYDVQQDEwhEb2RneSBDQTAeFw05ODA3MjEw
NjUwMjdaFw05ODA4MjAwNjUwMjdaME4xCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5E
b2RneSBCcm90aGVyczESMBAGA1UEAxMJQnJvdGhlciAxMRIwEAYDVQQDEwlCcm90
aGVyIDIwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA0e4qorOr/zuLB9NvRaXhJVaI
HaGGasa7eMAjVPitWAXkN+DxXiGH1CnMgQraKiYzsEVP15xtxkevEvK5jJpOwwID
AQABMA0GCSqGSIb3DQEBBAUAA0EAZhcPV+SWwaszFuDTYc6fUurcV9OeXUqoxSQy
MnLZPTyWubHbbkUr9fUfdf7Cc7dFqGzag05VHkNQUS9VjMzjIQ==
-----END CERTIFICATE-----

66
ms/cmp.pl Normal file → Executable file
View File

@@ -1,4 +1,10 @@
#!/usr/local/bin/perl
#! /usr/bin/env perl
# Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
@@ -10,38 +16,38 @@ binmode IN1;
$tot=0;
$ret=1;
for (;;)
{
$n1=sysread(IN0,$b1,4096);
$n2=sysread(IN1,$b2,4096);
{
$n1=sysread(IN0,$b1,4096);
$n2=sysread(IN1,$b2,4096);
last if ($n1 != $n2);
last if ($b1 ne $b2);
last if ($n1 < 0);
if ($n1 == 0)
{
$ret=0;
last;
}
$tot+=$n1;
}
last if ($n1 != $n2);
last if ($b1 ne $b2);
last if ($n1 < 0);
if ($n1 == 0)
{
$ret=0;
last;
}
$tot+=$n1;
}
close(IN0);
close(IN1);
if ($ret)
{
printf STDERR "$ARGV[0] and $ARGV[1] are different\n";
@a1=unpack("C*",$b1);
@a2=unpack("C*",$b2);
for ($i=0; $i<=$#a1; $i++)
{
if ($a1[$i] ne $a2[$i])
{
printf "%02X %02X <<\n",$a1[$i],$a2[$i];
last;
}
}
$nm=$tot+$n1;
$tot+=$i+1;
printf STDERR "diff at char $tot of $nm\n";
}
{
printf STDERR "$ARGV[0] and $ARGV[1] are different\n";
@a1=unpack("C*",$b1);
@a2=unpack("C*",$b2);
for ($i=0; $i<=$#a1; $i++)
{
if ($a1[$i] ne $a2[$i])
{
printf "%02X %02X <<\n",$a1[$i],$a2[$i];
last;
}
}
$nm=$tot+$n1;
$tot+=$i+1;
printf STDERR "diff at char $tot of $nm\n";
}
exit($ret);

View File

@@ -1,11 +0,0 @@
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
if x%OSVERSION% == x goto skipce
perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
:skipce
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def

View File

@@ -1,8 +0,0 @@
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl nasm VC-WIN32 >ms\nt.mak
perl util\mk1mf.pl dll nasm VC-WIN32 >ms\ntdll.mak
perl util\mk1mf.pl nasm BC-NT >ms\bcb.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def

View File

@@ -1,7 +0,0 @@
perl util\mkfiles.pl >MINFO
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\mkdef.pl libeay NT > ms\libeay32.def
perl util\mkdef.pl ssleay NT > ms\ssleay32.def

View File

@@ -1,19 +0,0 @@
perl util\mkfiles.pl >MINFO
cmd /c "nasm -f win64 -v" >NUL 2>&1
if %errorlevel% neq 0 goto ml64
perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
nasm -f win64 -o ms\uptable.obj ms\uptable.asm
goto proceed
:ml64
perl ms\uplink-x86_64.pl masm > ms\uptable.asm
ml64 -c -Foms\uptable.obj ms\uptable.asm
:proceed
perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def

View File

@@ -1,9 +0,0 @@
perl util\mkfiles.pl >MINFO
perl ms\uplink-ia64.pl > ms\uptable.asm
ias -o ms\uptable.obj ms\uptable.asm
perl util\mk1mf.pl VC-WIN64I >ms\nt.mak
perl util\mk1mf.pl dll VC-WIN64I >ms\ntdll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def

View File

@@ -1,9 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBOwIBAAJBANA0C3pzP53CugsEhCYTjtVn2VD1BIuKb6LPXx1uOfY4d60QwA4I
t34gmMaEVUkIbweO5A2d1YjYOcqw4cuxfcsCAwEAAQJAOT9WOKEfyN0WEpl3TJDs
ITmgw2XbjhLOh1HFsW3xegWlaOuhL/wGamz7n7zzL/RQF3JP/VvpGk2F8VD9JhwT
wQIhAPmqM3fLttBoCQuwQRdIPfB7Ps3THqx6N8AJ04z3I1ejAiEA1XyDd7bLpWrw
/oA8CmR4b/KCGfvRwAL/Qej/rQliw7kCIQCYRzSvO8ScpuflhjKdZcXJuRJcbgnG
f6Ejc5rh3xdiawIhALMmLdzEFNjXiSzIx5mg/kBTLUJIw5dx7GqO8B9xBORhAiA5
oTN/hgvvrkkmRsHQpNBmzAEGBzhMEEq9lD6ZWrTSRg==
-----END RSA PRIVATE KEY-----

View File

@@ -1,9 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBPAIBAAJBANHuKqKzq/87iwfTb0Wl4SVWiB2hhmrGu3jAI1T4rVgF5Dfg8V4h
h9QpzIEK2iomM7BFT9ecbcZHrxLyuYyaTsMCAwEAAQJBAIxtM6n4ZCJscxj+D13Y
k13Fn3Gqvd6pJ3ijlj7dxh6tRBBQ3W9qmQflyvEc81giI2XtbVYBOEJKtJ1cWWZm
gAkCIQDpEoOuc4KCI5ti6aMJvtxlXWNHbkXCxtbeIjH4+FnH9QIhAOaU3XVeWWOK
PnnO87KniDjHQqWLnooivDGRK+FUKeDXAiEA2MjEvFVqFVvDIsxHPkBNROcI+Z6i
ulkx76kErBtrfqUCIHN5uBLQZmngUPuFtiwRlLoCqJDphENfs+oK7vPQx4xPAiEA
hnY2Ulrpld83IG6bUs95Loc8Fk81hez5YwmhsFEXVtk=
-----END RSA PRIVATE KEY-----

View File

@@ -1,90 +0,0 @@
@rem OpenSSL with Mingw32+GNU as
@rem ---------------------------
perl Configure mingw %1 %2 %3 %4 %5 %6 %7 %8
@echo off
perl -e "exit 1 if '%1' eq 'no-asm'"
if errorlevel 1 goto noasm
echo Generating x86 for GNU assember
echo Bignum
cd crypto\bn\asm
perl bn-586.pl gaswin > bn-win32.s
perl co-586.pl gaswin > co-win32.s
cd ..\..\..
echo DES
cd crypto\des\asm
perl des-586.pl gaswin > d-win32.s
cd ..\..\..
echo crypt
cd crypto\des\asm
perl crypt586.pl gaswin > y-win32.s
cd ..\..\..
echo Blowfish
cd crypto\bf\asm
perl bf-586.pl gaswin > b-win32.s
cd ..\..\..
echo CAST5
cd crypto\cast\asm
perl cast-586.pl gaswin > c-win32.s
cd ..\..\..
echo RC4
cd crypto\rc4\asm
perl rc4-586.pl gaswin > r4-win32.s
cd ..\..\..
echo MD5
cd crypto\md5\asm
perl md5-586.pl gaswin > m5-win32.s
cd ..\..\..
echo SHA1
cd crypto\sha\asm
perl sha1-586.pl gaswin > s1-win32.s
cd ..\..\..
echo RIPEMD160
cd crypto\ripemd\asm
perl rmd-586.pl gaswin > rm-win32.s
cd ..\..\..
echo RC5\32
cd crypto\rc5\asm
perl rc5-586.pl gaswin > r5-win32.s
cd ..\..\..
:noasm
echo Generating makefile
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak
echo Generating DLL definition files
perl util\mkdef.pl 32 libeay >ms\libeay32.def
if errorlevel 1 goto end
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
if errorlevel 1 goto end
rem copy ms\tlhelp32.h outinc
echo Building the libraries
mingw32-make -f ms/mingw32a.mak
if errorlevel 1 goto end
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
if errorlevel 1 goto end
dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
if errorlevel 1 goto end
echo Done compiling OpenSSL
:end

View File

@@ -1,26 +0,0 @@
@rem OpenSSL with Mingw32
@rem --------------------
@rem Makefile
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl Mingw32 >ms\mingw32.mak
@rem DLL definition files
perl util\mkdef.pl 32 libeay >ms\libeay32.def
if errorlevel 1 goto end
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
if errorlevel 1 goto end
@rem Build the libraries
make -f ms/mingw32.mak
if errorlevel 1 goto end
@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
if errorlevel 1 goto end
dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
if errorlevel 1 goto end
echo Done compiling OpenSSL
:end

View File

@@ -1,29 +0,0 @@
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=AU, O=Dodgy Brothers, CN=Dodgy CA
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (512 bit)
Modulus (512 bit):
00:d0:34:0b:7a:73:3f:9d:c2:ba:0b:04:84:26:13:
8e:d5:67:d9:50:f5:04:8b:8a:6f:a2:cf:5f:1d:6e:
39:f6:38:77:ad:10:c0:0e:08:b7:7e:20:98:c6:84:
55:49:08:6f:07:8e:e4:0d:9d:d5:88:d8:39:ca:b0:
e1:cb:b1:7d:cb
Exponent: 65537 (0x10001)
Attributes:
a0:00
Signature Algorithm: md5WithRSAEncryption
8d:15:e6:8e:49:0f:07:fb:e0:72:ad:f0:04:9a:c8:5d:e7:1b:
ed:99:c9:c3:3c:f5:8e:4d:a1:5e:e1:40:75:2c:24:f0:c6:dd:
10:87:35:26:1d:cc:79:3f:a2:c6:a0:04:c8:52:78:ed:26:32:
d3:1b:a7:cd:5e:8c:55:92:dd:88
-----BEGIN CERTIFICATE REQUEST-----
MIHzMIGeAgEAMDkxCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5Eb2RneSBCcm90aGVy
czERMA8GA1UEAxMIRG9kZ3kgQ0EwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA0DQL
enM/ncK6CwSEJhOO1WfZUPUEi4pvos9fHW459jh3rRDADgi3fiCYxoRVSQhvB47k
DZ3ViNg5yrDhy7F9ywIDAQABoAAwDQYJKoZIhvcNAQEEBQADQQCNFeaOSQ8H++By
rfAEmshd5xvtmcnDPPWOTaFe4UB1LCTwxt0QhzUmHcx5P6LGoATIUnjtJjLTG6fN
XoxVkt2I
-----END CERTIFICATE REQUEST-----

View File

@@ -1,8 +0,0 @@
-----BEGIN CERTIFICATE REQUEST-----
MIHzMIGeAgEAMDkxCzAJBgNVBAYTAkFVMRcwFQYDVQQKEw5Eb2RneSBCcm90aGVy
czERMA8GA1UEAxMIRG9kZ3kgQ0EwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA0DQL
enM/ncK6CwSEJhOO1WfZUPUEi4pvos9fHW459jh3rRDADgi3fiCYxoRVSQhvB47k
DZ3ViNg5yrDhy7F9ywIDAQABoAAwDQYJKoZIhvcNAQEFBQADQQA5DZSZgDXs8flG
GZf4SGr8QpqkxSu9bZOYp/ySuz1khj7aupBrvZBmqZcZx4ZjAUN7UQpMWu2gyfKa
mAiiLPFN
-----END CERTIFICATE REQUEST-----

View File

@@ -1,8 +0,0 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIBCDCBswIBADBOMQswCQYDVQQGEwJBVTEXMBUGA1UEChMORG9kZ3kgQnJvdGhl
cnMxEjAQBgNVBAMTCUJyb3RoZXIgMTESMBAGA1UEAxMJQnJvdGhlciAyMFwwDQYJ
KoZIhvcNAQEBBQADSwAwSAJBANHuKqKzq/87iwfTb0Wl4SVWiB2hhmrGu3jAI1T4
rVgF5Dfg8V4hh9QpzIEK2iomM7BFT9ecbcZHrxLyuYyaTsMCAwEAAaAAMA0GCSqG
SIb3DQEBAgUAA0EAhB0p6LbiVq+XshLo5sBQN0rsROC1OgWrdS6ZUmMaigOKK069
r1o+dGwbM5VCYGTZf0PW9OtGuArGct0laL5h4w==
-----END CERTIFICATE REQUEST-----

71
ms/segrenam.pl Executable file
View File

@@ -0,0 +1,71 @@
#! /usr/bin/env perl
# Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
my $quiet = 1;
unpack("L",pack("N",1))!=1 || die "only little-endian hosts are supported";
# first argument can specify custom suffix...
$suffix=(@ARGV[0]=~/^\$/) ? shift(@ARGV) : "\$m";
#################################################################
# rename segments in COFF modules according to %map table below #
%map=( ".text" => "fipstx$suffix", #
".text\$"=> "fipstx$suffix", #
".rdata" => "fipsrd$suffix", #
".data" => "fipsda$suffix" ); #
#################################################################
# collect file list
foreach (@ARGV) {
if (/\*/) { push(@files,glob($_)); }
else { push(@files,$_); }
}
use Fcntl;
use Fcntl ":seek";
foreach (@files) {
$file=$_;
print "processing $file\n" unless $quiet;
sysopen(FD,$file,O_RDWR|O_BINARY) || die "sysopen($file): $!";
# read IMAGE_DOS_HEADER
sysread(FD,$mz,64)==64 || die "$file is too short";
@dos_header=unpack("a2C58I",$mz);
if (@dos_header[0] eq "MZ") {
$e_lfanew=pop(@dos_header);
sysseek(FD,$e_lfanew,SEEK_SET) || die "$file is too short";
sysread(FD,$Magic,4)==4 || die "$file is too short";
unpack("I",$Magic)==0x4550 || die "$file is not COFF image";
} elsif ($file =~ /\.obj$/i) {
# .obj files have no IMAGE_DOS_HEADER
sysseek(FD,0,SEEK_SET) || die "unable to rewind $file";
} else { next; }
# read IMAGE_FILE_HEADER
sysread(FD,$coff,20)==20 || die "$file is too short";
($Machine,$NumberOfSections,$TimeDateStamp,
$PointerToSymbolTable,$NumberOfSysmbols,
$SizeOfOptionalHeader,$Characteristics)=unpack("SSIIISS",$coff);
# skip over IMAGE_OPTIONAL_HEADER
sysseek(FD,$SizeOfOptionalHeader,SEEK_CUR) || die "$file is too short";
# traverse IMAGE_SECTION_HEADER table
for($i=0;$i<$NumberOfSections;$i++) {
sysread(FD,$SectionHeader,40)==40 || die "$file is too short";
($Name,@opaque)=unpack("Z8C*",$SectionHeader);
if ($map{$Name}) {
sysseek(FD,-40,SEEK_CUR) || die "unable to rewind $file";
syswrite(FD,pack("a8C*",$map{$Name},@opaque))==40 || die "syswrite failed: $!";
printf " %-8s -> %.8s\n",$Name,$map{$Name} unless $quiet;
}
}
close(FD);
}

View File

@@ -1,37 +0,0 @@
set makefile=ms\nt.mak
perl Configure b
del tmp\*.obj
nmake -f %makefile%
nmake -f %makefile%
nmake -f %makefile%
out\ssleay version -v -b -f >speed.1
out\ssleay speed >speed.1l
perl Configure bl-4c-2c
del tmp\rc4*.obj tmp\bn*.obj tmp\md2_dgst.obj
nmake -f %makefile%
nmake -f %makefile%
nmake -f %makefile%
out\ssleay speed rc4 rsa md2 >speed.2l
perl Configure bl-4c-ri
del tmp\rc4*.obj
nmake -f %makefile%
nmake -f %makefile%
nmake -f %makefile%
out\ssleay speed rc4 >speed.3l
perl Configure b2-is-ri-dp
del tmp\i_*.obj tmp\rc4*.obj tmp\ecb_enc.obj tmp\bn*.obj
nmake -f %makefile%
nmake -f %makefile%
nmake -f %makefile%
out\ssleay speed rsa rc4 idea des >speed.4l
type speed.1 >speed.log
type speed.1l >>speed.log
perl util\sp-diff.pl speed.1l speed.2l >>speed.log
perl util\sp-diff.pl speed.1l speed.3l >>speed.log
perl util\sp-diff.pl speed.1l speed.4l >>speed.log

View File

@@ -1,14 +0,0 @@
rem called by testenc
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 -d -bufsize 157 -k test -in %tmp1% -out %out1%
%cmp% %input% %out1%
if errorlevel 1 goto err
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 -d -bufsize 157 -k test -in %tmp1% -out %out1%
%cmp% %input% %out1%
:err

View File

@@ -1,19 +0,0 @@
rem called by testencce
echo test %1 %2 %3 %4 %5 %6
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 -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1%
del %out1% >nul 2>&1
cecopy CE:\OpenSSL\%out1% .
%cmp% %input% %out1%
if errorlevel 1 goto err
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 -d -bufsize 157 -k test -in \OpenSSL\%tmp1% -out \OpenSSL\%out1%
del %out1% >nul 2>&1
cecopy CE:\OpenSSL\%out1% .
%cmp% %input% %out1%
:err

View File

@@ -1,185 +0,0 @@
@echo off
set test=..\ms
set opath=%PATH%
PATH=..\ms;%PATH%
set OPENSSL_CONF=..\apps\openssl.cnf
rem run this from inside the bin directory
echo rsa_test
rsa_test
if errorlevel 1 goto done
echo destest
destest
if errorlevel 1 goto done
echo ideatest
ideatest
if errorlevel 1 goto done
echo bftest
bftest
if errorlevel 1 goto done
echo shatest
shatest
if errorlevel 1 goto done
echo sha1test
sha1test
if errorlevel 1 goto done
echo md5test
md5test
if errorlevel 1 goto done
echo rc2test
rc2test
if errorlevel 1 goto done
echo rc4test
rc4test
if errorlevel 1 goto done
echo randtest
randtest
if errorlevel 1 goto done
echo dhtest
dhtest
if errorlevel 1 goto done
echo exptest
exptest
if errorlevel 1 goto done
echo dsatest
dsatest
if errorlevel 1 goto done
echo ectest
ectest
if errorlevel 1 goto done
echo testenc
call %test%\testenc openssl
if errorlevel 1 goto done
echo testpem
call %test%\testpem openssl
if errorlevel 1 goto done
echo testss
call %test%\testss openssl
if errorlevel 1 goto done
set SSL_TEST=ssltest -key keyU.ss -cert certU.ss -c_key keyU.ss -c_cert certU.ss -CAfile certCA.ss
echo test sslv2
ssltest -ssl2
if errorlevel 1 goto done
echo test sslv2 with server authentication
%SSL_TEST% -ssl2 -server_auth
if errorlevel 1 goto done
echo test sslv2 with client authentication
%SSL_TEST% -ssl2 -client_auth
if errorlevel 1 goto done
echo test sslv2 with both client and server authentication
%SSL_TEST% -ssl2 -server_auth -client_auth
if errorlevel 1 goto done
echo test sslv3
ssltest -ssl3
if errorlevel 1 goto done
echo test sslv3 with server authentication
%SSL_TEST% -ssl3 -server_auth
if errorlevel 1 goto done
echo test sslv3 with client authentication
%SSL_TEST% -ssl3 -client_auth
if errorlevel 1 goto done
echo test sslv3 with both client and server authentication
%SSL_TEST% -ssl3 -server_auth -client_auth
if errorlevel 1 goto done
echo test sslv2/sslv3
ssltest
if errorlevel 1 goto done
echo test sslv2/sslv3 with server authentication
%SSL_TEST% -server_auth
if errorlevel 1 goto done
echo test sslv2/sslv3 with client authentication
%SSL_TEST% -client_auth
if errorlevel 1 goto done
echo test sslv2/sslv3 with both client and server authentication
%SSL_TEST% -server_auth -client_auth
if errorlevel 1 goto done
echo test sslv2 via BIO pair
ssltest -bio_pair -ssl2
if errorlevel 1 goto done
echo test sslv2/sslv3 with 1024 bit DHE via BIO pair
ssltest -bio_pair -dhe1024dsa -v
if errorlevel 1 goto done
echo test sslv2 with server authentication via BIO pair
%SSL_TEST% -bio_pair -ssl2 -server_auth
if errorlevel 1 goto done
echo test sslv2 with client authentication via BIO pair
%SSL_TEST% -bio_pair -ssl2 -client_auth
if errorlevel 1 goto done
echo test sslv2 with both client and server authentication via BIO pair
%SSL_TEST% -bio_pair -ssl2 -server_auth -client_auth
if errorlevel 1 goto done
echo test sslv3 via BIO pair
ssltest -bio_pair -ssl3
if errorlevel 1 goto done
echo test sslv3 with server authentication via BIO pair
%SSL_TEST% -bio_pair -ssl3 -server_auth
if errorlevel 1 goto done
echo test sslv3 with client authentication via BIO pair
%SSL_TEST% -bio_pair -ssl3 -client_auth
if errorlevel 1 goto done
echo test sslv3 with both client and server authentication via BIO pair
%SSL_TEST% -bio_pair -ssl3 -server_auth -client_auth
if errorlevel 1 goto done
echo test sslv2/sslv3 via BIO pair
ssltest -bio_pair
if errorlevel 1 goto done
echo test sslv2/sslv3 with server authentication
%SSL_TEST% -bio_pair -server_auth
if errorlevel 1 goto done
echo test sslv2/sslv3 with client authentication via BIO pair
%SSL_TEST% -bio_pair -client_auth
if errorlevel 1 goto done
echo test sslv2/sslv3 with both client and server authentication via BIO pair
%SSL_TEST% -bio_pair -server_auth -client_auth
if errorlevel 1 goto done
echo passed all tests
goto end
:done
echo problems.....
:end
PATH=%opath%

View File

@@ -1,234 +0,0 @@
@echo off
cemkdir CE:\OpenSSL
set test=..\ms
set opath=%PATH%
PATH=..\ms;%PATH%
cecopy ..\apps\openssl.cnf CE:\OpenSSL
set OPENSSL_CONF=\OpenSSL\openssl.cnf
set HOME=\OpenSSL
set CERUN_PASS_ENV=OPENSSL_CONF HOME
rem run this from inside the bin directory
rem Copy the DLL's (though they'll only exist if we're in out32dll)
if exist libeay32.dll cecopy libeay32.dll CE:\OpenSSL
if exist ssleay32.dll cecopy ssleay32.dll CE:\OpenSSL
echo rsa_test
call %test%\testce2 rsa_test
if errorlevel 1 goto done
echo destest
call %test%\testce2 destest
if errorlevel 1 goto done
echo ideatest
call %test%\testce2 ideatest
if errorlevel 1 goto done
echo bftest
call %test%\testce2 bftest
if errorlevel 1 goto done
echo shatest
call %test%\testce2 shatest
if errorlevel 1 goto done
echo sha1test
call %test%\testce2 sha1test
if errorlevel 1 goto done
echo md5test
call %test%\testce2 md5test
if errorlevel 1 goto done
echo md2test
call %test%\testce2 md2test
if errorlevel 1 goto done
echo mdc2test
call %test%\testce2 mdc2test
if errorlevel 1 goto done
echo rc2test
call %test%\testce2 rc2test
if errorlevel 1 goto done
echo rc4test
call %test%\testce2 rc4test
if errorlevel 1 goto done
echo randtest
call %test%\testce2 randtest
if errorlevel 1 goto done
echo dhtest
call %test%\testce2 dhtest
if errorlevel 1 goto done
echo exptest
call %test%\testce2 exptest
if errorlevel 1 goto done
echo dsatest
call %test%\testce2 dsatest
if errorlevel 1 goto done
echo testenc
call %test%\testencce openssl.exe
if errorlevel 1 goto done
echo testpem
call %test%\testpemce openssl.exe
if errorlevel 1 goto done
cecopy openssl.exe CE:\OpenSSL
echo verify
copy ..\certs\*.pem cert.tmp >nul
cecopy cert.tmp CE:\OpenSSL
cemkdir CE:\OpenSSL\certs
rem cecopy ..\certs\*.pem CE:\OpenSSL\certs
cecopy ..\certs\ca-cert.pem CE:\OpenSSL\certs
cecopy ..\certs\dsa-ca.pem CE:\OpenSSL\certs
cecopy ..\certs\dsa-pca.pem CE:\OpenSSL\certs
cecopy ..\certs\factory.pem CE:\OpenSSL\certs
cecopy ..\certs\ICE-CA.pem CE:\OpenSSL\certs
cecopy ..\certs\ICE-root.pem CE:\OpenSSL\certs
cecopy ..\certs\ICE-user.pem CE:\OpenSSL\certs
cecopy ..\certs\nortelCA.pem CE:\OpenSSL\certs
cecopy ..\certs\pca-cert.pem CE:\OpenSSL\certs
cecopy ..\certs\RegTP-4R.pem CE:\OpenSSL\certs
cecopy ..\certs\RegTP-5R.pem CE:\OpenSSL\certs
cecopy ..\certs\RegTP-6R.pem CE:\OpenSSL\certs
cecopy ..\certs\rsa-cca.pem CE:\OpenSSL\certs
cecopy ..\certs\thawteCb.pem CE:\OpenSSL\certs
cecopy ..\certs\thawteCp.pem CE:\OpenSSL\certs
cecopy ..\certs\timCA.pem CE:\OpenSSL\certs
cecopy ..\certs\tjhCA.pem CE:\OpenSSL\certs
cecopy ..\certs\vsign1.pem CE:\OpenSSL\certs
cecopy ..\certs\vsign2.pem CE:\OpenSSL\certs
cecopy ..\certs\vsign3.pem CE:\OpenSSL\certs
cecopy ..\certs\vsignss.pem CE:\OpenSSL\certs
cecopy ..\certs\vsigntca.pem CE:\OpenSSL\certs
cerun CE:\OpenSSL\openssl verify -CAfile \OpenSSL\cert.tmp \OpenSSL\certs\*.pem
echo testss
call %test%\testssce openssl.exe
if errorlevel 1 goto done
cecopy ssltest.exe CE:\OpenSSL
cecopy ..\apps\server.pem CE:\OpenSSL
cecopy ..\apps\client.pem CE:\OpenSSL
echo test sslv2
cerun CE:\OpenSSL\ssltest -ssl2
if errorlevel 1 goto done
echo test sslv2 with server authentication
cerun CE:\OpenSSL\ssltest -ssl2 -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2 with client authentication
cerun CE:\OpenSSL\ssltest -ssl2 -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2 with both client and server authentication
cerun CE:\OpenSSL\ssltest -ssl2 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3
cerun CE:\OpenSSL\ssltest -ssl3
if errorlevel 1 goto done
echo test sslv3 with server authentication
cerun CE:\OpenSSL\ssltest -ssl3 -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3 with client authentication
cerun CE:\OpenSSL\ssltest -ssl3 -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3 with both client and server authentication
cerun CE:\OpenSSL\ssltest -ssl3 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3
cerun CE:\OpenSSL\ssltest
if errorlevel 1 goto done
echo test sslv2/sslv3 with server authentication
cerun CE:\OpenSSL\ssltest -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3 with client authentication
cerun CE:\OpenSSL\ssltest -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3 with both client and server authentication
cerun CE:\OpenSSL\ssltest -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2 via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl2
if errorlevel 1 goto done
echo test sslv2/sslv3 with 1024 bit DHE via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -dhe1024dsa -v
if errorlevel 1 goto done
echo test sslv2 with server authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2 with client authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2 with both client and server authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3 via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl3
if errorlevel 1 goto done
echo test sslv3 with server authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3 with client authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv3 with both client and server authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3 via BIO pair
cerun CE:\OpenSSL\ssltest
if errorlevel 1 goto done
echo test sslv2/sslv3 with server authentication
cerun CE:\OpenSSL\ssltest -bio_pair -server_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3 with client authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
echo test sslv2/sslv3 with both client and server authentication via BIO pair
cerun CE:\OpenSSL\ssltest -bio_pair -server_auth -client_auth -CAfile \OpenSSL\cert.tmp
if errorlevel 1 goto done
del cert.tmp
echo passed all tests
goto end
:done
echo problems.....
:end
PATH=%opath%

View File

@@ -1,2 +0,0 @@
cecopy %1.exe CE:\OpenSSL
cerun CE:\OpenSSL\%1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,94 +0,0 @@
@echo off
echo start testenc
path=..\ms;%path%
set ssleay=%1%
set input=..\ms\testenc.bat
set tmp1=..\ms\cipher.out
set out1=..\ms\clear.out
set cmp=perl ..\ms\cmp.pl
cd
call tenc.bat enc
if errorlevel 1 goto err
call tenc.bat rc4
if errorlevel 1 goto err
call tenc.bat des-cfb
if errorlevel 1 goto err
call tenc.bat des-ede-cfb
if errorlevel 1 goto err
call tenc.bat des-ede3-cfb
if errorlevel 1 goto err
call tenc.bat des-ofb
if errorlevel 1 goto err
call tenc.bat des-ede-ofb
if errorlevel 1 goto err
call tenc.bat des-ede3-ofb
if errorlevel 1 goto err
call tenc.bat des-ecb
if errorlevel 1 goto err
call tenc.bat des-ede
if errorlevel 1 goto err
call tenc.bat des-ede3
if errorlevel 1 goto err
call tenc.bat des-cbc
if errorlevel 1 goto err
call tenc.bat des-ede-cbc
if errorlevel 1 goto err
call tenc.bat des-ede3-cbc
if errorlevel 1 goto err
call tenc.bat idea-ecb
if errorlevel 1 goto err
call tenc.bat idea-cfb
if errorlevel 1 goto err
call tenc.bat idea-ofb
if errorlevel 1 goto err
call tenc.bat idea-cbc
if errorlevel 1 goto err
call tenc.bat rc2-ecb
if errorlevel 1 goto err
call tenc.bat rc2-cfb
if errorlevel 1 goto err
call tenc.bat rc2-ofb
if errorlevel 1 goto err
call tenc.bat rc2-cbc
if errorlevel 1 goto err
call tenc.bat bf-ecb
if errorlevel 1 goto err
call tenc.bat bf-cfb
if errorlevel 1 goto err
call tenc.bat bf-ofb
if errorlevel 1 goto err
call tenc.bat bf-cbc
if errorlevel 1 goto err
echo OK
del %out1%
del %tmp1%
:err

View File

@@ -1,97 +0,0 @@
@echo off
echo start testenc
path=..\ms;%path%
set ssleay=%1%
copy ..\ms\testenc.bat >nul
set input=testenc.bat
set tmp1=cipher.out
set out1=clear.out
set cmp=perl ..\ms\cmp.pl
cecopy %ssleay% CE:\OpenSSL
cd
call tencce.bat enc
if errorlevel 1 goto err
call tencce.bat rc4
if errorlevel 1 goto err
call tencce.bat des-cfb
if errorlevel 1 goto err
call tencce.bat des-ede-cfb
if errorlevel 1 goto err
call tencce.bat des-ede3-cfb
if errorlevel 1 goto err
call tencce.bat des-ofb
if errorlevel 1 goto err
call tencce.bat des-ede-ofb
if errorlevel 1 goto err
call tencce.bat des-ede3-ofb
if errorlevel 1 goto err
call tencce.bat des-ecb
if errorlevel 1 goto err
call tencce.bat des-ede
if errorlevel 1 goto err
call tencce.bat des-ede3
if errorlevel 1 goto err
call tencce.bat des-cbc
if errorlevel 1 goto err
call tencce.bat des-ede-cbc
if errorlevel 1 goto err
call tencce.bat des-ede3-cbc
if errorlevel 1 goto err
call tencce.bat idea-ecb
if errorlevel 1 goto err
call tencce.bat idea-cfb
if errorlevel 1 goto err
call tencce.bat idea-ofb
if errorlevel 1 goto err
call tencce.bat idea-cbc
if errorlevel 1 goto err
call tencce.bat rc2-ecb
if errorlevel 1 goto err
call tencce.bat rc2-cfb
if errorlevel 1 goto err
call tencce.bat rc2-ofb
if errorlevel 1 goto err
call tencce.bat rc2-cbc
if errorlevel 1 goto err
call tencce.bat bf-ecb
if errorlevel 1 goto err
call tencce.bat bf-cfb
if errorlevel 1 goto err
call tencce.bat bf-ofb
if errorlevel 1 goto err
call tencce.bat bf-cbc
if errorlevel 1 goto err
echo OK
del %out1% >nul 2>&1
del %tmp1% >nul 2>&1
:err

View File

@@ -1,32 +0,0 @@
@echo off
set ssleay=%1%
set tmp1=pem.out
set cmp=fc.exe
call tpem.bat crl ..\test\testcrl.pem
if errorlevel 1 goto err
call tpem.bat pkcs7 ..\test\testp7.pem
if errorlevel 1 goto err
call tpem.bat req ..\test\testreq2.pem
if errorlevel 1 goto err
call tpem.bat rsa ..\test\testrsa.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\testx509.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat sess_id ..\test\testsid.pem
if errorlevel 1 goto err
echo OK
del %tmp1%
:err

View File

@@ -1,42 +0,0 @@
@echo off
set ssleay=%1%
set tmp1=pem.out
set cmp=fc.exe
cecopy %ssleay% CE:\OpenSSL
copy ..\test\testcrl.pem >nul
call tpemce.bat crl testcrl.pem
if errorlevel 1 goto err
copy ..\test\testp7.pem >nul
call tpemce.bat pkcs7 testp7.pem
if errorlevel 1 goto err
copy ..\test\testreq2.pem >nul
call tpemce.bat req testreq2.pem
if errorlevel 1 goto err
copy ..\test\testrsa.pem >nul
call tpemce.bat rsa testrsa.pem
if errorlevel 1 goto err
copy ..\test\testx509.pem >nul
call tpemce.bat x509 testx509.pem
if errorlevel 1 goto err
copy ..\test\v3-cert1.pem >nul
call tpemce.bat x509 v3-cert1.pem
if errorlevel 1 goto err
copy ..\test\v3-cert1.pem >nul
call tpemce.bat x509 v3-cert1.pem
if errorlevel 1 goto err
copy ..\test\testsid.pem >nul
call tpemce.bat sess_id testsid.pem
if errorlevel 1 goto err
echo OK
del %tmp1% >nul 2>&1
:err

View File

@@ -1,98 +0,0 @@
@echo off
rem set ssleay=..\out\ssleay
set ssleay=%1
set reqcmd=%ssleay% req
set x509cmd=%ssleay% x509 -sha1
set verifycmd=%ssleay% verify
set CAkey=keyCA.ss
set CAcert=certCA.ss
set CAserial=certCA.srl
set CAreq=reqCA.ss
set CAconf=..\test\CAss.cnf
set CAreq2=req2CA.ss
set Uconf=..\test\Uss.cnf
set Ukey=keyU.ss
set Ureq=reqU.ss
set Ucert=certU.ss
echo make a certificate request using 'req'
%reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new
if errorlevel 1 goto e_req
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
if errorlevel 1 goto e_x509
echo --
echo convert a certificate into a certificate request using 'x509'
%x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% >err.ss
if errorlevel 1 goto e_x509_2
%reqcmd% -verify -in %CAreq% -noout
if errorlevel 1 goto e_vrfy_1
%reqcmd% -verify -in %CAreq2% -noout
if errorlevel 1 goto e_vrfy_2
%verifycmd% -CAfile %CAcert% %CAcert%
if errorlevel 1 goto e_vrfy_3
echo --
echo make another certificate request using 'req'
%reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new >err.ss
if errorlevel 1 goto e_req_gen
echo --
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%
if errorlevel 1 goto e_x_sign
%verifycmd% -CAfile %CAcert% %Ucert%
echo --
echo Certificate details
%x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert%
echo Everything appeared to work
echo --
echo The generated CA certificate is %CAcert%
echo The generated CA private key is %CAkey%
echo The current CA signing serial number is in %CAserial%
echo The generated user certificate is %Ucert%
echo The generated user private key is %Ukey%
echo --
del err.ss
goto end
:e_req
echo error using 'req' to generate a certificate request
goto end
:e_x509
echo error using 'x509' to self sign a certificate request
goto end
:e_x509_2
echo error using 'x509' convert a certificate to a certificate request
goto end
:e_vrfy_1
echo first generated request is invalid
goto end
:e_vrfy_2
echo second generated request is invalid
goto end
:e_vrfy_3
echo first generated cert is invalid
goto end
:e_req_gen
echo error using 'req' to generate a certificate request
goto end
:e_x_sign
echo error using 'x509' to sign a certificate request
goto end
:end

View File

@@ -1,104 +0,0 @@
rem set ssleay=..\out\ssleay
set ssleay=%1
set reqcmd=%ssleay% req
set x509cmd=%ssleay% x509
set verifycmd=%ssleay% verify
set CAkey=\OpenSSL\keyCA.ss
set CAcert=\OpenSSL\certCA.ss
set CAserial=\OpenSSL\certCA.srl
set CAreq=\OpenSSL\reqCA.ss
cecopy ..\test\CAss.cnf CE:\OpenSSL
set CAconf=\OpenSSL\CAss.cnf
set CAreq2=\OpenSSL\req2CA.ss
cecopy ..\test\Uss.cnf CE:\OpenSSL
set Uconf=\OpenSSL\Uss.cnf
set Ukey=\OpenSSL\keyU.ss
set Ureq=\OpenSSL\reqU.ss
set Ucert=\OpenSSL\certU.ss
echo make a certificate request using 'req'
cerun CE:\OpenSSL\%reqcmd% -config %CAconf% -out %CAreq% -keyout %CAkey% -new
if errorlevel 1 goto e_req
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"
if errorlevel 1 goto e_x509
echo --
echo convert a certificate into a certificate request using 'x509'
cerun CE:\OpenSSL\%x509cmd% -in %CAcert% -x509toreq -signkey %CAkey% -out %CAreq2% "> \OpenSSL\err.ss"
if errorlevel 1 goto e_x509_2
cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq% -noout
if errorlevel 1 goto e_vrfy_1
cerun CE:\OpenSSL\%reqcmd% -verify -in %CAreq2% -noout
if errorlevel 1 goto e_vrfy_2
cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %CAcert%
if errorlevel 1 goto e_vrfy_3
echo --
echo make another certificate request using 'req'
cerun CE:\OpenSSL\%reqcmd% -config %Uconf% -out %Ureq% -keyout %Ukey% -new "> \OpenSSL\err.ss"
if errorlevel 1 goto e_req_gen
echo --
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%
if errorlevel 1 goto e_x_sign
cerun CE:\OpenSSL\%verifycmd% -CAfile %CAcert% %Ucert%
echo --
echo Certificate details
cerun CE:\OpenSSL\%x509cmd% -subject -issuer -startdate -enddate -noout -in %Ucert%
cecopy CE:%CAcert% .
cecopy CE:%CAkey% .
cecopy CE:%CAserial% .
cecopy CE:%Ucert% .
cecopy CE:%Ukey% .
echo Everything appeared to work
echo --
echo The generated CA certificate is %CAcert%
echo The generated CA private key is %CAkey%
echo The current CA signing serial number is in %CAserial%
echo The generated user certificate is %Ucert%
echo The generated user private key is %Ukey%
echo --
cedel CE:\OpenSSL\err.ss
goto end
:e_req
echo error using 'req' to generate a certificate request
goto end
:e_x509
echo error using 'x509' to self sign a certificate request
goto end
:e_x509_2
echo error using 'x509' convert a certificate to a certificate request
goto end
:e_vrfy_1
echo first generated request is invalid
goto end
:e_vrfy_2
echo second generated request is invalid
goto end
:e_vrfy_3
echo first generated cert is invalid
goto end
:e_req_gen
echo error using 'req' to generate a certificate request
goto end
:e_x_sign
echo error using 'x509' to sign a certificate request
goto end
:end

View File

@@ -1,6 +0,0 @@
rem called by testpem
echo test %1 %2
%ssleay% %1 -in %2 -out %tmp1%
%cmp% %2 %tmp1%

View File

@@ -1,8 +0,0 @@
rem called by testpemce
echo test %1 %2
cecopy %2 CE:\OpenSSL
cerun CE:\OpenSSL\%ssleay% %1 -in \OpenSSL\%2 -out \OpenSSL\%tmp1%
del %tmp1% >nul 2>&1
cecopy CE:\OpenSSL\%tmp1% .
%cmp% %2 %tmp1%

View File

@@ -1,5 +1,11 @@
#!/usr/bin/env perl
#! /usr/bin/env perl
# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
# pull APPLINK_MAX value from applink.c...
$applink_c=$0;
$applink_c=~s|[^/\\]+$||g;

View File

@@ -1,4 +1,13 @@
#!/usr/bin/env perl
#! /usr/bin/env perl
# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
$output = pop;
open STDOUT,">$output";
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}.");
@@ -48,3 +57,5 @@ for ($i=1;$i<=$N;$i++) { print " data8 \@fptr(lazy$i#)\n"; }
print <<___;
.size OPENSSL_UplinkTable,.-OPENSSL_UplinkTable#
___
close STDOUT;

View File

@@ -1,4 +1,10 @@
#!/usr/bin/env perl
#! /usr/bin/env perl
# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC, "${dir}.", "${dir}../crypto/perlasm");
@@ -6,6 +12,9 @@ require "x86asm.pl";
require "uplink-common.pl";
$output = pop;
open STDOUT,">$output";
&asm_init($ARGV[0],"uplink-x86");
&external_label("OPENSSL_Uplink");
@@ -14,11 +23,11 @@ require "uplink-common.pl";
for ($i=1;$i<=$N;$i++) {
&function_begin_B("_\$lazy${i}");
&lea ("eax",&DWP(&label("OPENSSL_UplinkTable")));
&push ("eax");
&push ($i);
&push ("eax");
&call (&label("OPENSSL_Uplink"));
&add ("esp",8);
&pop ("eax");
&add ("esp",4);
&jmp_ptr(&DWP(4*$i,"eax"));
&function_end_B("_\$lazy${i}");
}
@@ -31,3 +40,5 @@ for ($i=1;$i<=$N;$i++) {
&data_word(&label("_\$lazy${i}"));
}
&asm_finish();
close OUTPUT;

View File

@@ -1,8 +1,14 @@
#!/usr/bin/env perl
#! /usr/bin/env perl
# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
$output=shift;
$output=pop;
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
open OUT,"| \"$^X\" ${dir}../crypto/perlasm/x86_64-xlate.pl $output";
open OUT,"| \"$^X\" \"${dir}../crypto/perlasm/x86_64-xlate.pl\" \"$output\"";
*STDOUT=*OUT;
push(@INC,"${dir}.");

View File

@@ -1,3 +1,12 @@
/*
* Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
# define UNICODE
#endif
@@ -90,7 +99,7 @@ void OPENSSL_Uplink(volatile void **table, int index)
table[index] = func;
}
#if defined(_MSC_VER) && defined(_M_IX86) && !defined(OPENSSL_NO_INLINE_ASM)
#if defined(_MSC_VER) && defined(_M_IX86)
# define LAZY(i) \
__declspec(naked) static void lazy##i (void) { \
_asm push i \

View File

@@ -1,3 +1,12 @@
/*
* Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#define APPMACROS_ONLY
#include "applink.c"

View File

@@ -1,204 +0,0 @@
#!/usr/bin/env perl
#
# For Microsoft CL this is implemented as inline assembler. So that
# even though this script can generate even Win32 code, we'll be
# using it primarily to generate Win64 modules. Both IA-64 and AMD64
# are supported...
# pull APPLINK_MAX value from applink.c...
$applink_c=$0;
$applink_c=~s|[^/\\]+$||g;
$applink_c.="applink.c";
open(INPUT,$applink_c) || die "can't open $applink_c: $!";
@max=grep {/APPLINK_MAX\s+(\d+)/} <INPUT>;
close(INPUT);
($#max==0) or die "can't find APPLINK_MAX in $applink_c";
$max[0]=~/APPLINK_MAX\s+(\d+)/;
$N=$1; # number of entries in OPENSSL_UplinkTable not including
# OPENSSL_UplinkTable[0], which contains this value...
# Idea is to fill the OPENSSL_UplinkTable with pointers to stubs
# which invoke 'void OPENSSL_Uplink (ULONG_PTR *table,int index)';
# and then dereference themselves. Latter shall result in endless
# loop *unless* OPENSSL_Uplink does not replace 'table[index]' with
# something else, e.g. as 'table[index]=unimplemented;'...
$arg = shift;
#( defined shift || open STDOUT,">$arg" ) || die "can't open $arg: $!";
if ($arg =~ /win32n/) { ia32nasm(); }
elsif ($arg =~ /win32/) { ia32masm(); }
elsif ($arg =~ /coff/) { ia32gas(); }
elsif ($arg =~ /win64i/ or $arg =~ /ia64/) { ia64ias(); }
elsif ($arg =~ /win64a/ or $arg =~ /amd64/) { amd64masm(); }
else { die "nonsense $arg"; }
sub ia32gas() {
print <<___;
.text
___
for ($i=1;$i<=$N;$i++) {
print <<___;
.def .Lazy$i; .scl 3; .type 32; .endef
.align 4
.Lazy$i:
pushl \$$i
pushl \$_OPENSSL_UplinkTable
call _OPENSSL_Uplink
addl \$8,%esp
jmp *(_OPENSSL_UplinkTable+4*$i)
___
}
print <<___;
.data
.align 4
.globl _OPENSSL_UplinkTable
_OPENSSL_UplinkTable:
.long $N
___
for ($i=1;$i<=$N;$i++) { print " .long .Lazy$i\n"; }
}
sub ia32masm() {
print <<___;
.386P
.model FLAT
_DATA SEGMENT
PUBLIC _OPENSSL_UplinkTable
_OPENSSL_UplinkTable DD $N ; amount of following entries
___
for ($i=1;$i<=$N;$i++) { print " DD FLAT:\$lazy$i\n"; }
print <<___;
_DATA ENDS
_TEXT SEGMENT
EXTRN _OPENSSL_Uplink:NEAR
___
for ($i=1;$i<=$N;$i++) {
print <<___;
ALIGN 4
\$lazy$i PROC NEAR
push $i
push OFFSET FLAT:_OPENSSL_UplinkTable
call _OPENSSL_Uplink
add esp,8
jmp DWORD PTR _OPENSSL_UplinkTable+4*$i
\$lazy$i ENDP
___
}
print <<___;
ALIGN 4
_TEXT ENDS
END
___
}
sub ia32nasm() {
print <<___;
SEGMENT .data
GLOBAL _OPENSSL_UplinkTable
_OPENSSL_UplinkTable DD $N ; amount of following entries
___
for ($i=1;$i<=$N;$i++) { print " DD \$lazy$i\n"; }
print <<___;
SEGMENT .text
EXTERN _OPENSSL_Uplink
___
for ($i=1;$i<=$N;$i++) {
print <<___;
ALIGN 4
\$lazy$i:
push $i
push _OPENSSL_UplinkTable
call _OPENSSL_Uplink
add esp,8
jmp [_OPENSSL_UplinkTable+4*$i]
___
}
print <<___;
ALIGN 4
END
___
}
sub ia64ias () {
local $V=8; # max number of args uplink functions may accept...
print <<___;
.data
.global OPENSSL_UplinkTable#
OPENSSL_UplinkTable: data8 $N // amount of following entries
___
for ($i=1;$i<=$N;$i++) { print " data8 \@fptr(lazy$i#)\n"; }
print <<___;
.size OPENSSL_UplinkTable,.-OPENSSL_UplinkTable#
.text
.global OPENSSL_Uplink#
.type OPENSSL_Uplink#,\@function
___
for ($i=1;$i<=$N;$i++) {
print <<___;
.proc lazy$i
lazy$i:
{ .mii; alloc loc0=ar.pfs,$V,3,2,0
mov loc1=b0
addl loc2=\@ltoff(OPENSSL_UplinkTable#),gp };;
{ .mmi; ld8 out0=[loc2]
mov out1=$i };;
{ .mib; adds loc2=8*$i,out0
br.call.sptk.many b0=OPENSSL_Uplink# };;
{ .mmi; ld8 r31=[loc2];;
ld8 r30=[r31],8 };;
{ .mii; ld8 gp=[r31]
mov b6=r30
mov b0=loc1 };;
{ .mib; mov ar.pfs=loc0
br.many b6 };;
.endp lazy$i#
___
}
}
sub amd64masm() {
print <<___;
_DATA SEGMENT
PUBLIC OPENSSL_UplinkTable
OPENSSL_UplinkTable DQ $N
___
for ($i=1;$i<=$N;$i++) { print " DQ \$lazy$i\n"; }
print <<___;
_DATA ENDS
_TEXT SEGMENT
EXTERN OPENSSL_Uplink:PROC
___
for ($i=1;$i<=$N;$i++) {
print <<___;
ALIGN 4
\$lazy$i PROC
push r9
push r8
push rdx
push rcx
sub rsp,40
lea rcx,OFFSET OPENSSL_UplinkTable
mov rdx,$i
call OPENSSL_Uplink
add rsp,40
pop rcx
pop rdx
pop r8
pop r9
jmp QWORD PTR OPENSSL_UplinkTable+8*$i
\$lazy$i ENDP
___
}
print <<___;
_TEXT ENDS
END
___
}

View File

@@ -1,47 +0,0 @@
#include <winver.h>
LANGUAGE 0x09,0x01
1 VERSIONINFO
FILEVERSION 1,2,1,0
PRODUCTVERSION 1,2,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x01L
#else
FILEFLAGS 0x00L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
// Required:
VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\0"
VALUE "FileDescription", "OpenSSL Shared Library\0"
VALUE "FileVersion", "1.0.2d-fips\0"
#if defined(CRYPTO)
VALUE "InternalName", "libeay32\0"
VALUE "OriginalFilename", "libeay32.dll\0"
#elif defined(SSL)
VALUE "InternalName", "ssleay32\0"
VALUE "OriginalFilename", "ssleay32.dll\0"
#endif
VALUE "ProductName", "The OpenSSL Toolkit\0"
VALUE "ProductVersion", "1.0.2d-fips\0"
// Optional:
//VALUE "Comments", "\0"
VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\0"
//VALUE "LegalTrademarks", "\0"
//VALUE "PrivateBuild", "\0"
//VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 0x4b0
END
END

View File

@@ -1,57 +0,0 @@
@echo off
echo Generating x86 assember
echo Bignum
cd crypto\bn\asm
perl x86.pl win32n > bn-win32.asm
cd ..\..\..
echo DES
cd crypto\des\asm
perl des-586.pl win32n > d-win32.asm
cd ..\..\..
echo "crypt(3)"
cd crypto\des\asm
perl crypt586.pl win32n > y-win32.asm
cd ..\..\..
echo Blowfish
cd crypto\bf\asm
perl bf-586.pl win32n > b-win32.asm
cd ..\..\..
echo CAST5
cd crypto\cast\asm
perl cast-586.pl win32n > c-win32.asm
cd ..\..\..
echo RC4
cd crypto\rc4\asm
perl rc4-586.pl win32n > r4-win32.asm
cd ..\..\..
echo MD5
cd crypto\md5\asm
perl md5-586.pl win32n > m5-win32.asm
cd ..\..\..
echo SHA1
cd crypto\sha\asm
perl sha1-586.pl win32n > s1-win32.asm
cd ..\..\..
echo RIPEMD160
cd crypto\ripemd\asm
perl rmd-586.pl win32n > rm-win32.asm
cd ..\..\..
echo RC5\32
cd crypto\rc5\asm
perl rc5-586.pl win32n > r5-win32.asm
cd ..\..\..
echo on