This commit was generated by cvs2svn to compensate for changes in r142425,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
eb8fd19957
@ -2,6 +2,30 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.7d and 0.9.7e [25 Oct 2004]
|
||||
|
||||
*) Avoid a race condition when CRLs are checked in a multi threaded
|
||||
environment. This would happen due to the reordering of the revoked
|
||||
entries during signature checking and serial number lookup. Now the
|
||||
encoding is cached and the serial number sort performed under a lock.
|
||||
Add new STACK function sk_is_sorted().
|
||||
[Steve Henson]
|
||||
|
||||
*) Add Delta CRL to the extension code.
|
||||
[Steve Henson]
|
||||
|
||||
*) Various fixes to s3_pkt.c so alerts are sent properly.
|
||||
[David Holmes <d.holmes@f5.com>]
|
||||
|
||||
*) Reduce the chances of duplicate issuer name and serial numbers (in
|
||||
violation of RFC3280) using the OpenSSL certificate creation utilities.
|
||||
This is done by creating a random 64 bit value for the initial serial
|
||||
number when a serial number file is created or when a self signed
|
||||
certificate is created using 'openssl req -x509'. The initial serial
|
||||
number file is created using 'openssl x509 -next_serial' in CA.pl
|
||||
rather than being initialized to 1.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.7c and 0.9.7d [17 Mar 2004]
|
||||
|
||||
*) Fix null-pointer assignment in do_change_cipher_spec() revealed
|
||||
@ -2037,6 +2061,20 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
|
||||
*) Clean old EAY MD5 hack from e_os.h.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.6l and 0.9.6m [17 Mar 2004]
|
||||
|
||||
*) Fix null-pointer assignment in do_change_cipher_spec() revealed
|
||||
by using the Codenomicon TLS Test Tool (CAN-2004-0079)
|
||||
[Joe Orton, Steve Henson]
|
||||
|
||||
Changes between 0.9.6k and 0.9.6l [04 Nov 2003]
|
||||
|
||||
*) Fix additional bug revealed by the NISCC test suite:
|
||||
|
||||
Stop bug triggering large recursion when presented with
|
||||
certain ASN.1 tags (CAN-2003-0851)
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.6j and 0.9.6k [30 Sep 2003]
|
||||
|
||||
*) Fix various bugs revealed by running the NISCC test suite:
|
||||
|
@ -10,7 +10,7 @@ use strict;
|
||||
|
||||
# see INSTALL for instructions.
|
||||
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [[no-]fips] [debug] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
|
||||
# Options:
|
||||
#
|
||||
@ -135,15 +135,16 @@ my %table=(
|
||||
# Our development configs
|
||||
"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
|
||||
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
|
||||
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
||||
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
||||
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
|
||||
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::::",
|
||||
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
|
||||
"debug-ben-fips-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_FIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
|
||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@ -155,6 +156,12 @@ my %table=(
|
||||
"gcc", "gcc:-O3::(unknown):::BN_LLONG:::",
|
||||
"cc", "cc:-O::(unknown)::::::",
|
||||
|
||||
####VOS Configurations
|
||||
"vos-gcc","gcc:-b hppa1.1-stratus-vos -O3 -Wall -Wuninitialized -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:",
|
||||
"debug-vos-gcc","gcc:-b hppa1.1-stratus-vos -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:",
|
||||
"vos-vcc","vcc:-b i386-stratus-vos -O3 -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map::::::::::::::.so:",
|
||||
"debug-vos-vcc","vcc:-b i386-stratus-vos -O0 -g -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map::::::::::::::.so:",
|
||||
|
||||
#### Solaris x86 with GNU C setups
|
||||
# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it
|
||||
# here because whenever GNU C instantiates an assembler template it
|
||||
@ -382,7 +389,7 @@ my %table=(
|
||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@ -415,7 +422,7 @@ my %table=(
|
||||
"qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
|
||||
# Linux on ARM
|
||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# SCO/Caldera targets.
|
||||
#
|
||||
@ -609,7 +616,7 @@ my $threads=0;
|
||||
my $no_asm=0;
|
||||
my $no_dso=0;
|
||||
my @skip=();
|
||||
my $Makefile="Makefile.ssl";
|
||||
my $Makefile="Makefile";
|
||||
my $des_locl="crypto/des/des_locl.h";
|
||||
my $des ="crypto/des/des.h";
|
||||
my $bn ="crypto/bn/bn.h";
|
||||
@ -621,6 +628,7 @@ my $rc2 ="crypto/rc2/rc2.h";
|
||||
my $bf ="crypto/bf/bf_locl.h";
|
||||
my $bn_asm ="bn_asm.o";
|
||||
my $des_enc="des_enc.o fcrypt_b.o";
|
||||
my $fips_des_enc="fips_des_enc.o";
|
||||
my $bf_enc ="bf_enc.o";
|
||||
my $cast_enc="c_enc.o";
|
||||
my $rc4_enc="rc4_enc.o";
|
||||
@ -631,6 +639,8 @@ my $rmd160_obj="";
|
||||
my $processor="";
|
||||
my $default_ranlib;
|
||||
my $perl;
|
||||
my $fips=0;
|
||||
my $debug=0;
|
||||
|
||||
my $no_ssl2=0;
|
||||
my $no_ssl3=0;
|
||||
@ -640,10 +650,6 @@ my $no_sha=0;
|
||||
my $no_rsa=0;
|
||||
my $no_dh=0;
|
||||
|
||||
$default_ranlib= &which("ranlib") or $default_ranlib="true";
|
||||
$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
|
||||
or $perl="perl";
|
||||
|
||||
&usage if ($#ARGV < 0);
|
||||
|
||||
my $flags;
|
||||
@ -739,6 +745,8 @@ PROCESS_ARGS:
|
||||
{ $no_ssl3 = 1; }
|
||||
elsif (/^no-tls1?$/)
|
||||
{ $no_tls1 = 1; }
|
||||
elsif (/^no-fips$/)
|
||||
{ $fips = 0; }
|
||||
elsif (/^no-(.+)$/)
|
||||
{
|
||||
my $algo=$1;
|
||||
@ -804,6 +812,14 @@ PROCESS_ARGS:
|
||||
}
|
||||
elsif (/^386$/)
|
||||
{ $processor=386; }
|
||||
elsif (/^fips$/)
|
||||
{
|
||||
$fips=1;
|
||||
}
|
||||
elsif (/^debug$/)
|
||||
{
|
||||
$debug=1;
|
||||
}
|
||||
elsif (/^rsaref$/)
|
||||
{
|
||||
# No RSAref support any more since it's not needed.
|
||||
@ -922,9 +938,14 @@ my $IsWindows=scalar grep /^$target$/,@WinTargets;
|
||||
|
||||
$exe_ext=".exe" if ($target eq "Cygwin");
|
||||
$exe_ext=".exe" if ($target eq "DJGPP");
|
||||
$exe_ext=".pm" if ($target eq "vos-gcc" or $target eq "debug-vos-gcc" or $target eq "vos-vcc" or $target eq "debug-vos-vcc");
|
||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
|
||||
$prefix=$openssldir if $prefix eq "";
|
||||
|
||||
$default_ranlib= &which("ranlib") or $default_ranlib="true";
|
||||
$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
|
||||
or $perl="perl";
|
||||
|
||||
chop $openssldir if $openssldir =~ /\/$/;
|
||||
chop $prefix if $prefix =~ /\/$/;
|
||||
|
||||
@ -1139,12 +1160,20 @@ if ($ranlib eq "")
|
||||
|
||||
$bn_obj = $bn_asm unless $bn_obj ne "";
|
||||
|
||||
$des_obj=$des_enc unless ($des_obj =~ /\.o$/);
|
||||
if ($fips)
|
||||
{
|
||||
$des_obj=$sha1_obj="";
|
||||
$openssl_other_defines.="#define OPENSSL_FIPS\n";
|
||||
}
|
||||
$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/);
|
||||
my $fips_des_obj='asm/fips-dx86-elf.o';
|
||||
$fips_des_obj=$fips_des_enc unless $processor eq '386';
|
||||
my $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386';
|
||||
$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
|
||||
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
|
||||
$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
|
||||
$rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/);
|
||||
if ($sha1_obj =~ /\.o$/)
|
||||
if ($sha1_obj =~ /\.o$/ || $fips_sha1_obj =~ /\.o$/)
|
||||
{
|
||||
# $sha1_obj=$sha1_enc;
|
||||
$cflags.=" -DSHA1_ASM";
|
||||
@ -1160,6 +1189,12 @@ if ($rmd160_obj =~ /\.o$/)
|
||||
$cflags.=" -DRMD160_ASM";
|
||||
}
|
||||
|
||||
if ($debug)
|
||||
{
|
||||
$cflags.=" -g";
|
||||
$cflags=~s/-fomit-frame-pointer//;
|
||||
}
|
||||
|
||||
# "Stringify" the C flags string. This permits it to be made part of a string
|
||||
# and works as well on command lines.
|
||||
$cflags =~ s/([\\\"])/\\\1/g;
|
||||
@ -1232,12 +1267,14 @@ while (<IN>)
|
||||
s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
|
||||
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
|
||||
s/^DES_ENC=.*$/DES_ENC= $des_obj/;
|
||||
s/^FIPS_DES_ENC=.*$/FIPS_DES_ENC= $fips_des_obj/;
|
||||
s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
|
||||
s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
|
||||
s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
|
||||
s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
|
||||
s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
|
||||
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
|
||||
s/^FIPS_SHA1_ASM_OBJ=.*$/FIPS_SHA1_ASM_OBJ= $fips_sha1_obj/;
|
||||
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
@ -1470,7 +1507,7 @@ if($IsWindows) {
|
||||
printf OUT <<EOF;
|
||||
#ifndef MK1MF_BUILD
|
||||
/* auto-generated by Configure for crypto/cversion.c:
|
||||
* for Unix builds, crypto/Makefile.ssl generates functional definitions;
|
||||
* for Unix builds, crypto/Makefile generates functional definitions;
|
||||
* Windows builds (and other mk1mf builds) compile cversion.c with
|
||||
* -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
|
||||
#error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
|
||||
@ -1478,7 +1515,7 @@ if($IsWindows) {
|
||||
EOF
|
||||
close(OUT);
|
||||
} else {
|
||||
my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
|
||||
my $make_command = "make PERL=\'$perl\'";
|
||||
my $make_targets = "";
|
||||
$make_targets .= " links" if $symlink;
|
||||
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
||||
@ -1569,10 +1606,10 @@ sub which
|
||||
my $path;
|
||||
foreach $path (split /:/, $ENV{PATH})
|
||||
{
|
||||
if (-f "$path/$name" and -x _)
|
||||
if (-f "$path/$name$exe_ext" and -x _)
|
||||
{
|
||||
return "$path/$name" unless ($name eq "perl" and
|
||||
system("$path/$name -e " . '\'exit($]<5.0);\''));
|
||||
return "$path/$name$exe_ext" unless ($name eq "perl" and
|
||||
system("$path/$name$exe_ext -e " . '\'exit($]<5.0);\''));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Is OpenSSL thread-safe?
|
||||
* I've compiled a program under Windows and it crashes: why?
|
||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
|
||||
* OpenSSL uses DER but I need BER format: does OpenSSL support BER?
|
||||
* I've tried using <M_some_evil_pkcs12_macro> and I get errors why?
|
||||
* I've called <some function> and it fails, why?
|
||||
* I just get a load of numbers for the error output, what do they mean?
|
||||
@ -60,6 +61,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
||||
* Why doesn't my server application receive a client certificate?
|
||||
* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier?
|
||||
* I think I've detected a memory leak, is this a bug?
|
||||
|
||||
===============================================================================
|
||||
|
||||
@ -68,7 +70,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.7d was released on March 17, 2004.
|
||||
OpenSSL 0.9.7e was released on October 25, 2004.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@ -460,7 +462,7 @@ get the best result from OpenSSL. A bit more complicated solution is the
|
||||
following:
|
||||
|
||||
----- snip:start -----
|
||||
make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
|
||||
make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile | \
|
||||
sed -e 's/ -O[0-9] / -O0 /'`"
|
||||
rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
|
||||
make
|
||||
@ -683,6 +685,20 @@ and attempts to free the buffer will have unpredictable results
|
||||
because it no longer points to the same address.
|
||||
|
||||
|
||||
* OpenSSL uses DER but I need BER format: does OpenSSL support BER?
|
||||
|
||||
The short answer is yes, because DER is a special case of BER and OpenSSL
|
||||
ASN1 decoders can process BER.
|
||||
|
||||
The longer answer is that ASN1 structures can be encoded in a number of
|
||||
different ways. One set of ways is the Basic Encoding Rules (BER) with various
|
||||
permissible encodings. A restriction of BER is the Distinguished Encoding
|
||||
Rules (DER): these uniquely specify how a given structure is encoded.
|
||||
|
||||
Therefore, because DER is a special case of BER, DER is an acceptable encoding
|
||||
for BER.
|
||||
|
||||
|
||||
* I've tried using <M_some_evil_pkcs12_macro> and I get errors why?
|
||||
|
||||
This usually happens when you try compiling something using the PKCS#12
|
||||
@ -765,5 +781,17 @@ The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier.
|
||||
Change your code to use the new name when compiling against OpenSSL 0.9.7.
|
||||
|
||||
|
||||
* I think I've detected a memory leak, is this a bug?
|
||||
|
||||
In most cases the cause of an apparent memory leak is an OpenSSL internal table
|
||||
that is allocated when an application starts up. Since such tables do not grow
|
||||
in size over time they are harmless.
|
||||
|
||||
These internal tables can be freed up when an application closes using various
|
||||
functions. Currently these include: EVP_cleanup(), ERR_remove_state(),
|
||||
ERR_free_strings(), ENGINE_cleanup(), CONF_modules_unload() and
|
||||
CRYPTO_cleanup_all_ex_data().
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
generic configurations "cc" or "gcc" should usually work on 32 bit
|
||||
systems.
|
||||
|
||||
Configure creates the file Makefile.ssl from Makefile.org and
|
||||
Configure creates the file Makefile from Makefile.org and
|
||||
defines various macros in crypto/opensslconf.h (generated from
|
||||
crypto/opensslconf.h.in).
|
||||
|
||||
@ -159,7 +159,7 @@
|
||||
the failure that isn't a problem in OpenSSL itself (like a missing
|
||||
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
||||
try removing any compiler optimization flags from the CFLAG line
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
in Makefile and run "make clean; make". Please send a bug
|
||||
report to <openssl-bugs@openssl.org>, including the output of
|
||||
"make report" in order to be added to the request tracker at
|
||||
http://www.openssl.org/support/rt2.html.
|
||||
|
922
crypto/openssl/Makefile
Normal file
922
crypto/openssl/Makefile
Normal file
@ -0,0 +1,922 @@
|
||||
### Generated automatically from Makefile.org by Configure.
|
||||
|
||||
##
|
||||
## Makefile for OpenSSL
|
||||
##
|
||||
|
||||
VERSION=0.9.7e
|
||||
MAJOR=0
|
||||
MINOR=9.7
|
||||
SHLIB_VERSION_NUMBER=0.9.7
|
||||
SHLIB_VERSION_HISTORY=
|
||||
SHLIB_MAJOR=0
|
||||
SHLIB_MINOR=9.7
|
||||
SHLIB_EXT=
|
||||
PLATFORM=dist
|
||||
OPTIONS= no-krb5
|
||||
CONFIGURE_ARGS=dist
|
||||
SHLIB_TARGET=
|
||||
|
||||
# HERE indicates where this Makefile lives. This can be used to indicate
|
||||
# where sub-Makefiles are expected to be. Currently has very limited usage,
|
||||
# and should probably not be bothered with at all.
|
||||
HERE=.
|
||||
|
||||
# INSTALL_PREFIX is for package builders so that they can configure
|
||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
||||
# Normally it is left empty.
|
||||
INSTALL_PREFIX=
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
|
||||
# Do not edit this manually. Use Configure --openssldir=DIR do change this!
|
||||
OPENSSLDIR=/usr/local/ssl
|
||||
|
||||
# NO_IDEA - Define to build without the IDEA algorithm
|
||||
# NO_RC4 - Define to build without the RC4 algorithm
|
||||
# NO_RC2 - Define to build without the RC2 algorithm
|
||||
# THREADS - Define when building with threads, you will probably also need any
|
||||
# system defines as well, i.e. _REENTERANT for Solaris 2.[34]
|
||||
# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
|
||||
# TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
|
||||
# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
|
||||
# DEVRANDOM - Give this the value of the 'random device' if your OS supports
|
||||
# one. 32 bytes will be read from this when the random
|
||||
# number generator is initalised.
|
||||
# SSL_FORBID_ENULL - define if you want the server to be not able to use the
|
||||
# NULL encryption ciphers.
|
||||
#
|
||||
# LOCK_DEBUG - turns on lots of lock debug output :-)
|
||||
# REF_CHECK - turn on some xyz_free() assertions.
|
||||
# REF_PRINT - prints some stuff on structure free.
|
||||
# CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
|
||||
# MFUNC - Make all Malloc/Free/Realloc calls call
|
||||
# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
|
||||
# call application defined callbacks via CRYPTO_set_mem_functions()
|
||||
# MD5_ASM needs to be defined to use the x86 assembler for MD5
|
||||
# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
|
||||
# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
|
||||
# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
|
||||
# equal 4.
|
||||
# PKCS1_CHECK - pkcs1 tests.
|
||||
|
||||
CC= cc
|
||||
#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
CFLAG= -DOPENSSL_NO_KRB5 -O
|
||||
DEPFLAG=
|
||||
PEX_LIBS=
|
||||
EX_LIBS=
|
||||
EXE_EXT=
|
||||
ARFLAGS=
|
||||
AR=ar $(ARFLAGS) r
|
||||
RANLIB= /usr/bin/ranlib
|
||||
PERL= /usr/bin/perl
|
||||
TAR= tar
|
||||
TARFLAGS= --no-recursion
|
||||
MAKEDEPPROG=makedepend
|
||||
|
||||
# We let the C compiler driver to take care of .s files. This is done in
|
||||
# order to be excused from maintaining a separate set of architecture
|
||||
# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
|
||||
# gcc, then the driver will automatically translate it to -xarch=v8plus
|
||||
# and pass it down to assembler.
|
||||
AS=$(CC) -c
|
||||
ASFLAG=$(CFLAG)
|
||||
|
||||
# Set BN_ASM to bn_asm.o if you want to use the C version
|
||||
BN_ASM= bn_asm.o
|
||||
#BN_ASM= bn_asm.o
|
||||
#BN_ASM= asm/bn86-elf.o # elf, linux-elf
|
||||
#BN_ASM= asm/bn86-sol.o # solaris
|
||||
#BN_ASM= asm/bn86-out.o # a.out, FreeBSD
|
||||
#BN_ASM= asm/bn86bsdi.o # bsdi
|
||||
#BN_ASM= asm/alpha.o # DEC Alpha
|
||||
#BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC
|
||||
#BN_ASM= asm/r3000.o # SGI MIPS cpu
|
||||
#BN_ASM= asm/sparc.o # Sun solaris/SunOS
|
||||
#BN_ASM= asm/bn-win32.o # Windows 95/NT
|
||||
#BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
|
||||
#BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
|
||||
|
||||
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
||||
# the 80386.
|
||||
PROCESSOR=
|
||||
|
||||
# Set DES_ENC to des_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
FIPS_DES_ENC= fips_des_enc.o
|
||||
DES_ENC= des_enc.o fcrypt_b.o
|
||||
#DES_ENC= des_enc.o fcrypt_b.o # C
|
||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
|
||||
#DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
|
||||
#DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
|
||||
#DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
|
||||
|
||||
# Set BF_ENC to bf_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
BF_ENC= bf_enc.o
|
||||
#BF_ENC= bf_enc.o
|
||||
#BF_ENC= asm/bx86-elf.o # elf
|
||||
#BF_ENC= asm/bx86-sol.o # solaris
|
||||
#BF_ENC= asm/bx86-out.o # a.out, FreeBSD
|
||||
#BF_ENC= asm/bx86bsdi.o # bsdi
|
||||
|
||||
# Set CAST_ENC to c_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
CAST_ENC= c_enc.o
|
||||
#CAST_ENC= c_enc.o
|
||||
#CAST_ENC= asm/cx86-elf.o # elf
|
||||
#CAST_ENC= asm/cx86-sol.o # solaris
|
||||
#CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
|
||||
#CAST_ENC= asm/cx86bsdi.o # bsdi
|
||||
|
||||
# Set RC4_ENC to rc4_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
RC4_ENC= rc4_enc.o
|
||||
#RC4_ENC= rc4_enc.o
|
||||
#RC4_ENC= asm/rx86-elf.o # elf
|
||||
#RC4_ENC= asm/rx86-sol.o # solaris
|
||||
#RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
|
||||
#RC4_ENC= asm/rx86bsdi.o # bsdi
|
||||
|
||||
# Set RC5_ENC to rc5_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
RC5_ENC= rc5_enc.o
|
||||
#RC5_ENC= rc5_enc.o
|
||||
#RC5_ENC= asm/r586-elf.o # elf
|
||||
#RC5_ENC= asm/r586-sol.o # solaris
|
||||
#RC5_ENC= asm/r586-out.o # a.out, FreeBSD
|
||||
#RC5_ENC= asm/r586bsdi.o # bsdi
|
||||
|
||||
# Also need MD5_ASM defined
|
||||
MD5_ASM_OBJ=
|
||||
#MD5_ASM_OBJ= asm/mx86-elf.o # elf
|
||||
#MD5_ASM_OBJ= asm/mx86-sol.o # solaris
|
||||
#MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
|
||||
#MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
|
||||
|
||||
# Also need SHA1_ASM defined
|
||||
SHA1_ASM_OBJ=
|
||||
FIPS_SHA1_ASM_OBJ=
|
||||
#SHA1_ASM_OBJ= asm/sx86-elf.o # elf
|
||||
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
||||
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
||||
#SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
|
||||
|
||||
# Also need RMD160_ASM defined
|
||||
RMD160_ASM_OBJ=
|
||||
#RMD160_ASM_OBJ= asm/rm86-elf.o # elf
|
||||
#RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
|
||||
#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
|
||||
#RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
|
||||
|
||||
# KRB5 stuff
|
||||
KRB5_INCLUDES=
|
||||
LIBKRB5=
|
||||
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||
SHLIB_MARK=
|
||||
|
||||
DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
|
||||
SHLIBDIRS= fips crypto ssl
|
||||
|
||||
# dirs in crypto to build
|
||||
SDIRS= objects \
|
||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||
des rc2 rc4 rc5 idea bf cast \
|
||||
bn ec rsa dsa dh dso engine aes \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
FDIRS= sha1 rand des aes dsa rsa dh
|
||||
|
||||
# tests to perform. "alltests" is a special word indicating that all tests
|
||||
# should be performed.
|
||||
TESTS = alltests
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
MANDIR=$(OPENSSLDIR)/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
MANSUFFIX=
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
ONEDIRS=out tmp
|
||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||
WDIRS= windows
|
||||
LIBS= libcrypto.a libssl.a
|
||||
SIGS= libcrypto.a.sha1
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_LIBS=
|
||||
SHARED_LIBS_LINK_EXTS=
|
||||
SHARED_LDFLAGS=
|
||||
|
||||
GENERAL= Makefile
|
||||
BASENAME= openssl
|
||||
NAME= $(BASENAME)-$(VERSION)
|
||||
TARFILE= $(NAME).tar
|
||||
WTARFILE= $(NAME)-win.tar
|
||||
EXHEADER= e_os2.h
|
||||
HEADER= e_os.h
|
||||
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might remove 'clean-shared' from the targets to perform at this stage
|
||||
|
||||
all: Makefile sub_all openssl.pc
|
||||
|
||||
sigs: $(SIGS)
|
||||
libcrypto.a.sha1: libcrypto.a
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
$(RANLIB) libcrypto.a; \
|
||||
fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \
|
||||
fi
|
||||
|
||||
sub_all:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making all in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
sub_target:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making $(TARGET) in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
$(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
fi
|
||||
|
||||
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
fi
|
||||
|
||||
clean-shared:
|
||||
@for i in $(SHLIBDIRS); do \
|
||||
if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; rm -f lib$$i$$j ); \
|
||||
done; \
|
||||
fi; \
|
||||
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
( set -x; rm -f cyg$$i-$(SHLIB_VERSION_NUMBER)$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
link-shared:
|
||||
@if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||
for i in $(SHLIBDIRS); do \
|
||||
prev=lib$$i$(SHLIB_EXT); \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; \
|
||||
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||
prev=lib$$i$$j; \
|
||||
done; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
|
||||
|
||||
do_bsd-gcc-shared: do_gnu-shared
|
||||
do_linux-shared: do_gnu-shared
|
||||
do_gnu-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||
|
||||
# For Darwin AKA Mac OS/X (dyld)
|
||||
do_darwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
||||
lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
|
||||
-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
|
||||
libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
|
||||
echo "" ; \
|
||||
done
|
||||
|
||||
do_cygwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--out-implib,lib$$i.dll.a \
|
||||
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_alpha-osf1-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# The difference between alpha-osf1-shared and tru64-shared is the `-msym'
|
||||
# option passed to the linker.
|
||||
do_tru64-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -msym -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# The difference between tru64-shared and tru64-shared-rpath is the
|
||||
# -rpath ${INSTALLTOP}/lib passed to the linker.
|
||||
do_tru64-shared-rpath:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -msym -o lib$$i.so \
|
||||
-rpath ${INSTALLTOP}/lib \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_solaris-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
MINUSZ='-z '; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
|
||||
$$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# OpenServer 5 native compilers used
|
||||
do_svr3-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# UnixWare 7 and OpenUNIX 8 native compilers used
|
||||
do_svr5-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
SHARE_FLAG='-G'; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
|
||||
${CC} ${SHARED_LDFLAGS} \
|
||||
$${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
do_irix-shared:
|
||||
if ${DETECT_GNU_LD}; then \
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( WHOLELIB="-all lib$$i.a -notall"; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && WHOLELIB="-Wl,-all,lib$$i.a,-notall"; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${WHOLELIB} $$libs ${EX_LIBS} -lc) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# HP-UX includes the full pathname of libs we depend on, so we would get
|
||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
|
||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
|
||||
# anyway.
|
||||
# The object modules are loaded from lib$i.a using the undocumented -Fl
|
||||
# option.
|
||||
#
|
||||
# WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
|
||||
# by temporarily specifying "+s"!
|
||||
#
|
||||
do_hpux-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
+vnocompatwarnings \
|
||||
-b -z +s \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Fl lib$$i.a -ldld -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
done
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
# HP-UX includes the full pathname of libs we depend on, so we would get
|
||||
# ./libcrypto (with ./ as path information) compiled into libssl, hence
|
||||
# we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
|
||||
# anyway.
|
||||
#
|
||||
# HP-UX in 64bit mode has "+s" enabled by default; it will search for
|
||||
# shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
|
||||
#
|
||||
do_hpux64-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
-b -z \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
||||
done
|
||||
|
||||
# The following method is said to work on all platforms. Tests will
|
||||
# determine if that's how it's gong to be used.
|
||||
# This assumes that for all but GNU systems, GNU utilities are *not* used.
|
||||
# ALLSYMSFLAGS would be:
|
||||
# GNU systems: --whole-archive
|
||||
# Tru64 Unix: -all
|
||||
# Solaris: -z allextract
|
||||
# Irix: -all
|
||||
# HP/UX-32bit: -Fl
|
||||
# HP/UX-64bit: +forceload
|
||||
# AIX: -bnogc
|
||||
# SHAREDFLAGS would be:
|
||||
# GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# Tru64 Unix: -shared \
|
||||
# -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
|
||||
# Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# HP/UX-32bit: +vnocompatwarnings -b -z +s \
|
||||
# +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
||||
# AIX: -G -bE:lib$$i.exp -bM:SRE
|
||||
# SHAREDCMD would be:
|
||||
# GNU systems: $(CC)
|
||||
# Tru64 Unix: $(CC)
|
||||
# Solaris: $(CC)
|
||||
# Irix: $(CC)
|
||||
# HP/UX-32bit: /usr/ccs/bin/ld
|
||||
# HP/UX-64bit: /usr/ccs/bin/ld
|
||||
# AIX: $(CC)
|
||||
ALLSYMSFLAG=-bnogc
|
||||
SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
|
||||
SHAREDCMD=$(CC)
|
||||
do_aix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; \
|
||||
ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
||||
( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
|
||||
$(SHAREDCMD) $(SHAREDFLAGS) \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
|
||||
$$libs ${EX_LIBS} ) ) \
|
||||
|| exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
do_reliantunix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
|
||||
( set -x; \
|
||||
( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
|
||||
cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \
|
||||
${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \
|
||||
) || exit 1; \
|
||||
cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
|
||||
) || exit 1; \
|
||||
rm -rf $$tmpdir ; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
openssl.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
echo 'includedir=$${prefix}/include'; \
|
||||
echo ''; \
|
||||
echo 'Name: OpenSSL'; \
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile: Makefile.org
|
||||
@echo "Makefile is older than Makefile.org."
|
||||
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||
@false
|
||||
|
||||
libclean:
|
||||
rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
|
||||
|
||||
clean: libclean
|
||||
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making clean in $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
|
||||
rm -f $(LIBS); \
|
||||
fi; \
|
||||
done;
|
||||
rm -f openssl.pc
|
||||
rm -f speed.* .pure
|
||||
rm -f $(TARFILE)
|
||||
@for i in $(ONEDIRS) ;\
|
||||
do \
|
||||
rm -fr $$i/*; \
|
||||
done
|
||||
|
||||
makefile.one: files
|
||||
$(PERL) util/mk1mf.pl >makefile.one; \
|
||||
sh util/do_ms.sh
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making 'files' in $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
||||
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
||||
@for i in $(DIRS); do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making links in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making dclean in $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
touch rehash.time
|
||||
|
||||
test: tests
|
||||
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
apps/openssl version -a
|
||||
|
||||
report:
|
||||
@$(PERL) util/selftest.pl
|
||||
|
||||
depend:
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making dependencies $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
lint:
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making lint $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
tags:
|
||||
rm -f TAGS
|
||||
find . -name '[^.]*.[ch]' | xargs etags -a
|
||||
|
||||
errors:
|
||||
$(PERL) util/mkerr.pl -recurse -write
|
||||
(cd crypto/engine; $(MAKE) PERL=$(PERL) errors)
|
||||
|
||||
stacks:
|
||||
$(PERL) util/mkstack.pl -write
|
||||
|
||||
util/libeay.num::
|
||||
$(PERL) util/mkdef.pl crypto update
|
||||
|
||||
util/ssleay.num::
|
||||
$(PERL) util/mkdef.pl ssl update
|
||||
|
||||
crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
|
||||
$(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
|
||||
crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
|
||||
$(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
|
||||
|
||||
apps/openssl-vms.cnf: apps/openssl.cnf
|
||||
$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
|
||||
|
||||
TABLE: Configure
|
||||
(echo 'Output of `Configure TABLE'"':"; \
|
||||
$(PERL) Configure TABLE) > TABLE
|
||||
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
|
||||
|
||||
# Build distribution tar-file. As the list of files returned by "find" is
|
||||
# pretty long, on several platforms a "too many arguments" error or similar
|
||||
# would occur. Therefore the list of files is temporarily stored into a file
|
||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||
# tar does not support the --files-from option.
|
||||
tar:
|
||||
find . -type d -print | xargs chmod 755
|
||||
find . -type f -print | xargs chmod a+r
|
||||
find . -type f -perm -0100 -print | xargs chmod a+x
|
||||
find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
|
||||
$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
|
||||
tardy --user_number=0 --user_name=openssl \
|
||||
--group_number=0 --group_name=openssl \
|
||||
--prefix=openssl-$(VERSION) - |\
|
||||
gzip --best >../$(TARFILE).gz; \
|
||||
rm -f ../$(TARFILE).list; \
|
||||
ls -l ../$(TARFILE).gz
|
||||
|
||||
tar-snap:
|
||||
@$(TAR) $(TARFLAGS) -cvf - \
|
||||
`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
|
||||
tardy --user_number=0 --user_name=openssl \
|
||||
--group_number=0 --group_name=openssl \
|
||||
--prefix=openssl-$(VERSION) - > ../$(TARFILE);\
|
||||
ls -l ../$(TARFILE)
|
||||
|
||||
dist:
|
||||
$(PERL) Configure dist
|
||||
@$(MAKE) dist_pem_h
|
||||
@$(MAKE) SDIRS='${SDIRS}' clean
|
||||
@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
|
||||
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
||||
|
||||
install: all install_docs install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
@for i in $(EXHEADER) ;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i; echo "installing $$i..."; \
|
||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
|
||||
fi; \
|
||||
done
|
||||
@for i in $(LIBS) ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
: ; \
|
||||
else \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
fi; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
tmp="$(SHARED_LIBS)"; \
|
||||
for i in $${tmp:-x}; \
|
||||
do \
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
||||
echo 'OpenSSL shared libraries have been installed in:'; \
|
||||
echo ' $(INSTALLTOP)'; \
|
||||
echo ''; \
|
||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||
fi; \
|
||||
fi
|
||||
@for i in $(SIGS) ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
||||
|
||||
install_docs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
filecase=-i; \
|
||||
fi; \
|
||||
for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
done); \
|
||||
done; \
|
||||
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
done); \
|
||||
done
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
@ -101,6 +101,7 @@ PROCESSOR=
|
||||
|
||||
# Set DES_ENC to des_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
FIPS_DES_ENC= des_enc.o fcrypt_b.o
|
||||
DES_ENC= asm/dx86-out.o asm/yx86-out.o
|
||||
#DES_ENC= des_enc.o fcrypt_b.o # C
|
||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
|
||||
@ -153,6 +154,7 @@ MD5_ASM_OBJ= asm/mx86-out.o
|
||||
|
||||
# Also need SHA1_ASM defined
|
||||
SHA1_ASM_OBJ= asm/sx86-out.o
|
||||
FIPS_SHA1_ASM_OBJ= asm/sx86-out.o
|
||||
#SHA1_ASM_OBJ= asm/sx86-elf.o # elf
|
||||
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
||||
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
||||
@ -173,23 +175,24 @@ LIBKRB5=
|
||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||
SHLIB_MARK=
|
||||
|
||||
DIRS= crypto ssl $(SHLIB_MARK) apps test tools
|
||||
SHLIBDIRS= crypto ssl
|
||||
DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
|
||||
SHLIBDIRS= fips crypto ssl
|
||||
|
||||
# dirs in crypto to build
|
||||
SDIRS= \
|
||||
SDIRS= objects \
|
||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||
des rc2 rc4 rc5 idea bf cast \
|
||||
bn ec rsa dsa dh dso engine aes \
|
||||
buffer bio stack lhash rand err objects \
|
||||
buffer bio stack lhash rand err \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
FDIRS= sha1 rand des aes dsa rsa dh
|
||||
|
||||
# tests to perform. "alltests" is a special word indicating that all tests
|
||||
# should be performed.
|
||||
TESTS = alltests
|
||||
|
||||
MAKEFILE= Makefile.ssl
|
||||
MAKE= make -f Makefile.ssl
|
||||
MAKEFILE= Makefile
|
||||
|
||||
MANDIR=$(OPENSSLDIR)/man
|
||||
MAN1=1
|
||||
@ -202,6 +205,7 @@ ONEDIRS=out tmp
|
||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||
WDIRS= windows
|
||||
LIBS= libcrypto.a libssl.a
|
||||
SIGS= libcrypto.a.sha1
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_LIBS=
|
||||
@ -219,14 +223,32 @@ HEADER= e_os.h
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might remove 'clean-shared' from the targets to perform at this stage
|
||||
|
||||
all: Makefile.ssl sub_all openssl.pc
|
||||
all: Makefile sub_all openssl.pc
|
||||
|
||||
sigs: $(SIGS)
|
||||
libcrypto.a.sha1: libcrypto.a
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
$(RANLIB) libcrypto.a; \
|
||||
fips/sha1/fips_standalone_sha1 libcrypto.a > libcrypto.a.sha1; \
|
||||
fi
|
||||
|
||||
sub_all:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making all in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
sub_target:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making $(TARGET) in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' FDIRS='$(FDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TARGET='$(TARGET)' sub_target ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
@ -392,6 +414,7 @@ do_solaris-shared:
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} -G -dy -z text \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
|
||||
$$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="-l$$i $$libs"; \
|
||||
@ -483,7 +506,7 @@ do_hpux-shared:
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
+vnocompatwarnings \
|
||||
+vnocompatwarnings \
|
||||
-b -z +s \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
@ -506,7 +529,7 @@ do_hpux64-shared:
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
-b -z \
|
||||
-b -z \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||
@ -577,7 +600,7 @@ do_reliantunix-shared:
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
openssl.pc: Makefile.ssl
|
||||
openssl.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
@ -590,8 +613,8 @@ openssl.pc: Makefile.ssl
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile.ssl: Makefile.org
|
||||
@echo "Makefile.ssl is older than Makefile.org."
|
||||
Makefile: Makefile.org
|
||||
@echo "Makefile is older than Makefile.org."
|
||||
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||
@false
|
||||
|
||||
@ -621,7 +644,7 @@ makefile.one: files
|
||||
sh util/do_ms.sh
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
|
||||
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
@ -631,19 +654,18 @@ files:
|
||||
done;
|
||||
|
||||
links:
|
||||
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
||||
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
||||
@for i in $(DIRS); do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making links in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@ -657,7 +679,7 @@ dclean:
|
||||
|
||||
rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
|
||||
@(OPENSSL="`pwd`/apps/openssl$(EXE_EXT)"; OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
@ -672,7 +694,7 @@ test: tests
|
||||
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' FIPS_DES_ENC='${FIPS_DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' FIPS_SHA1_ASM_OBJ='${FIPS_SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
@ -703,13 +725,8 @@ lint:
|
||||
done;
|
||||
|
||||
tags:
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making tags $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
rm -f TAGS
|
||||
find . -name '[^.]*.[ch]' | xargs etags -a
|
||||
|
||||
errors:
|
||||
$(PERL) util/mkerr.pl -recurse -write
|
||||
@ -729,11 +746,14 @@ crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
|
||||
crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
|
||||
$(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
|
||||
|
||||
apps/openssl-vms.cnf: apps/openssl.cnf
|
||||
$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
|
||||
|
||||
TABLE: Configure
|
||||
(echo 'Output of `Configure TABLE'"':"; \
|
||||
$(PERL) Configure TABLE) > TABLE
|
||||
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
|
||||
|
||||
# Build distribution tar-file. As the list of files returned by "find" is
|
||||
# pretty long, on several platforms a "too many arguments" error or similar
|
||||
@ -770,15 +790,16 @@ dist:
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
||||
|
||||
install: all install_docs
|
||||
install: all install_docs install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/lib
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
@for i in $(EXHEADER) ;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
@ -796,7 +817,11 @@ install: all install_docs
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
if egrep 'define OPENSSL_FIPS' $(TOP)/include/openssl/opensslconf.h > /dev/null; then \
|
||||
: ; \
|
||||
else \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
fi; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
@ -833,6 +858,15 @@ install: all install_docs
|
||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||
fi; \
|
||||
fi
|
||||
@for i in $(SIGS) ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
||||
|
||||
|
@ -5,12 +5,17 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e:
|
||||
|
||||
o Fix race condition in CRL checking code.
|
||||
o Fixes to PKCS#7 (S/MIME) code.
|
||||
|
||||
Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d:
|
||||
|
||||
o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
|
||||
o Security: Fix null-pointer assignment in do_change_cipher_spec()
|
||||
o Allow multiple active certificates with same subject in CA index
|
||||
o Multiple X590 verification fixes
|
||||
o Multiple X509 verification fixes
|
||||
o Speed up HMAC and other operations
|
||||
|
||||
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
|
||||
|
@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries. This
|
||||
means that -L switches won't matter unless OpenSSL is built with shared
|
||||
library support.
|
||||
|
||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
||||
test/Makefile.ssl:
|
||||
The workaround may be to change the following lines in apps/Makefile and
|
||||
test/Makefile:
|
||||
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.7d 17 Mar 2004
|
||||
OpenSSL 0.9.7e 25 Oct 2004
|
||||
|
||||
Copyright (c) 1998-2004 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
@ -173,11 +173,17 @@
|
||||
textual explanation of what your patch does.
|
||||
|
||||
Note: For legal reasons, contributions from the US can be accepted only
|
||||
if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov;
|
||||
see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
|
||||
and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)).
|
||||
if a TSU notification and a copy of the patch are sent to crypt@bis.doc.gov
|
||||
(formerly BXA) with a copy to the ENC Encryption Request Coordinator;
|
||||
please take some time to look at
|
||||
http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
|
||||
and
|
||||
http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e))
|
||||
for the details. If "your encryption source code is too large to serve as
|
||||
an email attachment", they are glad to receive it by fax instead; hope you
|
||||
have a cheap long-distance plan.
|
||||
|
||||
The preferred format for changes is "diff -u" output. You might
|
||||
Our preferred format for changes is "diff -u" output. You might
|
||||
generate it like this:
|
||||
|
||||
# cd openssl-work
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# CA - wrapper around ca to make it easier to use ... basically ca requires
|
||||
# some setup stuff to be done before you can use it and this makes
|
||||
@ -82,9 +82,6 @@ foreach (@ARGV) {
|
||||
mkdir "${CATOP}/crl", $DIRMODE ;
|
||||
mkdir "${CATOP}/newcerts", $DIRMODE;
|
||||
mkdir "${CATOP}/private", $DIRMODE;
|
||||
open OUT, ">${CATOP}/serial";
|
||||
print OUT "01\n";
|
||||
close OUT;
|
||||
open OUT, ">${CATOP}/index.txt";
|
||||
close OUT;
|
||||
}
|
||||
@ -106,6 +103,10 @@ foreach (@ARGV) {
|
||||
$RET=$?;
|
||||
}
|
||||
}
|
||||
if (! -f "${CATOP}/serial" ) {
|
||||
system ("$X509 -in ${CATOP}/$CACERT -noout "
|
||||
. "-next_serial -out ${CATOP}/serial");
|
||||
}
|
||||
} elsif (/^-pkcs12$/) {
|
||||
my $cname = $ARGV[1];
|
||||
$cname = "My Certificate" unless defined $cname;
|
||||
|
@ -82,9 +82,6 @@ foreach (@ARGV) {
|
||||
mkdir "${CATOP}/crl", $DIRMODE ;
|
||||
mkdir "${CATOP}/newcerts", $DIRMODE;
|
||||
mkdir "${CATOP}/private", $DIRMODE;
|
||||
open OUT, ">${CATOP}/serial";
|
||||
print OUT "01\n";
|
||||
close OUT;
|
||||
open OUT, ">${CATOP}/index.txt";
|
||||
close OUT;
|
||||
}
|
||||
@ -106,6 +103,10 @@ foreach (@ARGV) {
|
||||
$RET=$?;
|
||||
}
|
||||
}
|
||||
if (! -f "${CATOP}/serial" ) {
|
||||
system ("$X509 -in ${CATOP}/$CACERT -noout "
|
||||
. "-next_serial -out ${CATOP}/serial");
|
||||
}
|
||||
} elsif (/^-pkcs12$/) {
|
||||
my $cname = $ARGV[1];
|
||||
$cname = "My Certificate" unless defined $cname;
|
||||
|
1171
crypto/openssl/apps/Makefile
Normal file
1171
crypto/openssl/apps/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
@ -126,16 +126,6 @@
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#define strcasecmp _stricmp
|
||||
#else
|
||||
# ifdef NO_STRINGS_H
|
||||
int strcasecmp();
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif /* NO_STRINGS_H */
|
||||
#endif
|
||||
|
||||
#define NON_MAIN
|
||||
#include "apps.h"
|
||||
#undef NON_MAIN
|
||||
@ -340,44 +330,6 @@ void program_name(char *in, char *out, int size)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
int WIN32_rename(char *from, char *to)
|
||||
{
|
||||
#ifndef OPENSSL_SYS_WINCE
|
||||
/* Windows rename gives an error if 'to' exists, so delete it
|
||||
* first and ignore file not found errror
|
||||
*/
|
||||
if((remove(to) != 0) && (errno != ENOENT))
|
||||
return -1;
|
||||
#undef rename
|
||||
return rename(from, to);
|
||||
#else
|
||||
/* convert strings to UNICODE */
|
||||
{
|
||||
BOOL result = FALSE;
|
||||
WCHAR* wfrom;
|
||||
WCHAR* wto;
|
||||
int i;
|
||||
wfrom = malloc((strlen(from)+1)*2);
|
||||
wto = malloc((strlen(to)+1)*2);
|
||||
if (wfrom != NULL && wto != NULL)
|
||||
{
|
||||
for (i=0; i<(int)strlen(from)+1; i++)
|
||||
wfrom[i] = (short)from[i];
|
||||
for (i=0; i<(int)strlen(to)+1; i++)
|
||||
wto[i] = (short)to[i];
|
||||
result = MoveFile(wfrom, wto);
|
||||
}
|
||||
if (wfrom != NULL)
|
||||
free(wfrom);
|
||||
if (wto != NULL)
|
||||
free(wto);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
int VMS_strcasecmp(const char *str1, const char *str2)
|
||||
{
|
||||
@ -1486,12 +1438,9 @@ BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai)
|
||||
}
|
||||
else
|
||||
{
|
||||
ASN1_INTEGER_set(ai,1);
|
||||
ret=BN_new();
|
||||
if (ret == NULL)
|
||||
if (ret == NULL || !rand_serial(ret, ai))
|
||||
BIO_printf(bio_err, "Out of memory\n");
|
||||
else
|
||||
BN_one(ret);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1653,6 +1602,33 @@ int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rand_serial(BIGNUM *b, ASN1_INTEGER *ai)
|
||||
{
|
||||
BIGNUM *btmp;
|
||||
int ret = 0;
|
||||
if (b)
|
||||
btmp = b;
|
||||
else
|
||||
btmp = BN_new();
|
||||
|
||||
if (!btmp)
|
||||
return 0;
|
||||
|
||||
if (!BN_pseudo_rand(btmp, SERIAL_RAND_BITS, 0, 0))
|
||||
goto error;
|
||||
if (ai && !BN_to_ASN1_INTEGER(btmp, ai))
|
||||
goto error;
|
||||
|
||||
ret = 1;
|
||||
|
||||
error:
|
||||
|
||||
if (!b)
|
||||
BN_free(btmp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
|
||||
{
|
||||
CA_DB *retdb = NULL;
|
||||
@ -1970,6 +1946,48 @@ int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
|
||||
|
||||
void free_index(CA_DB *db)
|
||||
{
|
||||
TXT_DB_free(db->db);
|
||||
OPENSSL_free(db);
|
||||
if (db)
|
||||
{
|
||||
if (db->db) TXT_DB_free(db->db);
|
||||
OPENSSL_free(db);
|
||||
}
|
||||
}
|
||||
|
||||
/* This code MUST COME AFTER anything that uses rename() */
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
int WIN32_rename(char *from, char *to)
|
||||
{
|
||||
#ifndef OPENSSL_SYS_WINCE
|
||||
/* Windows rename gives an error if 'to' exists, so delete it
|
||||
* first and ignore file not found errror
|
||||
*/
|
||||
if((remove(to) != 0) && (errno != ENOENT))
|
||||
return -1;
|
||||
#undef rename
|
||||
return rename(from, to);
|
||||
#else
|
||||
/* convert strings to UNICODE */
|
||||
{
|
||||
BOOL result = FALSE;
|
||||
WCHAR* wfrom;
|
||||
WCHAR* wto;
|
||||
int i;
|
||||
wfrom = malloc((strlen(from)+1)*2);
|
||||
wto = malloc((strlen(to)+1)*2);
|
||||
if (wfrom != NULL && wto != NULL)
|
||||
{
|
||||
for (i=0; i<(int)strlen(from)+1; i++)
|
||||
wfrom[i] = (short)from[i];
|
||||
for (i=0; i<(int)strlen(to)+1; i++)
|
||||
wto[i] = (short)to[i];
|
||||
result = MoveFile(wfrom, wto);
|
||||
}
|
||||
if (wfrom != NULL)
|
||||
free(wfrom);
|
||||
if (wto != NULL)
|
||||
free(wto);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -141,12 +141,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
|
||||
int WIN32_rename(char *oldname,char *newname);
|
||||
#endif
|
||||
|
||||
/* VMS below version 7.0 doesn't have strcasecmp() */
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
#define strcasecmp(str1,str2) VMS_strcasecmp((str1),(str2))
|
||||
int VMS_strcasecmp(const char *str1, const char *str2);
|
||||
#endif
|
||||
|
||||
#ifndef MONOLITH
|
||||
|
||||
#define MAIN(a,v) main(a,v)
|
||||
@ -154,9 +148,11 @@ int VMS_strcasecmp(const char *str1, const char *str2);
|
||||
#ifndef NON_MAIN
|
||||
CONF *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
int in_FIPS_mode=0;
|
||||
#else
|
||||
extern CONF *config;
|
||||
extern BIO *bio_err;
|
||||
extern int in_FIPS_mode;
|
||||
#endif
|
||||
|
||||
#else
|
||||
@ -165,6 +161,7 @@ extern BIO *bio_err;
|
||||
extern CONF *config;
|
||||
extern char *default_config_file;
|
||||
extern BIO *bio_err;
|
||||
extern int in_FIPS_mode;
|
||||
|
||||
#endif
|
||||
|
||||
@ -313,6 +310,7 @@ typedef struct ca_db_st
|
||||
BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai);
|
||||
int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **retai);
|
||||
int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix);
|
||||
int rand_serial(BIGNUM *b, ASN1_INTEGER *ai);
|
||||
CA_DB *load_index(char *dbfile, DB_ATTR *dbattr);
|
||||
int index_index(CA_DB *db);
|
||||
int save_index(char *dbfile, char *suffix, CA_DB *db);
|
||||
@ -341,4 +339,6 @@ X509_NAME *do_subject(char *str, long chtype);
|
||||
|
||||
#define APP_PASS_LEN 1024
|
||||
|
||||
#define SERIAL_RAND_BITS 64
|
||||
|
||||
#endif
|
||||
|
@ -278,6 +278,7 @@ int MAIN(int argc, char **argv)
|
||||
tmplen=num;
|
||||
for (i=0; i<sk_num(osk); i++)
|
||||
{
|
||||
int typ;
|
||||
ASN1_TYPE *atmp;
|
||||
j=atoi(sk_value(osk,i));
|
||||
if (j == 0)
|
||||
@ -296,6 +297,15 @@ int MAIN(int argc, char **argv)
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
typ = ASN1_TYPE_get(at);
|
||||
if ((typ == V_ASN1_OBJECT)
|
||||
|| (typ == V_ASN1_NULL))
|
||||
{
|
||||
BIO_printf(bio_err, "Can't parse %s type\n",
|
||||
typ == V_ASN1_NULL ? "NULL" : "OBJECT");
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
/* hmm... this is a little evil but it works */
|
||||
tmpbuf=at->value.asn1_string->data;
|
||||
tmplen=at->value.asn1_string->length;
|
||||
|
@ -76,16 +76,6 @@
|
||||
#include <openssl/ocsp.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#define strcasecmp _stricmp
|
||||
#else
|
||||
# ifdef NO_STRINGS_H
|
||||
int strcasecmp();
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif /* NO_STRINGS_H */
|
||||
#endif
|
||||
|
||||
#ifndef W_OK
|
||||
# ifdef OPENSSL_SYS_VMS
|
||||
# if defined(__DECC)
|
||||
@ -248,6 +238,7 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
ENGINE *e = NULL;
|
||||
char *key=NULL,*passargin=NULL;
|
||||
int create_ser = 0;
|
||||
int free_key = 0;
|
||||
int total=0;
|
||||
int total_done=0;
|
||||
@ -547,10 +538,6 @@ EF_ALIGNMENT=0;
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
/*****************************************************************/
|
||||
tofree=NULL;
|
||||
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
||||
@ -595,6 +582,10 @@ EF_ALIGNMENT=0;
|
||||
if (!load_config(bio_err, conf))
|
||||
goto err;
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
/* Lets get the config section we are using */
|
||||
if (section == NULL)
|
||||
{
|
||||
@ -666,8 +657,10 @@ EF_ALIGNMENT=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef RL_DEBUG
|
||||
else
|
||||
ERR_clear_error();
|
||||
#ifdef RL_DEBUG
|
||||
if (!p)
|
||||
BIO_printf(bio_err, "DEBUG: unique_subject undefined\n", p);
|
||||
#endif
|
||||
#ifdef RL_DEBUG
|
||||
@ -1106,7 +1099,7 @@ EF_ALIGNMENT=0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((serial=load_serial(serialfile, 0, NULL)) == NULL)
|
||||
if ((serial=load_serial(serialfile, create_ser, NULL)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"error while loading serial number\n");
|
||||
goto err;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# der_chop ... this is one total hack that Eric is really not proud of
|
||||
# so don't look at it and don't ask for support
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
#undef BUFSIZE
|
||||
#define BUFSIZE 1024*8
|
||||
@ -73,9 +74,11 @@
|
||||
#undef PROG
|
||||
#define PROG dgst_main
|
||||
|
||||
static HMAC_CTX hmac_ctx;
|
||||
|
||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||
const char *file);
|
||||
const char *file,BIO *bmd,const char *hmac_key);
|
||||
|
||||
int MAIN(int, char **);
|
||||
|
||||
@ -103,6 +106,7 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
char *hmac_key=NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@ -181,6 +185,12 @@ int MAIN(int argc, char **argv)
|
||||
out_bin = 1;
|
||||
else if (strcmp(*argv,"-d") == 0)
|
||||
debug=1;
|
||||
else if (!strcmp(*argv,"-hmac"))
|
||||
{
|
||||
if (--argc < 1)
|
||||
break;
|
||||
hmac_key=*++argv;
|
||||
}
|
||||
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
||||
md=m;
|
||||
else
|
||||
@ -235,7 +245,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
@ -318,18 +328,22 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* we use md as a filter, reading from 'in' */
|
||||
BIO_set_md(bmd,md);
|
||||
if (!BIO_set_md(bmd,md))
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting digest %s\n", pname);
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
inp=BIO_push(bmd,in);
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||
err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
|
||||
siglen,"","(stdin)");
|
||||
siglen,"","(stdin)",bmd,hmac_key);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -347,14 +361,15 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
if(!out_bin)
|
||||
{
|
||||
size_t len = strlen(name)+strlen(argv[i])+5;
|
||||
size_t len = strlen(name)+strlen(argv[i])+(hmac_key ? 5 : 0)+5;
|
||||
tmp=tofree=OPENSSL_malloc(len);
|
||||
BIO_snprintf(tmp,len,"%s(%s)= ",name,argv[i]);
|
||||
BIO_snprintf(tmp,len,"%s%s(%s)= ",
|
||||
hmac_key ? "HMAC-" : "",name,argv[i]);
|
||||
}
|
||||
else
|
||||
tmp="";
|
||||
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
||||
siglen,tmp,argv[i]);
|
||||
siglen,tmp,argv[i],bmd,hmac_key);
|
||||
if(r)
|
||||
err=r;
|
||||
if(tofree)
|
||||
@ -379,11 +394,21 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
EVP_PKEY *key, unsigned char *sigin, int siglen, const char *title,
|
||||
const char *file)
|
||||
const char *file,BIO *bmd,const char *hmac_key)
|
||||
{
|
||||
int len;
|
||||
unsigned int len;
|
||||
int i;
|
||||
EVP_MD_CTX *md_ctx;
|
||||
|
||||
if (hmac_key)
|
||||
{
|
||||
EVP_MD *md;
|
||||
|
||||
BIO_get_md(bmd,&md);
|
||||
HMAC_Init(&hmac_ctx,hmac_key,strlen(hmac_key),md);
|
||||
BIO_get_md_ctx(bmd,&md_ctx);
|
||||
BIO_set_md_ctx(bmd,&hmac_ctx.md_ctx);
|
||||
}
|
||||
for (;;)
|
||||
{
|
||||
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
||||
@ -426,6 +451,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if(hmac_key)
|
||||
{
|
||||
HMAC_Final(&hmac_ctx,buf,&len);
|
||||
HMAC_CTX_cleanup(&hmac_ctx);
|
||||
}
|
||||
else
|
||||
len=BIO_gets(bp,(char *)buf,BUFSIZE);
|
||||
|
||||
@ -433,7 +463,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
else
|
||||
{
|
||||
BIO_write(out,title,strlen(title));
|
||||
for (i=0; i<len; i++)
|
||||
for (i=0; (unsigned int)i<len; i++)
|
||||
{
|
||||
if (sep && (i != 0))
|
||||
BIO_printf(out, ":");
|
||||
@ -441,6 +471,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
}
|
||||
BIO_printf(out, "\n");
|
||||
}
|
||||
if (hmac_key)
|
||||
{
|
||||
BIO_set_md_ctx(bmd,md_ctx);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,7 @@ int MAIN(int argc, char **argv)
|
||||
unsigned char salt[PKCS5_SALT_LEN];
|
||||
char *str=NULL, *passarg = NULL, *pass = NULL;
|
||||
char *hkey=NULL,*hiv=NULL,*hsalt = NULL;
|
||||
char *md=NULL;
|
||||
int enc=1,printkey=0,i,base64=0;
|
||||
int debug=0,olb64=0,nosalt=0;
|
||||
const EVP_CIPHER *cipher=NULL,*c;
|
||||
@ -124,6 +125,7 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
const EVP_MD *dgst=NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@ -253,6 +255,11 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
hiv= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-md") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
md= *(++argv);
|
||||
}
|
||||
else if ((argv[0][0] == '-') &&
|
||||
((c=EVP_get_cipherbyname(&(argv[0][1]))) != NULL))
|
||||
{
|
||||
@ -271,8 +278,10 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"%-14s encrypt\n","-e");
|
||||
BIO_printf(bio_err,"%-14s decrypt\n","-d");
|
||||
BIO_printf(bio_err,"%-14s base64 encode/decode, depending on encryption flag\n","-a/-base64");
|
||||
BIO_printf(bio_err,"%-14s key is the next argument\n","-k");
|
||||
BIO_printf(bio_err,"%-14s key is the first line of the file argument\n","-kfile");
|
||||
BIO_printf(bio_err,"%-14s passphrase is the next argument\n","-k");
|
||||
BIO_printf(bio_err,"%-14s passphrase is the first line of the file argument\n","-kfile");
|
||||
BIO_printf(bio_err,"%-14s the next argument is the md to use to create a key\n","-md");
|
||||
BIO_printf(bio_err,"%-14s from a passphrase. One of md2, md5, sha or sha1\n","");
|
||||
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
||||
BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
|
||||
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
||||
@ -296,6 +305,20 @@ int MAIN(int argc, char **argv)
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (dgst == NULL)
|
||||
{
|
||||
if (in_FIPS_mode)
|
||||
dgst = EVP_sha1();
|
||||
else
|
||||
dgst = EVP_md5();
|
||||
}
|
||||
|
||||
if (bufsize != NULL)
|
||||
{
|
||||
unsigned long n;
|
||||
@ -483,7 +506,7 @@ int MAIN(int argc, char **argv)
|
||||
sptr = salt;
|
||||
}
|
||||
|
||||
EVP_BytesToKey(cipher,EVP_md5(),sptr,
|
||||
EVP_BytesToKey(cipher,dgst,sptr,
|
||||
(unsigned char *)str,
|
||||
strlen(str),1,key,iv);
|
||||
/* zero the complete buffer or the string
|
||||
|
@ -129,6 +129,7 @@
|
||||
#include "progs.h"
|
||||
#include "s_apps.h"
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/fips.h>
|
||||
|
||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
|
||||
* base prototypes (we cast each variable inside the function to the required
|
||||
@ -147,6 +148,7 @@ char *default_config_file=NULL;
|
||||
#ifdef MONOLITH
|
||||
CONF *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
int in_FIPS_mode=0;
|
||||
#endif
|
||||
|
||||
|
||||
@ -227,10 +229,31 @@ int main(int Argc, char *Argv[])
|
||||
char **argv,*p;
|
||||
LHASH *prog=NULL;
|
||||
long errline;
|
||||
|
||||
|
||||
arg.data=NULL;
|
||||
arg.count=0;
|
||||
|
||||
in_FIPS_mode = 0;
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(getenv("OPENSSL_FIPS")) {
|
||||
#if defined(_WIN32)
|
||||
char filename[MAX_PATH] = "";
|
||||
GetModuleFileName( NULL, filename, MAX_PATH) ;
|
||||
p = filename;
|
||||
#else
|
||||
p = Argv[0];
|
||||
#endif
|
||||
if (!FIPS_mode_set(1,p)) {
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
|
||||
exit(1);
|
||||
}
|
||||
in_FIPS_mode = 1;
|
||||
if (getenv("OPENSSL_FIPS_MD5"))
|
||||
FIPS_allow_md5(1);
|
||||
}
|
||||
#endif
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pkcs8.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 1999.
|
||||
* project 1999-2004.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
@ -68,7 +68,7 @@
|
||||
int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
{
|
||||
ENGINE *e = NULL;
|
||||
char **args, *infile = NULL, *outfile = NULL;
|
||||
char *passargin = NULL, *passargout = NULL;
|
||||
@ -100,43 +100,70 @@ int MAIN(int argc, char **argv)
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
args = argv + 1;
|
||||
while (!badarg && *args && *args[0] == '-') {
|
||||
if (!strcmp(*args,"-v2")) {
|
||||
if (args[1]) {
|
||||
while (!badarg && *args && *args[0] == '-')
|
||||
{
|
||||
if (!strcmp(*args,"-v2"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
cipher=EVP_get_cipherbyname(*args);
|
||||
if(!cipher) {
|
||||
if (!cipher)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Unknown cipher %s\n", *args);
|
||||
badarg = 1;
|
||||
}
|
||||
}
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp(*args,"-v1")) {
|
||||
if (args[1]) {
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp(*args,"-v1"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
pbe_nid=OBJ_txt2nid(*args);
|
||||
if(pbe_nid == NID_undef) {
|
||||
if (pbe_nid == NID_undef)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Unknown PBE algorithm %s\n", *args);
|
||||
badarg = 1;
|
||||
}
|
||||
}
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp(*args,"-inform")) {
|
||||
if (args[1]) {
|
||||
else
|
||||
badarg = 1;
|
||||
}
|
||||
else if (!strcmp(*args,"-inform"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
informat=str2fmt(*args);
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp(*args,"-outform")) {
|
||||
if (args[1]) {
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp(*args,"-outform"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
outformat=str2fmt(*args);
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-topk8")) topk8 = 1;
|
||||
else if (!strcmp (*args, "-noiter")) iter = 1;
|
||||
else if (!strcmp (*args, "-nocrypt")) nocrypt = 1;
|
||||
else if (!strcmp (*args, "-nooct")) p8_broken = PKCS8_NO_OCTET;
|
||||
else if (!strcmp (*args, "-nsdb")) p8_broken = PKCS8_NS_DB;
|
||||
else if (!strcmp (*args, "-embed")) p8_broken = PKCS8_EMBEDDED_PARAM;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-topk8"))
|
||||
topk8 = 1;
|
||||
else if (!strcmp (*args, "-noiter"))
|
||||
iter = 1;
|
||||
else if (!strcmp (*args, "-nocrypt"))
|
||||
nocrypt = 1;
|
||||
else if (!strcmp (*args, "-nooct"))
|
||||
p8_broken = PKCS8_NO_OCTET;
|
||||
else if (!strcmp (*args, "-nsdb"))
|
||||
p8_broken = PKCS8_NS_DB;
|
||||
else if (!strcmp (*args, "-embed"))
|
||||
p8_broken = PKCS8_EMBEDDED_PARAM;
|
||||
else if (!strcmp(*args,"-passin"))
|
||||
{
|
||||
if (!args[1]) goto bad;
|
||||
@ -154,21 +181,30 @@ int MAIN(int argc, char **argv)
|
||||
engine= *(++args);
|
||||
}
|
||||
#endif
|
||||
else if (!strcmp (*args, "-in")) {
|
||||
if (args[1]) {
|
||||
else if (!strcmp (*args, "-in"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
infile = *args;
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-out")) {
|
||||
if (args[1]) {
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp (*args, "-out"))
|
||||
{
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
outfile = *args;
|
||||
} else badarg = 1;
|
||||
} else badarg = 1;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else badarg = 1;
|
||||
args++;
|
||||
}
|
||||
}
|
||||
|
||||
if (badarg) {
|
||||
if (badarg)
|
||||
{
|
||||
bad:
|
||||
BIO_printf(bio_err, "Usage pkcs8 [options]\n");
|
||||
BIO_printf(bio_err, "where options are\n");
|
||||
@ -189,147 +225,199 @@ int MAIN(int argc, char **argv)
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout))
|
||||
{
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
return (1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((pbe_nid == -1) && !cipher) pbe_nid = NID_pbeWithMD5AndDES_CBC;
|
||||
if ((pbe_nid == -1) && !cipher)
|
||||
pbe_nid = NID_pbeWithMD5AndDES_CBC;
|
||||
|
||||
if (infile) {
|
||||
if (!(in = BIO_new_file(infile, "rb"))) {
|
||||
if (infile)
|
||||
{
|
||||
if (!(in = BIO_new_file(infile, "rb")))
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Can't open input file %s\n", infile);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
} else in = BIO_new_fp (stdin, BIO_NOCLOSE);
|
||||
else
|
||||
in = BIO_new_fp (stdin, BIO_NOCLOSE);
|
||||
|
||||
if (outfile) {
|
||||
if (!(out = BIO_new_file (outfile, "wb"))) {
|
||||
if (outfile)
|
||||
{
|
||||
if (!(out = BIO_new_file (outfile, "wb")))
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"Can't open output file %s\n", outfile);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
else
|
||||
{
|
||||
out = BIO_new_fp (stdout, BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
out = BIO_push(tmpbio, out);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (topk8)
|
||||
{
|
||||
BIO_free(in); /* Not needed in this section */
|
||||
pkey = load_key(bio_err, infile, informat, 1,
|
||||
passin, e, "key");
|
||||
if (!pkey) {
|
||||
return (1);
|
||||
}
|
||||
if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
|
||||
if (!pkey)
|
||||
{
|
||||
BIO_free_all(out);
|
||||
return 1;
|
||||
}
|
||||
if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken)))
|
||||
{
|
||||
BIO_printf(bio_err, "Error converting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
if(nocrypt) {
|
||||
if(outformat == FORMAT_PEM)
|
||||
PEM_write_bio_PKCS8_PRIV_KEY_INFO(out, p8inf);
|
||||
else if(outformat == FORMAT_ASN1)
|
||||
i2d_PKCS8_PRIV_KEY_INFO_bio(out, p8inf);
|
||||
else {
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
return (1);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if(passout) p8pass = passout;
|
||||
else {
|
||||
if (nocrypt)
|
||||
{
|
||||
if (outformat == FORMAT_PEM)
|
||||
PEM_write_bio_PKCS8_PRIV_KEY_INFO(out, p8inf);
|
||||
else if (outformat == FORMAT_ASN1)
|
||||
i2d_PKCS8_PRIV_KEY_INFO_bio(out, p8inf);
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (passout)
|
||||
p8pass = passout;
|
||||
else
|
||||
{
|
||||
p8pass = pass;
|
||||
if (EVP_read_pw_string(pass, sizeof pass, "Enter Encryption Password:", 1))
|
||||
{
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
app_RAND_load_file(NULL, bio_err, 0);
|
||||
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
||||
p8pass, strlen(p8pass),
|
||||
NULL, 0, iter, p8inf))) {
|
||||
NULL, 0, iter, p8inf)))
|
||||
{
|
||||
BIO_printf(bio_err, "Error encrypting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
app_RAND_write_file(NULL, bio_err);
|
||||
if(outformat == FORMAT_PEM)
|
||||
if (outformat == FORMAT_PEM)
|
||||
PEM_write_bio_PKCS8(out, p8);
|
||||
else if(outformat == FORMAT_ASN1)
|
||||
else if (outformat == FORMAT_ASN1)
|
||||
i2d_PKCS8_bio(out, p8);
|
||||
else {
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
X509_SIG_free(p8);
|
||||
}
|
||||
}
|
||||
|
||||
PKCS8_PRIV_KEY_INFO_free (p8inf);
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
if (passin)
|
||||
OPENSSL_free(passin);
|
||||
if (passout)
|
||||
OPENSSL_free(passout);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if(nocrypt) {
|
||||
if(informat == FORMAT_PEM)
|
||||
if (nocrypt)
|
||||
{
|
||||
if (informat == FORMAT_PEM)
|
||||
p8inf = PEM_read_bio_PKCS8_PRIV_KEY_INFO(in,NULL,NULL, NULL);
|
||||
else if(informat == FORMAT_ASN1)
|
||||
else if (informat == FORMAT_ASN1)
|
||||
p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(in, NULL);
|
||||
else {
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(informat == FORMAT_PEM)
|
||||
else
|
||||
{
|
||||
if (informat == FORMAT_PEM)
|
||||
p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL);
|
||||
else if(informat == FORMAT_ASN1)
|
||||
else if (informat == FORMAT_ASN1)
|
||||
p8 = d2i_PKCS8_bio(in, NULL);
|
||||
else {
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!p8) {
|
||||
if (!p8)
|
||||
{
|
||||
BIO_printf (bio_err, "Error reading key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
if(passin) p8pass = passin;
|
||||
else {
|
||||
}
|
||||
if (passin)
|
||||
p8pass = passin;
|
||||
else
|
||||
{
|
||||
p8pass = pass;
|
||||
EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0);
|
||||
}
|
||||
}
|
||||
p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass));
|
||||
X509_SIG_free(p8);
|
||||
}
|
||||
}
|
||||
|
||||
if (!p8inf) {
|
||||
if (!p8inf)
|
||||
{
|
||||
BIO_printf(bio_err, "Error decrypting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
|
||||
if (!(pkey = EVP_PKCS82PKEY(p8inf)))
|
||||
{
|
||||
BIO_printf(bio_err, "Error converting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (p8inf->broken) {
|
||||
if (p8inf->broken)
|
||||
{
|
||||
BIO_printf(bio_err, "Warning: broken key encoding: ");
|
||||
switch (p8inf->broken) {
|
||||
switch (p8inf->broken)
|
||||
{
|
||||
case PKCS8_NO_OCTET:
|
||||
BIO_printf(bio_err, "No Octet String in PrivateKey\n");
|
||||
break;
|
||||
@ -349,21 +437,24 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
if(outformat == FORMAT_PEM)
|
||||
if (outformat == FORMAT_PEM)
|
||||
PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL, passout);
|
||||
else if(outformat == FORMAT_ASN1)
|
||||
else if (outformat == FORMAT_ASN1)
|
||||
i2d_PrivateKey_bio(out, pkey);
|
||||
else {
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err, "Bad format specified for key\n");
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
EVP_PKEY_free(pkey);
|
||||
BIO_free_all(out);
|
||||
BIO_free(in);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
if (passin)
|
||||
OPENSSL_free(passin);
|
||||
if (passout)
|
||||
OPENSSL_free(passout);
|
||||
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
118
crypto/openssl/apps/prime.c
Normal file
118
crypto/openssl/apps/prime.c
Normal file
@ -0,0 +1,118 @@
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "apps.h"
|
||||
#include <openssl/bn.h>
|
||||
|
||||
|
||||
#undef PROG
|
||||
#define PROG prime_main
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int hex=0;
|
||||
int checks=20;
|
||||
BIGNUM *bn=NULL;
|
||||
BIO *bio_out=NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
if (bio_out == NULL)
|
||||
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
||||
{
|
||||
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
{
|
||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||
bio_out = BIO_push(tmpbio, bio_out);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
--argc;
|
||||
++argv;
|
||||
while (argc >= 1 && **argv == '-')
|
||||
{
|
||||
if(!strcmp(*argv,"-hex"))
|
||||
hex=1;
|
||||
else if(!strcmp(*argv,"-checks"))
|
||||
if(--argc < 1)
|
||||
goto bad;
|
||||
else
|
||||
checks=atoi(*++argv);
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"Unknown option '%s'\n",*argv);
|
||||
bad:
|
||||
BIO_printf(bio_err,"options are\n");
|
||||
BIO_printf(bio_err,"%-14s hex\n","-hex");
|
||||
BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
|
||||
exit(1);
|
||||
}
|
||||
--argc;
|
||||
++argv;
|
||||
}
|
||||
|
||||
if(hex)
|
||||
BN_hex2bn(&bn,argv[0]);
|
||||
else
|
||||
BN_dec2bn(&bn,argv[0]);
|
||||
|
||||
BN_print(bio_out,bn);
|
||||
BIO_printf(bio_out," is %sprime\n",
|
||||
BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
|
||||
|
||||
return 0;
|
||||
}
|
@ -35,6 +35,7 @@ extern int pkcs8_main(int argc,char *argv[]);
|
||||
extern int spkac_main(int argc,char *argv[]);
|
||||
extern int smime_main(int argc,char *argv[]);
|
||||
extern int rand_main(int argc,char *argv[]);
|
||||
extern int prime_main(int argc,char *argv[]);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
extern int engine_main(int argc,char *argv[]);
|
||||
#endif
|
||||
@ -115,6 +116,7 @@ FUNCTION functions[] = {
|
||||
{FUNC_TYPE_GENERAL,"spkac",spkac_main},
|
||||
{FUNC_TYPE_GENERAL,"smime",smime_main},
|
||||
{FUNC_TYPE_GENERAL,"rand",rand_main},
|
||||
{FUNC_TYPE_GENERAL,"prime",prime_main},
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
{FUNC_TYPE_GENERAL,"engine",engine_main},
|
||||
#endif
|
||||
|
@ -831,7 +831,9 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end;
|
||||
if (!rand_serial(NULL,
|
||||
X509_get_serialNumber(x509ss)))
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
|
||||
|
@ -168,7 +168,7 @@ int MAIN(int argc, char **argv)
|
||||
char *CAkeyfile=NULL,*CAserial=NULL;
|
||||
char *alias=NULL;
|
||||
int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0;
|
||||
int ocspid=0;
|
||||
int next_serial=0,ocspid=0;
|
||||
int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0;
|
||||
int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0;
|
||||
int C=0;
|
||||
@ -371,6 +371,8 @@ int MAIN(int argc, char **argv)
|
||||
email= ++num;
|
||||
else if (strcmp(*argv,"-serial") == 0)
|
||||
serial= ++num;
|
||||
else if (strcmp(*argv,"-next_serial") == 0)
|
||||
next_serial= ++num;
|
||||
else if (strcmp(*argv,"-modulus") == 0)
|
||||
modulus= ++num;
|
||||
else if (strcmp(*argv,"-pubkey") == 0)
|
||||
@ -591,12 +593,16 @@ int MAIN(int argc, char **argv)
|
||||
if ((x=X509_new()) == NULL) goto end;
|
||||
ci=x->cert_info;
|
||||
|
||||
if (sno)
|
||||
if (sno == NULL)
|
||||
{
|
||||
if (!X509_set_serialNumber(x, sno))
|
||||
sno = ASN1_INTEGER_new();
|
||||
if (!sno || !rand_serial(NULL, sno))
|
||||
goto end;
|
||||
}
|
||||
else if (!ASN1_INTEGER_set(X509_get_serialNumber(x),0)) goto end;
|
||||
|
||||
if (!X509_set_serialNumber(x, sno))
|
||||
goto end;
|
||||
|
||||
if (!X509_set_issuer_name(x,req->req_info->subject)) goto end;
|
||||
if (!X509_set_subject_name(x,req->req_info->subject)) goto end;
|
||||
|
||||
@ -617,7 +623,7 @@ int MAIN(int argc, char **argv)
|
||||
if (xca == NULL) goto end;
|
||||
}
|
||||
|
||||
if (!noout || text)
|
||||
if (!noout || text || next_serial)
|
||||
{
|
||||
OBJ_create("2.99999.3",
|
||||
"SET.ex3","SET x509v3 extension 3");
|
||||
@ -691,6 +697,24 @@ int MAIN(int argc, char **argv)
|
||||
i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber);
|
||||
BIO_printf(STDout,"\n");
|
||||
}
|
||||
else if (next_serial == i)
|
||||
{
|
||||
BIGNUM *bnser;
|
||||
ASN1_INTEGER *ser;
|
||||
ser = X509_get_serialNumber(x);
|
||||
bnser = ASN1_INTEGER_to_BN(ser, NULL);
|
||||
if (!bnser)
|
||||
goto end;
|
||||
if (!BN_add_word(bnser, 1))
|
||||
goto end;
|
||||
ser = BN_to_ASN1_INTEGER(bnser, NULL);
|
||||
if (!ser)
|
||||
goto end;
|
||||
BN_free(bnser);
|
||||
i2a_ASN1_INTEGER(out, ser);
|
||||
ASN1_INTEGER_free(ser);
|
||||
BIO_puts(out, "\n");
|
||||
}
|
||||
else if (email == i)
|
||||
{
|
||||
int j;
|
||||
@ -1047,13 +1071,6 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create
|
||||
}
|
||||
else
|
||||
BUF_strlcpy(buf,serialfile,len);
|
||||
serial=BN_new();
|
||||
bs=ASN1_INTEGER_new();
|
||||
if ((serial == NULL) || (bs == NULL))
|
||||
{
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
serial = load_serial(buf, create, NULL);
|
||||
if (serial == NULL) goto end;
|
||||
|
23
crypto/openssl/certs/eng1.pem
Normal file
23
crypto/openssl/certs/eng1.pem
Normal file
@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9CYW5rRW5n
|
||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
|
||||
aW9uMRMwEQYDVQQDEwpiYW5rZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBiYW5r
|
||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
|
||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
|
||||
BAoTD0JhbmtFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
|
||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmJhbmtlbmdpbmUxIDAeBgkqhkiG9w0B
|
||||
CQEWEWNhQGJhbmtlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
||||
CgKCAQEA14LoTUAl1/hEy+Kh1kLHiBdW2zD3V4IhM7xxTVKsYsIH56nr69ATTIxU
|
||||
P36eRzeZ137qt1AxHFjDCidk3m1Ul6l59ProPexdslLLM2npM3f2cteg+toyiYiS
|
||||
EJKjyzIu1xF1j9qzGkymSY/4DsXLZNk9FaczxMk/Ooc6Os1M3AverL4VG4rYIb6f
|
||||
eR32cIKJ9Q1fGuyKk7ipq1XQfPW8a8TgZdbHbe7U9Gk3iasGMHHvpR9Ep3mGbgdT
|
||||
uQ98SBEuIwe1BUCGg/MXpVy48MNXfAMotBgGw4pl9yqSjMni2FB+E9Q9DHFs2RgX
|
||||
MqzKuo8zcPxKx2kZ6Arj8+27dw2clQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
|
||||
CSqGSIb3DQEBBQUAA4IBAQBauupHX9EhpC/r57d6b5kkeWvognxIP9//TO4iw3qb
|
||||
zIXEkPXmJmwVzlzoKJWqiya+aw19SP0+G6CzsFOBo/9ehmz+hZ8bhYX4MjlWzX5u
|
||||
Tnkhz172j9fOBUmrTVPkcRIs6zjCD5PQAGoBPP1/Zdy2N36lZ0U7lg07Opirj/yJ
|
||||
PSJeM2j0fwIFAroiVckvdT0BVwB6S/cPaAQGPghbbr1YGSmYrMriSv825ILJUfxz
|
||||
rJYunGR9FiY9Ob7+jwJwiZMS4CxSPktutxr/3hOvr1+ALS7IcVakhhA3PuZAJbdH
|
||||
FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA
|
||||
-----END CERTIFICATE-----
|
23
crypto/openssl/certs/eng2.pem
Normal file
23
crypto/openssl/certs/eng2.pem
Normal file
@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9DZXJ0RW5n
|
||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
|
||||
aW9uMRMwEQYDVQQDEwpjZXJ0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBjZXJ0
|
||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
|
||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
|
||||
BAoTD0NlcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
|
||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmNlcnRlbmdpbmUxIDAeBgkqhkiG9w0B
|
||||
CQEWEWNhQGNlcnRlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
||||
CgKCAQEA7aTXURShaeVt9u/dP3Q2dVib3jTCZvEyc6yfpGgaYWewXWuP4HOSfI4h
|
||||
GZblbpl+dzJc6RjhR+pguIRtbT5FJB8SJGjRqoujBEOQOxtVtc2fjM9Dqh0iOvMW
|
||||
WS6buxHG55GVrHAQaO5HXEScKQBa9ZyNmpSXPTEBrDMej1OAGOkc524/TZrgFPF4
|
||||
AiJLLkxCcP8NuzUKlW3WzNMSSoCtjkUKy4wjSLlAWCFM0T9Df6/+Z8ZUQTzHoKCD
|
||||
ncH5Qnynd7DlOwKQ2JwwxRhYGiGVTUN0GUq7qA11kW3+vnbFesKQXoF6o2PVx9s2
|
||||
YXviI2NXXUjZ0pVnsnFCc45Pm8XojwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
|
||||
CSqGSIb3DQEBBQUAA4IBAQBP/aHOKJ00Akzc9HWM1X30hlWZFBaQi4pqD4Uhk8+p
|
||||
KzzwFP5DRLBOz8TYBbtdXrS6hxVMr2sqWmhVkuyepWhHZazKGyHY/y0FbOXsewAV
|
||||
1QxxSyx7ve89pCKv4/w0rQcP916iHc8Y/TCpmz7eITa3GId+8H/XTaBi8GBp9X9O
|
||||
w8m25FmEB1NT+eJwefvfdKowjy4tSorKdW/eJspxNuTSRGmUy8G71W5dYvgpAlx6
|
||||
mdnHyzxEGvRYNNI2bS0ifXgbEFNWqSas9q34ea5KOpkJu8T/KyXfSb6rPOsBSb0t
|
||||
wMowwGtCVH2C4Lw/8zo0EjhMpTOsPaub408PrZ+NQ2bl
|
||||
-----END CERTIFICATE-----
|
34
crypto/openssl/certs/eng3.pem
Normal file
34
crypto/openssl/certs/eng3.pem
Normal file
@ -0,0 +1,34 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF3TCCA8WgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9Gb3J0RW5n
|
||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
|
||||
aW9uMRMwEQYDVQQDEwpmb3J0ZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBmb3J0
|
||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
|
||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
|
||||
BAoTD0ZvcnRFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
|
||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCmZvcnRlbmdpbmUxIDAeBgkqhkiG9w0B
|
||||
CQEWEWNhQGZvcnRlbmdpbmUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
|
||||
CgKCAgEAyr7GbpwDxx1v3EYbo0gcO+ligEhlDqG2e7u/AbWGoVAqc8+q6auUJUtz
|
||||
4i7oh0yNadu1o9kpXW+znkgO0zlrgjGskqqMO1ooppzTJdFy/P8gR6x1Iuv3kWtX
|
||||
OuzwPPEjv09LWlhyJsN+oU4ztTVf07I0Q9zYupcoDQ58XKRheI9KdDB2DYSmxywA
|
||||
WSLQwIeG0Qa7gvokeQlpkgkEC7viEecJ3752KXBJHnh7As51mxnlpmG6sDy67Eli
|
||||
HDw5tHETRqbtnscGBjskGQBqR5xt7+QnnthZrN8HJHDoa9zgGephwizhkL44lXLF
|
||||
YK9W5XhFbblw2c+mAcHkokRiwD7CPeIoyD2a/Jcw3n5hegKTlNhd4BFGVF6JR7gF
|
||||
OFk2QfHXit5uthsij9Xhl7WAgQUqLgggD9MphqPf4nY66OZUJV9ZsmB+Qfp8UizB
|
||||
0WAOegactKVyRqHtRa+KIEXQXNtZgjcmMk9CYkP0nIbKtgKXaH6+9VMHNOryCnFE
|
||||
7pSsuPUkypncFWCHGSeiFO3w4w4J4csltxBADQzxfRu5KZnlToQN7bVpI/Q31tVX
|
||||
E5bjrJcq6Oj/OTqZ3ID+OqbkUdAg0ggjRKcTgxnLHd/AbMzJ6PsclDDf7cLs0WSl
|
||||
xMxQR/z5bNST1rNtT9rsiv2TOhfvCBxO9AOjBioO8PLO032HTNECAwEAAaMQMA4w
|
||||
DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAgEAVyBpPWfT2VOyvVpslGKx
|
||||
8h0+CWP8cilygGRtZJ5dAJzc//1REAHdvK+TgZ4Foz3dqHhXI+RNN0FpzuWaYMjW
|
||||
ZTS0kAmcOQuGY1Oo4PGlPHI21pNz29oFDTJr0ZmLBJ4JKVsE2soJg55jdk9MZHA7
|
||||
K//7HH9RsmrWZOE5DZDlrxp6+naixhMwnlPKKisIy9GNZUPqGdUWABMdB/BUVVNl
|
||||
NU5TtWpIXUClMd8a+eoKcItBeYXowkHOBpinPkDX3clFDIUfWiw0Ro08s8SrrFqR
|
||||
8Szwbrj52Xv1RM56oGqCjnkvJctxihODV7NcpxoAFjIZokDom0q6zPrrTUsLFQov
|
||||
Plovc3w5hmALiDMshaTvE1nm3Psn4yQ+FlRE8epTZrQiIGypZkZC6lcz0mYawueW
|
||||
cThYWGFhVG4ktQzOjjNRsNxopW+W7cF1zQTxiWUDnxIKSj7gtdQ2jiubxEEhfVag
|
||||
r8DMtAccNVTZVURpGi56TptOOuotrTqqC+2GviW4hlxvdvmuQN0OlXlUwzz2Trxc
|
||||
FamNnuA54lZw/8arLtxsFmHrcnPw53+1spumLD0S5UkxHNu40h6LIVpZz3H+0rLz
|
||||
uFofTfiyMjcfK2AyHQTgUCbsrvgNuLDQUbyFGVchdFUkhztX3DhEVnxnnrpY4BVj
|
||||
QdTqWIvw7lGlSuDCjxEQAOc=
|
||||
-----END CERTIFICATE-----
|
23
crypto/openssl/certs/eng4.pem
Normal file
23
crypto/openssl/certs/eng4.pem
Normal file
@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBqDELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRgwFgYDVQQKEw9NYWlsRW5n
|
||||
aW5lIEluYy4xKTAnBgNVBAsTIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IERpdmlz
|
||||
aW9uMRMwEQYDVQQDEwptYWlsZW5naW5lMSAwHgYJKoZIhvcNAQkBFhFjYUBtYWls
|
||||
ZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBaMIGoMQsw
|
||||
CQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8xGDAWBgNV
|
||||
BAoTD01haWxFbmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRo
|
||||
b3JpdHkgRGl2aXNpb24xEzARBgNVBAMTCm1haWxlbmdpbmUxIDAeBgkqhkiG9w0B
|
||||
CQEWEWNhQG1haWxlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
||||
CgKCAQEAqXmfsU+lx+NFmn6tN17RTOyaddHqLnr/3rzEDIyT9TN+tF9TG7jmK7lJ
|
||||
Jrj5arQ3nTFaLF8JuND2U1z/cLPw6/TX+1tE3v3CNUDSjaisyUDiUyp3TE8hMMMz
|
||||
zfZQn0JsGgNhhWxqyzjhRQGtKL4+xtn8VsF/8zGgZYke7nlmVKz/FslDFTnNoodL
|
||||
BAEGiu9JQS9qqpbSs20NdZ6LXPL2A4iTjnsNFBW3jIMVIn/JVVyaycU7ue2oFviD
|
||||
vLNpkVZcR7A+jjIdIumOc5VSF0y7y74cQC5YwkR2mLK7UBYDK6NCY3ta/C4M8NsM
|
||||
0FpmvRl0+A1ivZtVwqI98dxDtp7HeQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0G
|
||||
CSqGSIb3DQEBBQUAA4IBAQAjfNn5BCzxylBDakFQGWKE/P43PRibMOEzfd7+DzbY
|
||||
WIekoz3i00DwoH3b6j4gwlDJRAOq4dF6/Pt/uBOHDo/op+ef+9ErmKPd+ehXN9h3
|
||||
7QbccTgz7DtVwA4iRlDRLru+JuXzT+OsCHuFZMOLJ+KD2JAGh3W68JjdcLkrlcpt
|
||||
AU0wc5aOHPPfEBdIah8y8QtNzXRVzoBt8zzvgCARkXxTS2u/9QaXR1hML0JtDgQS
|
||||
SdZ6Kd8SN6yzqxD+buYD5sOfJmjBF/n3lqFHNMHnnGXy2TAXZtIAWzffU3A0cGPB
|
||||
N6FZ026a86HbF1X4k+xszhbJu/ikczyuWnCJIg3fTYSD
|
||||
-----END CERTIFICATE-----
|
23
crypto/openssl/certs/eng5.pem
Normal file
23
crypto/openssl/certs/eng5.pem
Normal file
@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID6TCCAtGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgTAk9OMRAwDgYDVQQHEwdUb3JvbnRvMRowGAYDVQQKExFUcmFkZXJF
|
||||
bmdpbmUgSW5jLjEpMCcGA1UECxMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRGl2
|
||||
aXNpb24xFTATBgNVBAMTDHRyYWRlcmVuZ2luZTEiMCAGCSqGSIb3DQEJARYTY2FA
|
||||
dHJhZGVyZW5naW5lLmNvbTAeFw05ODAxMDEwMDAwMDBaFw0zODAxMTcwMDAwMDBa
|
||||
MIGuMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xEDAOBgNVBAcTB1Rvcm9udG8x
|
||||
GjAYBgNVBAoTEVRyYWRlckVuZ2luZSBJbmMuMSkwJwYDVQQLEyBDZXJ0aWZpY2F0
|
||||
aW9uIEF1dGhvcml0eSBEaXZpc2lvbjEVMBMGA1UEAxMMdHJhZGVyZW5naW5lMSIw
|
||||
IAYJKoZIhvcNAQkBFhNjYUB0cmFkZXJlbmdpbmUuY29tMIIBIjANBgkqhkiG9w0B
|
||||
AQEFAAOCAQ8AMIIBCgKCAQEAzyX5QE+5SN+zgNn1v3zp9HmP4hQOWW8WuEVItZVP
|
||||
9bt/xj5NeJd1kyPL/SqnF2qHcL3o/74r0Ga55aKHniwKYgQTlp5ELGfQ568QQeN9
|
||||
xNIHtUXeStI9zCNZyZC+4YqObdMR/ivKA/WsLfUVMl2lV5JzJJz1BOE0gKEYiEyz
|
||||
gIq5oLzkP/mOXoHRvWSZD2D0eHYIO7ovV2epVFK7g7p+dC4QoeIUEli+GF/Myg88
|
||||
dV/qmi+Sybck2RLPXa8Nh27/ETVQ7kE1Eafmx7EyCqIhG+5lwJAy3HwHUBwAYuzj
|
||||
iuZz5lD8aQmr8SKuvy3eOH9SVN5wh3YBlrNGwTStkESVLwIDAQABoxAwDjAMBgNV
|
||||
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAWOPAUhZd3x9EQiFJcuxFTMd9q
|
||||
axgcriCzJsM6D96sYGko9xTeLhX/lr1bliVYI5AlupoLXAdMzGHJkOgaTirKjQXr
|
||||
F9nymDdUWKe3TmwGob5016nQlH7qRKvGO3hka0rOGRK2U/2JT/4Qp8iH/DFi6cyM
|
||||
uP0q8n64SAkxZXLzUuFQXqf7U/SNjzb9XJQEIAdjp7eYd3Qb4jDsDcX0FrKMF1aV
|
||||
r0dCDnS7am7WTXPYCDGdSkPgEHEtLYIYH3lZp5sKdVZ9wl4F0WNFkRWRUr7AXPjw
|
||||
50uLmUNmKCd8JZLMGA1TRNSTi7U9EcrWt0OkMWm74T2WVnAgNsDv2WrWsGfj
|
||||
-----END CERTIFICATE-----
|
1
crypto/openssl/comm.txt
Normal file
1
crypto/openssl/comm.txt
Normal file
@ -0,0 +1 @@
|
||||
New dev version.
|
1
crypto/openssl/comms.txt
Normal file
1
crypto/openssl/comms.txt
Normal file
@ -0,0 +1 @@
|
||||
Fix for ASN1 parsing bugs.
|
@ -23,6 +23,7 @@
|
||||
PREFIX=""
|
||||
SUFFIX=""
|
||||
TEST="false"
|
||||
EXE=""
|
||||
|
||||
# pick up any command line args to config
|
||||
for i
|
||||
@ -288,6 +289,14 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "${MACHINE}-whatever-sysv4"; exit 0
|
||||
;;
|
||||
|
||||
VOS:*:*:i786)
|
||||
echo "i386-stratus-vos"; exit 0
|
||||
;;
|
||||
|
||||
VOS:*:*:*)
|
||||
echo "hppa1.1-stratus-vos"; exit 0
|
||||
;;
|
||||
|
||||
*:4*:R4*:m88k)
|
||||
echo "${MACHINE}-whatever-sysv4"; exit 0
|
||||
;;
|
||||
@ -679,6 +688,10 @@ EOF
|
||||
*-*-UnixWare21*) OUT="unixware-2.1" ;;
|
||||
*-*-Unixware20*) OUT="unixware-2.0" ;;
|
||||
*-*-Unixware21*) OUT="unixware-2.1" ;;
|
||||
*-*-vos)
|
||||
options="$options no-threads no-shared no-asm no-dso"
|
||||
EXE=".pm"
|
||||
OUT="vos-$CC" ;;
|
||||
BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
|
||||
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
||||
*-siemens-sysv4) OUT="SINIX" ;;
|
||||
@ -806,8 +819,8 @@ fi
|
||||
|
||||
if [ ".$PERL" = . ] ; then
|
||||
for i in . `echo $PATH | sed 's/:/ /g'`; do
|
||||
if [ -f "$i/perl5" ] ; then
|
||||
PERL="$i/perl5"
|
||||
if [ -f "$i/perl5$EXE" ] ; then
|
||||
PERL="$i/perl5$EXE"
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
@ -815,9 +828,9 @@ fi
|
||||
|
||||
if [ ".$PERL" = . ] ; then
|
||||
for i in . `echo $PATH | sed 's/:/ /g'`; do
|
||||
if [ -f "$i/perl" ] ; then
|
||||
if "$i/perl" -e 'exit($]<5.0)'; then
|
||||
PERL="$i/perl"
|
||||
if [ -f "$i/perl$EXE" ] ; then
|
||||
if "$i/perl$EXE" -e 'exit($]<5.0)'; then
|
||||
PERL="$i/perl$EXE"
|
||||
break;
|
||||
fi;
|
||||
fi;
|
||||
|
217
crypto/openssl/crypto/Makefile
Normal file
217
crypto/openssl/crypto/Makefile
Normal file
@ -0,0 +1,217 @@
|
||||
#
|
||||
# SSLeay/crypto/Makefile
|
||||
#
|
||||
|
||||
DIR= crypto
|
||||
TOP= ..
|
||||
CC= cc
|
||||
INCLUDE= -I. -I$(TOP) -I../include
|
||||
INCLUDES= -I.. -I../.. -I../../include
|
||||
CFLAG= -g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP= /usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
RM= rm -f
|
||||
AR= ar r
|
||||
|
||||
PEX_LIBS=
|
||||
EX_LIBS=
|
||||
|
||||
CFLAGS= $(INCLUDE) $(CFLAG)
|
||||
|
||||
|
||||
LIBS=
|
||||
|
||||
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||
des rc2 rc4 rc5 idea bf cast \
|
||||
bn ec rsa dsa dh dso engine aes \
|
||||
buffer bio stack lhash rand err objects \
|
||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||
|
||||
GENERAL=Makefile README crypto-lib.com install.com
|
||||
|
||||
LIB= $(TOP)/libcrypto.a
|
||||
SHARED_LIB= libcrypto$(SHLIB_EXT)
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
|
||||
ossl_typ.h
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
@(cd ..; $(MAKE) DIRS=$(DIR) all)
|
||||
|
||||
all: shared
|
||||
|
||||
buildinf.h: ../Makefile
|
||||
( echo "#ifndef MK1MF_BUILD"; \
|
||||
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
|
||||
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
||||
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||
echo '#endif' ) >buildinf.h
|
||||
|
||||
testapps:
|
||||
if echo ${SDIRS} | fgrep ' des '; \
|
||||
then cd des && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' des; fi
|
||||
cd pkcs7 && $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' testapps
|
||||
|
||||
subdirs:
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making all in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
|
||||
done;
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making 'files' in crypto/$$i..." && \
|
||||
$(MAKE) PERL='${PERL}' files ); \
|
||||
done;
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
|
||||
@for i in $(SDIRS); do \
|
||||
(cd $$i && echo "making links in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \
|
||||
done;
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
shared: buildinf.h lib subdirs
|
||||
if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
(cd ..; $(MAKE) $(SHARED_LIB)); \
|
||||
fi
|
||||
|
||||
libs:
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making libs in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
|
||||
done;
|
||||
|
||||
tests:
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making tests in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
|
||||
done;
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making install in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
|
||||
done;
|
||||
|
||||
lint:
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making lint in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
|
||||
done;
|
||||
|
||||
depend:
|
||||
if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
if [ ! -s buildinf.h ]; then rm buildinf.h; fi
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making depend in crypto/$$i..." && \
|
||||
$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
|
||||
done;
|
||||
|
||||
clean:
|
||||
rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making clean in crypto/$$i..." && \
|
||||
$(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
|
||||
done;
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i && echo "making dclean in crypto/$$i..." && \
|
||||
$(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
|
||||
done;
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
|
||||
cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
|
||||
cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
|
||||
cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
|
||||
cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
|
||||
ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
|
||||
ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
|
||||
mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
|
||||
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
|
||||
mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
|
||||
o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
|
||||
o_str.o: o_str.h
|
||||
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
||||
o_time.o: o_time.h
|
||||
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
|
||||
tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
|
||||
tmdiff.o: tmdiff.c
|
||||
uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
|
||||
uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
uid.o: ../include/openssl/symhacks.h uid.c
|
102
crypto/openssl/crypto/aes/Makefile
Normal file
102
crypto/openssl/crypto/aes/Makefile
Normal file
@ -0,0 +1,102 @@
|
||||
#
|
||||
# crypto/aes/Makefile
|
||||
#
|
||||
|
||||
DIR= aes
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP= /usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
#TEST=aestest.c
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c aes_ctr.c
|
||||
LIBOBJ=aes_core.o aes_misc.o aes_ecb.o aes_cbc.o aes_cfb.o aes_ofb.o aes_ctr.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= aes.h
|
||||
HEADER= aes_locl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
$(LIBOBJ): $(LIBSRC)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install: installs
|
||||
|
||||
installs:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
|
||||
aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.h
|
||||
aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_core.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h
|
||||
aes_core.o: aes_core.c aes_locl.h
|
||||
aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.h
|
||||
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
|
||||
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_misc.o: ../../include/openssl/opensslconf.h
|
||||
aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c
|
||||
aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
|
||||
aes_ofb.o: ../../include/openssl/opensslconf.h aes_locl.h aes_ofb.c
|
@ -52,6 +52,8 @@
|
||||
#ifndef HEADER_AES_H
|
||||
#define HEADER_AES_H
|
||||
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
#ifdef OPENSSL_NO_AES
|
||||
#error AES is disabled.
|
||||
#endif
|
||||
@ -64,6 +66,10 @@
|
||||
#define AES_MAXNR 14
|
||||
#define AES_BLOCK_SIZE 16
|
||||
|
||||
#if defined(OPENSSL_FIPS)
|
||||
#define FIPS_AES_SIZE_T int
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -95,6 +101,15 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
|
||||
const int nbits,const AES_KEY *key,
|
||||
unsigned char *ivec,const int enc);
|
||||
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
|
@ -155,3 +155,96 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
*num=n;
|
||||
}
|
||||
|
||||
/* This expects a single block of size nbits for both in and out. Note that
|
||||
it corrupts any extra bits in the last byte of out */
|
||||
/* Untested, once it is working, it will be optimised */
|
||||
void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
|
||||
const int nbits,const AES_KEY *key,
|
||||
unsigned char *ivec,const int enc)
|
||||
{
|
||||
int n;
|
||||
unsigned char ovec[AES_BLOCK_SIZE*2];
|
||||
|
||||
assert(in && out && key && ivec);
|
||||
if(enc)
|
||||
{
|
||||
/* construct the new IV */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* encrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* and put the ciphertext in the second half */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,out,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* construct the new IV in the first half of ovec */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* decrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* append the ciphertext */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,in,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
/* it is not necessary to cleanse ovec, since the IV is not secret */
|
||||
}
|
||||
|
||||
/* N.B. This expects the input to be packed, MS bit first */
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
assert(in && out && key && ivec && num);
|
||||
assert(*num == 0);
|
||||
|
||||
memset(out,0,(length+7)/8);
|
||||
for(n=0 ; n < length ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
AES_cfbr_encrypt_block(c,d,1,key,ivec,enc);
|
||||
out[n/8]=(out[n/8]&~(1 << (7-n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
}
|
||||
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
assert(in && out && key && ivec && num);
|
||||
assert(*num == 0);
|
||||
|
||||
for(n=0 ; n < length ; ++n)
|
||||
AES_cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc);
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/fips.h>
|
||||
#include "aes_locl.h"
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
/*
|
||||
Te0[x] = S [x].[02, 01, 01, 03];
|
||||
Te1[x] = S [x].[03, 02, 01, 01];
|
||||
@ -1255,3 +1258,4 @@ void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
PUTU32(out + 12, s3);
|
||||
}
|
||||
|
||||
#endif /* ndef OPENSSL_FIPS */
|
||||
|
@ -59,7 +59,7 @@
|
||||
#include <openssl/aes.h>
|
||||
#include "aes_locl.h"
|
||||
|
||||
/* NOTE: CTR mode is big-endian. The rest of the AES code
|
||||
/* NOTE: the IV/counter CTR mode is big-endian. The rest of the AES code
|
||||
* is endian-neutral. */
|
||||
|
||||
/* increment counter (128-bit int) by 1 */
|
||||
@ -67,61 +67,36 @@ static void AES_ctr128_inc(unsigned char *counter) {
|
||||
unsigned long c;
|
||||
|
||||
/* Grab bottom dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 0);
|
||||
c++;
|
||||
PUTU32(counter + 0, c);
|
||||
#else
|
||||
c = GETU32(counter + 12);
|
||||
c++;
|
||||
c++; c &= 0xFFFFFFFF;
|
||||
PUTU32(counter + 12, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
if (c)
|
||||
return;
|
||||
|
||||
/* Grab 1st dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 4);
|
||||
c++;
|
||||
PUTU32(counter + 4, c);
|
||||
#else
|
||||
c = GETU32(counter + 8);
|
||||
c++;
|
||||
c++; c &= 0xFFFFFFFF;
|
||||
PUTU32(counter + 8, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
if (c)
|
||||
return;
|
||||
|
||||
/* Grab 2nd dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 8);
|
||||
c++;
|
||||
PUTU32(counter + 8, c);
|
||||
#else
|
||||
c = GETU32(counter + 4);
|
||||
c++;
|
||||
c++; c &= 0xFFFFFFFF;
|
||||
PUTU32(counter + 4, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
if (c)
|
||||
return;
|
||||
|
||||
/* Grab top dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 12);
|
||||
c++;
|
||||
PUTU32(counter + 12, c);
|
||||
#else
|
||||
c = GETU32(counter + 0);
|
||||
c++;
|
||||
c++; c &= 0xFFFFFFFF;
|
||||
PUTU32(counter + 0, c);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* The input encrypted as though 128bit counter mode is being
|
||||
|
@ -62,7 +62,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(OPENSSL_SYS_WINCE)
|
||||
#if defined(_MSC_VER) && !defined(_M_IA64) && !defined(OPENSSL_SYS_WINCE)
|
||||
# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
|
||||
# define GETU32(p) SWAP(*((u32 *)(p)))
|
||||
# define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); }
|
||||
|
1150
crypto/openssl/crypto/asn1/Makefile
Normal file
1150
crypto/openssl/crypto/asn1/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,26 @@ ASN1_INTEGER *ASN1_INTEGER_dup(ASN1_INTEGER *x)
|
||||
{ return M_ASN1_INTEGER_dup(x);}
|
||||
|
||||
int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y)
|
||||
{ return M_ASN1_INTEGER_cmp(x,y);}
|
||||
{
|
||||
int neg, ret;
|
||||
/* Compare signs */
|
||||
neg = x->type & V_ASN1_NEG;
|
||||
if (neg != (y->type & V_ASN1_NEG))
|
||||
{
|
||||
if (neg)
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = ASN1_STRING_cmp(x, y);
|
||||
|
||||
if (neg)
|
||||
return -ret;
|
||||
else
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This converts an ASN1 INTEGER into its content encoding.
|
||||
|
@ -3,7 +3,7 @@
|
||||
* project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 2000-2004 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -553,7 +553,12 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
if((type < 0) || (type > 30)) return -1;
|
||||
mbflag = tag2nbyte[type];
|
||||
if(mbflag == -1) return -1;
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
if (mbflag == 0)
|
||||
mbflag = MBSTRING_UTF8;
|
||||
else if (mbflag == 4)
|
||||
mbflag = MBSTRING_UNIV;
|
||||
else
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
stmp.data = NULL;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* p5_pbev2.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 1999.
|
||||
* project 1999-2004.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
@ -113,7 +113,8 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
|
||||
if(!(scheme->parameter = ASN1_TYPE_new())) goto merr;
|
||||
|
||||
/* Create random IV */
|
||||
if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0)
|
||||
if (EVP_CIPHER_iv_length(cipher) &&
|
||||
RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0)
|
||||
goto err;
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
@ -123,6 +124,7 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
|
||||
if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
|
||||
ASN1err(ASN1_F_PKCS5_PBE2_SET,
|
||||
ASN1_R_ERROR_SETTING_CIPHER_PARAMS);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
goto err;
|
||||
}
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
|
@ -63,8 +63,6 @@
|
||||
|
||||
static int X509_REVOKED_cmp(const X509_REVOKED * const *a,
|
||||
const X509_REVOKED * const *b);
|
||||
static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a,
|
||||
const X509_REVOKED * const *b);
|
||||
|
||||
ASN1_SEQUENCE(X509_REVOKED) = {
|
||||
ASN1_SIMPLE(X509_REVOKED,serialNumber, ASN1_INTEGER),
|
||||
@ -72,43 +70,28 @@ ASN1_SEQUENCE(X509_REVOKED) = {
|
||||
ASN1_SEQUENCE_OF_OPT(X509_REVOKED,extensions, X509_EXTENSION)
|
||||
} ASN1_SEQUENCE_END(X509_REVOKED)
|
||||
|
||||
/* The X509_CRL_INFO structure needs a bit of customisation. This is actually
|
||||
* mirroring the old behaviour: its purpose is to allow the use of
|
||||
* sk_X509_REVOKED_find to lookup revoked certificates. Unfortunately
|
||||
* this will zap the original order and the signature so we keep a copy
|
||||
* of the original positions and reorder appropriately before encoding.
|
||||
*
|
||||
* Might want to see if there's a better way of doing this later...
|
||||
/* The X509_CRL_INFO structure needs a bit of customisation.
|
||||
* Since we cache the original encoding the signature wont be affected by
|
||||
* reordering of the revoked field.
|
||||
*/
|
||||
static int crl_inf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
|
||||
{
|
||||
X509_CRL_INFO *a = (X509_CRL_INFO *)*pval;
|
||||
int i;
|
||||
int (*old_cmp)(const X509_REVOKED * const *,
|
||||
const X509_REVOKED * const *);
|
||||
|
||||
if(!a || !a->revoked) return 1;
|
||||
switch(operation) {
|
||||
|
||||
/* Save original order */
|
||||
/* Just set cmp function here. We don't sort because that
|
||||
* would affect the output of X509_CRL_print().
|
||||
*/
|
||||
case ASN1_OP_D2I_POST:
|
||||
for (i=0; i<sk_X509_REVOKED_num(a->revoked); i++)
|
||||
sk_X509_REVOKED_value(a->revoked,i)->sequence=i;
|
||||
sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp);
|
||||
break;
|
||||
|
||||
/* Restore original order */
|
||||
case ASN1_OP_I2D_PRE:
|
||||
old_cmp=sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_seq_cmp);
|
||||
sk_X509_REVOKED_sort(a->revoked);
|
||||
sk_X509_REVOKED_set_cmp_func(a->revoked,old_cmp);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
ASN1_SEQUENCE_cb(X509_CRL_INFO, crl_inf_cb) = {
|
||||
ASN1_SEQUENCE_enc(X509_CRL_INFO, enc, crl_inf_cb) = {
|
||||
ASN1_OPT(X509_CRL_INFO, version, ASN1_INTEGER),
|
||||
ASN1_SIMPLE(X509_CRL_INFO, sig_alg, X509_ALGOR),
|
||||
ASN1_SIMPLE(X509_CRL_INFO, issuer, X509_NAME),
|
||||
@ -116,7 +99,7 @@ ASN1_SEQUENCE_cb(X509_CRL_INFO, crl_inf_cb) = {
|
||||
ASN1_OPT(X509_CRL_INFO, nextUpdate, ASN1_TIME),
|
||||
ASN1_SEQUENCE_OF_OPT(X509_CRL_INFO, revoked, X509_REVOKED),
|
||||
ASN1_EXP_SEQUENCE_OF_OPT(X509_CRL_INFO, extensions, X509_EXTENSION, 0)
|
||||
} ASN1_SEQUENCE_END_cb(X509_CRL_INFO, X509_CRL_INFO)
|
||||
} ASN1_SEQUENCE_END_enc(X509_CRL_INFO, X509_CRL_INFO)
|
||||
|
||||
ASN1_SEQUENCE_ref(X509_CRL, 0, CRYPTO_LOCK_X509_CRL) = {
|
||||
ASN1_SIMPLE(X509_CRL, crl, X509_CRL_INFO),
|
||||
@ -137,12 +120,6 @@ static int X509_REVOKED_cmp(const X509_REVOKED * const *a,
|
||||
(ASN1_STRING *)(*b)->serialNumber));
|
||||
}
|
||||
|
||||
static int X509_REVOKED_seq_cmp(const X509_REVOKED * const *a,
|
||||
const X509_REVOKED * const *b)
|
||||
{
|
||||
return((*a)->sequence-(*b)->sequence);
|
||||
}
|
||||
|
||||
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev)
|
||||
{
|
||||
X509_CRL_INFO *inf;
|
||||
|
113
crypto/openssl/crypto/bf/Makefile
Normal file
113
crypto/openssl/crypto/bf/Makefile
Normal file
@ -0,0 +1,113 @@
|
||||
#
|
||||
# SSLeay/crypto/blowfish/Makefile
|
||||
#
|
||||
|
||||
DIR= bf
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
BF_ENC= bf_enc.o
|
||||
# or use
|
||||
#DES_ENC= bx86-elf.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=bftest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c
|
||||
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= blowfish.h
|
||||
HEADER= bf_pi.h bf_locl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/bx86-out.o: asm/bx86unix.cpp
|
||||
$(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/bx86bsdi.o: asm/bx86unix.cpp
|
||||
$(CPP) -DBSDI asm/bx86unix.cpp | sed 's/ :/:/' | as -o asm/bx86bsdi.o
|
||||
|
||||
asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install: installs
|
||||
|
||||
installs:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
|
||||
bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
bf_ecb.o: bf_ecb.c bf_locl.h
|
||||
bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
|
||||
bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
|
||||
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
|
||||
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c
|
214
crypto/openssl/crypto/bio/Makefile
Normal file
214
crypto/openssl/crypto/bio/Makefile
Normal file
@ -0,0 +1,214 @@
|
||||
#
|
||||
# SSLeay/crypto/bio/Makefile
|
||||
#
|
||||
|
||||
DIR= bio
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= bio_lib.c bio_cb.c bio_err.c \
|
||||
bss_mem.c bss_null.c bss_fd.c \
|
||||
bss_file.c bss_sock.c bss_conn.c \
|
||||
bf_null.c bf_buff.c b_print.c b_dump.c \
|
||||
b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c
|
||||
# bf_lbuf.c
|
||||
LIBOBJ= bio_lib.o bio_cb.o bio_err.o \
|
||||
bss_mem.o bss_null.o bss_fd.o \
|
||||
bss_file.o bss_sock.o bss_conn.o \
|
||||
bf_null.o bf_buff.o b_print.o b_dump.o \
|
||||
b_sock.o bss_acpt.o bf_nbio.o bss_log.o bss_bio.o
|
||||
# bf_lbuf.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= bio.h
|
||||
HEADER= bss_file.c $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER); \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
b_dump.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
b_dump.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
b_dump.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
b_dump.o: ../cryptlib.h b_dump.c
|
||||
b_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
b_print.o: ../cryptlib.h b_print.c
|
||||
b_sock.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
b_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
b_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
b_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
b_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
b_sock.o: ../cryptlib.h b_sock.c
|
||||
bf_buff.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bf_buff.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bf_buff.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bf_buff.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bf_buff.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bf_buff.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bf_buff.o: ../cryptlib.h bf_buff.c
|
||||
bf_nbio.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bf_nbio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bf_nbio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bf_nbio.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bf_nbio.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bf_nbio.o: ../cryptlib.h bf_nbio.c
|
||||
bf_null.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bf_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bf_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bf_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bf_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bf_null.o: ../cryptlib.h bf_null.c
|
||||
bio_cb.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bio_cb.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bio_cb.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bio_cb.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bio_cb.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bio_cb.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bio_cb.o: ../cryptlib.h bio_cb.c
|
||||
bio_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
bio_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bio_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bio_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bio_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bio_err.o: bio_err.c
|
||||
bio_lib.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bio_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bio_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bio_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bio_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bio_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bio_lib.o: ../cryptlib.h bio_lib.c
|
||||
bss_acpt.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_acpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_acpt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_acpt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_acpt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_acpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_acpt.o: ../cryptlib.h bss_acpt.c
|
||||
bss_bio.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_bio.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
bss_bio.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
bss_bio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
bss_bio.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bss_bio.o: ../../include/openssl/symhacks.h bss_bio.c
|
||||
bss_conn.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_conn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_conn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_conn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_conn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_conn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_conn.o: ../cryptlib.h bss_conn.c
|
||||
bss_fd.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_fd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_fd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_fd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_fd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_fd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_fd.o: ../cryptlib.h bss_fd.c
|
||||
bss_file.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_file.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_file.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_file.o: ../cryptlib.h bss_file.c
|
||||
bss_log.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_log.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_log.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_log.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_log.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_log.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_log.o: ../cryptlib.h bss_log.c
|
||||
bss_mem.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_mem.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_mem.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_mem.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_mem.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_mem.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_mem.o: ../cryptlib.h bss_mem.c
|
||||
bss_null.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_null.o: ../cryptlib.h bss_null.c
|
||||
bss_sock.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
bss_sock.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bss_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bss_sock.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bss_sock.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bss_sock.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bss_sock.o: ../cryptlib.h bss_sock.c
|
@ -641,7 +641,7 @@ fmtfp(
|
||||
multiplying by a factor of 10 */
|
||||
fracpart = roundv((pow10(max)) * (ufvalue - intpart));
|
||||
|
||||
if (fracpart >= pow10(max)) {
|
||||
if (fracpart >= (long)pow10(max)) {
|
||||
intpart++;
|
||||
fracpart -= (long)pow10(max);
|
||||
}
|
||||
|
@ -347,6 +347,7 @@ typedef struct bio_f_buffer_ctx_struct
|
||||
#define BIO_C_NWRITE0 145
|
||||
#define BIO_C_NWRITE 146
|
||||
#define BIO_C_RESET_READ_REQUEST 147
|
||||
#define BIO_C_SET_MD_CTX 148
|
||||
|
||||
|
||||
#define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
|
||||
|
@ -213,13 +213,14 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
b->shutdown=(int)num&BIO_CLOSE;
|
||||
b->ptr=(char *)ptr;
|
||||
b->init=1;
|
||||
#if defined(OPENSSL_SYS_WINDOWS)
|
||||
if (num & BIO_FP_TEXT)
|
||||
_setmode(fileno((FILE *)ptr),_O_TEXT);
|
||||
else
|
||||
_setmode(fileno((FILE *)ptr),_O_BINARY);
|
||||
#elif defined(OPENSSL_SYS_MSDOS)
|
||||
{
|
||||
#if defined(OPENSSL_SYS_WINDOWS)
|
||||
int fd = fileno((FILE*)ptr);
|
||||
if (num & BIO_FP_TEXT)
|
||||
_setmode(fd,_O_TEXT);
|
||||
else
|
||||
_setmode(fd,_O_BINARY);
|
||||
#elif defined(OPENSSL_SYS_MSDOS)
|
||||
int fd = fileno((FILE*)ptr);
|
||||
/* Set correct text/binary mode */
|
||||
if (num & BIO_FP_TEXT)
|
||||
@ -235,13 +236,14 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
else
|
||||
_setmode(fd,_O_BINARY);
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_OS2)
|
||||
int fd = fileno((FILE*)ptr);
|
||||
if (num & BIO_FP_TEXT)
|
||||
setmode(fileno((FILE *)ptr), O_TEXT);
|
||||
setmode(fd, O_TEXT);
|
||||
else
|
||||
setmode(fileno((FILE *)ptr), O_BINARY);
|
||||
setmode(fd, O_BINARY);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case BIO_C_SET_FILENAME:
|
||||
file_free(b);
|
||||
|
324
crypto/openssl/crypto/bn/Makefile
Normal file
324
crypto/openssl/crypto/bn/Makefile
Normal file
@ -0,0 +1,324 @@
|
||||
#
|
||||
# SSLeay/crypto/bn/Makefile
|
||||
#
|
||||
|
||||
DIR= bn
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
BN_ASM= bn_asm.o
|
||||
# or use
|
||||
#BN_ASM= bn86-elf.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=bntest.c exptest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
|
||||
bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
|
||||
bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
|
||||
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c
|
||||
|
||||
LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
|
||||
bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
|
||||
bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
|
||||
bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= bn.h
|
||||
HEADER= bn_lcl.h bn_prime.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
bn_prime.h: bn_prime.pl
|
||||
$(PERL) bn_prime.pl >bn_prime.h
|
||||
|
||||
divtest: divtest.c ../../libcrypto.a
|
||||
cc -I../../include divtest.c -o divtest ../../libcrypto.a
|
||||
|
||||
bnbug: bnbug.c ../../libcrypto.a top
|
||||
cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s)
|
||||
|
||||
asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/bn86-out.o: asm/bn86unix.cpp
|
||||
$(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o
|
||||
|
||||
asm/co86-out.o: asm/co86unix.cpp
|
||||
$(CPP) -DOUT asm/co86unix.cpp | as -o asm/co86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/bn86bsdi.o: asm/bn86unix.cpp
|
||||
$(CPP) -DBSDI asm/bn86unix.cpp | sed 's/ :/:/' | as -o asm/bn86bsdi.o
|
||||
|
||||
asm/co86bsdi.o: asm/co86unix.cpp
|
||||
$(CPP) -DBSDI asm/co86unix.cpp | sed 's/ :/:/' | as -o asm/co86bsdi.o
|
||||
|
||||
asm/bn86unix.cpp: asm/bn-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) bn-586.pl cpp >bn86unix.cpp )
|
||||
|
||||
asm/co86unix.cpp: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) co-586.pl cpp >co86unix.cpp )
|
||||
|
||||
asm/sparcv8.o: asm/sparcv8.S
|
||||
|
||||
asm/sparcv8plus.o: asm/sparcv8plus.S
|
||||
|
||||
# Old GNU assembler doesn't understand V9 instructions, so we
|
||||
# hire /usr/ccs/bin/as to do the job. Note that option is called
|
||||
# *-gcc27, but even gcc 2>=8 users may experience similar problem
|
||||
# if they didn't bother to upgrade GNU assembler. Such users should
|
||||
# not choose this option, but be adviced to *remove* GNU assembler
|
||||
# or upgrade it.
|
||||
asm/sparcv8plus-gcc27.o: asm/sparcv8plus.S
|
||||
$(CC) $(ASFLAGS) -E asm/sparcv8plus.S | \
|
||||
/usr/ccs/bin/as -xarch=v8plus - -o asm/sparcv8plus-gcc27.o
|
||||
|
||||
|
||||
asm/ia64.o: asm/ia64.S
|
||||
|
||||
# Some compiler drivers (most notably HP-UX and Intel C++) don't
|
||||
# understand .S extension:-( I wish I could pipe output from cc -E,
|
||||
# but it's too compiler driver/ABI dependent to cover with a single
|
||||
# rule... <appro@fy.chalmers.se>
|
||||
asm/ia64-cpp.o: asm/ia64.S
|
||||
$(CC) $(ASFLAGS) -E asm/ia64.S > /tmp/ia64.$$$$.s && \
|
||||
$(CC) $(ASFLAGS) -c -o asm/ia64-cpp.o /tmp/ia64.$$$$.s; \
|
||||
rm -f /tmp/ia64.$$$$.s
|
||||
|
||||
asm/x86_64-gcc.o: asm/x86_64-gcc.c
|
||||
|
||||
asm/pa-risc2W.o: asm/pa-risc2W.s
|
||||
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
exptest:
|
||||
rm -f exptest
|
||||
gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
|
||||
|
||||
div:
|
||||
rm -f a.out
|
||||
gcc -I.. -g div.c ../../libcrypto.a
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
bn_add.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_add.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_add.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_add.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_add.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_add.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_add.o: ../cryptlib.h bn_add.c bn_lcl.h
|
||||
bn_asm.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_asm.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_asm.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_asm.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_asm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_asm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_asm.o: ../cryptlib.h bn_asm.c bn_lcl.h
|
||||
bn_blind.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_blind.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_blind.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_blind.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_blind.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_blind.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_blind.o: ../cryptlib.h bn_blind.c bn_lcl.h
|
||||
bn_ctx.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_ctx.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_ctx.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_ctx.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_ctx.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_ctx.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_ctx.o: ../cryptlib.h bn_ctx.c bn_lcl.h
|
||||
bn_div.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_div.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_div.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_div.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_div.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_div.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_div.o: ../cryptlib.h bn_div.c bn_lcl.h
|
||||
bn_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
bn_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
bn_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
bn_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
bn_err.o: ../../include/openssl/symhacks.h bn_err.c
|
||||
bn_exp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_exp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_exp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_exp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_exp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_exp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_exp.o: ../cryptlib.h bn_exp.c bn_lcl.h
|
||||
bn_exp2.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_exp2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_exp2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_exp2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_exp2.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_exp2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_exp2.o: ../cryptlib.h bn_exp2.c bn_lcl.h
|
||||
bn_gcd.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_gcd.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_gcd.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h
|
||||
bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
|
||||
bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h
|
||||
bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_lib.o: ../cryptlib.h bn_lcl.h bn_lib.c
|
||||
bn_mod.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_mod.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_mod.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_mod.o: ../cryptlib.h bn_lcl.h bn_mod.c
|
||||
bn_mont.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_mont.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_mont.o: ../cryptlib.h bn_lcl.h bn_mont.c
|
||||
bn_mpi.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_mpi.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_mpi.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_mpi.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_mpi.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_mpi.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_mpi.o: ../cryptlib.h bn_lcl.h bn_mpi.c
|
||||
bn_mul.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_mul.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_mul.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_mul.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_mul.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_mul.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_mul.o: ../cryptlib.h bn_lcl.h bn_mul.c
|
||||
bn_prime.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_prime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_prime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_prime.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_prime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bn_prime.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
bn_prime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_prime.o: ../cryptlib.h bn_lcl.h bn_prime.c bn_prime.h
|
||||
bn_print.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_print.o: ../cryptlib.h bn_lcl.h bn_print.c
|
||||
bn_rand.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_rand.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
bn_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
bn_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_rand.o: ../cryptlib.h bn_lcl.h bn_rand.c
|
||||
bn_recp.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_recp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_recp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_recp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_recp.o: ../cryptlib.h bn_lcl.h bn_recp.c
|
||||
bn_shift.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_shift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_shift.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_shift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_shift.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_shift.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_shift.o: ../cryptlib.h bn_lcl.h bn_shift.c
|
||||
bn_sqr.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_sqr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_sqr.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_sqr.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_sqr.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_sqr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_sqr.o: ../cryptlib.h bn_lcl.h bn_sqr.c
|
||||
bn_sqrt.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_sqrt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_sqrt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_sqrt.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_sqrt.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_sqrt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_sqrt.o: ../cryptlib.h bn_lcl.h bn_sqrt.c
|
||||
bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_word.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_word.o: ../cryptlib.h bn_lcl.h bn_word.c
|
@ -1,6 +1,6 @@
|
||||
.explicit
|
||||
.text
|
||||
.ident "ia64.S, Version 2.0"
|
||||
.ident "ia64.S, Version 2.1"
|
||||
.ident "IA-64 ISA artwork by Andy Polyakov <appro@fy.chalmers.se>"
|
||||
|
||||
//
|
||||
@ -35,7 +35,7 @@
|
||||
// What does it mean? You might ratiocinate that the original code
|
||||
// should run just faster... Because sum of latencies is smaller...
|
||||
// Wrong! Note that getf latency increased. This means that if a loop is
|
||||
// scheduled for lower latency (and they are), then it will suffer from
|
||||
// scheduled for lower latency (as they were), then it will suffer from
|
||||
// stall condition and the code will therefore turn anti-scalable, e.g.
|
||||
// original bn_mul_words spun at 5*n or 2.5 times slower than expected
|
||||
// on Itanium2! What to do? Reschedule loops for Itanium2? But then
|
||||
@ -145,6 +145,12 @@
|
||||
// -Drum=nop.m in command line.
|
||||
//
|
||||
|
||||
#if defined(_HPUX_SOURCE) && !defined(_LP64)
|
||||
#define ADDP addp4
|
||||
#else
|
||||
#define ADDP add
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
//
|
||||
// bn_[add|sub]_words routines.
|
||||
@ -178,27 +184,12 @@ bn_add_words:
|
||||
brp.loop.imp .L_bn_add_words_ctop,.L_bn_add_words_cend-16
|
||||
}
|
||||
.body
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
#endif
|
||||
{ .mib; ADDP r14=0,r32 // rp
|
||||
mov r9=pr };;
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
{ .mii; ADDP r15=0,r33 // ap
|
||||
mov ar.lc=r10
|
||||
mov ar.ec=6 }
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r16=0,r34 // bp
|
||||
#else
|
||||
mov r16=r34 // bp
|
||||
#endif
|
||||
{ .mib; ADDP r16=0,r34 // bp
|
||||
mov pr.rot=1<<16 };;
|
||||
|
||||
.L_bn_add_words_ctop:
|
||||
@ -246,27 +237,12 @@ bn_sub_words:
|
||||
brp.loop.imp .L_bn_sub_words_ctop,.L_bn_sub_words_cend-16
|
||||
}
|
||||
.body
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
#endif
|
||||
{ .mib; ADDP r14=0,r32 // rp
|
||||
mov r9=pr };;
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
{ .mii; ADDP r15=0,r33 // ap
|
||||
mov ar.lc=r10
|
||||
mov ar.ec=6 }
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r16=0,r34 // bp
|
||||
#else
|
||||
mov r16=r34 // bp
|
||||
#endif
|
||||
{ .mib; ADDP r16=0,r34 // bp
|
||||
mov pr.rot=1<<16 };;
|
||||
|
||||
.L_bn_sub_words_ctop:
|
||||
@ -332,16 +308,10 @@ bn_mul_words:
|
||||
|
||||
#ifndef XMA_TEMPTATION
|
||||
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
{ .mmi; ADDP r14=0,r32 // rp
|
||||
ADDP r15=0,r33 // ap
|
||||
mov ar.lc=r10 }
|
||||
{ .mii; mov r40=0 // serves as r35 at first (p27)
|
||||
{ .mmi; mov r40=0 // serves as r35 at first (p27)
|
||||
mov ar.ec=13 };;
|
||||
|
||||
// This loop spins in 2*(n+12) ticks. It's scheduled for data in Itanium
|
||||
@ -424,89 +394,64 @@ bn_mul_words:
|
||||
.global bn_mul_add_words#
|
||||
.proc bn_mul_add_words#
|
||||
.align 64
|
||||
//.skip 0 // makes the loop split at 64-byte boundary
|
||||
.skip 48 // makes the loop body aligned at 64-byte boundary
|
||||
bn_mul_add_words:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
{ .mii; alloc r2=ar.pfs,4,12,0,16
|
||||
cmp4.le p6,p0=r34,r0 };;
|
||||
{ .mfb; mov r8=r0 // return value
|
||||
.save ar.lc,r3
|
||||
.save pr,r9
|
||||
{ .mmi; alloc r2=ar.pfs,4,4,0,8
|
||||
cmp4.le p6,p0=r34,r0
|
||||
mov r3=ar.lc };;
|
||||
{ .mib; mov r8=r0 // return value
|
||||
sub r10=r34,r0,1
|
||||
(p6) br.ret.spnt.many b0 };;
|
||||
|
||||
.save ar.lc,r3
|
||||
{ .mii; sub r10=r34,r0,1
|
||||
mov r3=ar.lc
|
||||
mov r9=pr };;
|
||||
|
||||
.body
|
||||
{ .mib; setf.sig f8=r35 // w
|
||||
mov pr.rot=0x800001<<16
|
||||
// ------^----- serves as (p50) at first (p27)
|
||||
{ .mib; setf.sig f8=r35 // w
|
||||
mov r9=pr
|
||||
brp.loop.imp .L_bn_mul_add_words_ctop,.L_bn_mul_add_words_cend-16
|
||||
}
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
{ .mmi; ADDP r14=0,r32 // rp
|
||||
ADDP r15=0,r33 // ap
|
||||
mov ar.lc=r10 }
|
||||
{ .mii; mov r40=0 // serves as r35 at first (p27)
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r18=0,r32 // rp copy
|
||||
#else
|
||||
mov r18=r32 // rp copy
|
||||
#endif
|
||||
mov ar.ec=15 };;
|
||||
{ .mii; ADDP r16=0,r32 // rp copy
|
||||
mov pr.rot=0x2001<<16
|
||||
// ------^----- serves as (p40) at first (p27)
|
||||
mov ar.ec=11 };;
|
||||
|
||||
// This loop spins in 3*(n+14) ticks on Itanium and should spin in
|
||||
// 2*(n+14) on "wider" IA-64 implementations (to be verified with new
|
||||
// µ-architecture manuals as they become available). As usual it's
|
||||
// possible to compress the epilogue, down to 10 in this case, at the
|
||||
// cost of scalability. Compressed (and therefore non-scalable) loop
|
||||
// running at 3*(n+11) would buy you ~10% on Itanium but take ~35%
|
||||
// from "wider" IA-64 so let it be scalable! Special attention was
|
||||
// paid for having the loop body split at 64-byte boundary. ld8 is
|
||||
// scheduled for L1 cache as the data is more than likely there.
|
||||
// Indeed, bn_mul_words has put it there a moment ago:-)
|
||||
// This loop spins in 3*(n+10) ticks on Itanium and in 2*(n+10) on
|
||||
// Itanium 2. Yes, unlike previous versions it scales:-) Previous
|
||||
// version was peforming *all* additions in IALU and was starving
|
||||
// for those even on Itanium 2. In this version one addition is
|
||||
// moved to FPU and is folded with multiplication. This is at cost
|
||||
// of propogating the result from previous call to this subroutine
|
||||
// to L2 cache... In other words negligible even for shorter keys.
|
||||
// *Overall* performance improvement [over previous version] varies
|
||||
// from 11 to 22 percent depending on key length.
|
||||
.L_bn_mul_add_words_ctop:
|
||||
{ .mfi; (p25) getf.sig r36=f52 // low
|
||||
(p21) xmpy.lu f48=f37,f8
|
||||
(p28) cmp.ltu p54,p50=r41,r39 }
|
||||
{ .mfi; (p16) ldf8 f32=[r15],8
|
||||
(p21) xmpy.hu f40=f37,f8
|
||||
(p28) add r45=r45,r41 };;
|
||||
{ .mii; (p25) getf.sig r32=f44 // high
|
||||
.pred.rel "mutex",p50,p54
|
||||
(p50) add r40=r38,r35 // (p27)
|
||||
(p54) add r40=r38,r35,1 } // (p27)
|
||||
{ .mfb; (p28) cmp.ltu.unc p60,p0=r45,r41
|
||||
(p0) nop.f 0x0
|
||||
(p0) nop.b 0x0 }
|
||||
{ .mii; (p27) ld8 r44=[r18],8
|
||||
(p62) cmp.eq.or p61,p0=-1,r46
|
||||
(p62) add r46=1,r46 }
|
||||
{ .mfb; (p30) st8 [r14]=r47,8
|
||||
(p0) nop.f 0x0
|
||||
.pred.rel "mutex",p40,p42
|
||||
{ .mfi; (p23) getf.sig r36=f45 // low
|
||||
(p20) xma.lu f42=f36,f8,f50 // low
|
||||
(p40) add r39=r39,r35 } // (p27)
|
||||
{ .mfi; (p16) ldf8 f32=[r15],8 // *(ap++)
|
||||
(p20) xma.hu f36=f36,f8,f50 // high
|
||||
(p42) add r39=r39,r35,1 };; // (p27)
|
||||
{ .mmi; (p24) getf.sig r32=f40 // high
|
||||
(p16) ldf8 f46=[r16],8 // *(rp1++)
|
||||
(p40) cmp.ltu p41,p39=r39,r35 } // (p27)
|
||||
{ .mib; (p26) st8 [r14]=r39,8 // *(rp2++)
|
||||
(p42) cmp.leu p41,p39=r39,r35 // (p27)
|
||||
br.ctop.sptk .L_bn_mul_add_words_ctop};;
|
||||
.L_bn_mul_add_words_cend:
|
||||
|
||||
{ .mii; nop.m 0x0
|
||||
.pred.rel "mutex",p53,p57
|
||||
(p53) add r8=r38,r0
|
||||
(p57) add r8=r38,r0,1 }
|
||||
{ .mfb; nop.m 0x0
|
||||
nop.f 0x0
|
||||
nop.b 0x0 };;
|
||||
{ .mii;
|
||||
(p63) add r8=1,r8
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mfb; rum 1<<5 // clear um.mfh
|
||||
nop.f 0x0
|
||||
{ .mmi; .pred.rel "mutex",p40,p42
|
||||
(p40) add r8=r35,r0
|
||||
(p42) add r8=r35,r0,1
|
||||
mov pr=r9,0x1ffff }
|
||||
{ .mib; rum 1<<5 // clear um.mfh
|
||||
mov ar.lc=r3
|
||||
br.ret.sptk.many b0 };;
|
||||
.endp bn_mul_add_words#
|
||||
#endif
|
||||
@ -527,7 +472,8 @@ bn_sqr_words:
|
||||
sxt4 r34=r34 };;
|
||||
{ .mii; cmp.le p6,p0=r34,r0
|
||||
mov r8=r0 } // return value
|
||||
{ .mfb; nop.f 0x0
|
||||
{ .mfb; ADDP r32=0,r32
|
||||
nop.f 0x0
|
||||
(p6) br.ret.spnt.many b0 };;
|
||||
|
||||
.save ar.lc,r3
|
||||
@ -536,11 +482,7 @@ bn_sqr_words:
|
||||
mov r9=pr };;
|
||||
|
||||
.body
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; addp4 r32=0,r32
|
||||
addp4 r33=0,r33 };;
|
||||
#endif
|
||||
{ .mib;
|
||||
{ .mib; ADDP r33=0,r33
|
||||
mov pr.rot=1<<16
|
||||
brp.loop.imp .L_bn_sqr_words_ctop,.L_bn_sqr_words_cend-16
|
||||
}
|
||||
@ -605,7 +547,7 @@ bn_sqr_comba8:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
#if defined(_HPUX_SOURCE) && !defined(_LP64)
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r32=0,r32 };;
|
||||
@ -631,6 +573,10 @@ bn_sqr_comba8:
|
||||
// clause in Itanium µ-architecture manual? Comments are welcomed and
|
||||
// highly appreciated.
|
||||
//
|
||||
// On Itanium 2 it takes ~190 ticks. This is because of stalls on
|
||||
// result from getf.sig. I do nothing about it at this point for
|
||||
// reasons depicted below.
|
||||
//
|
||||
// However! It should be noted that even 160 ticks is darn good result
|
||||
// as it's over 10 (yes, ten, spelled as t-e-n) times faster than the
|
||||
// C version (compiled with gcc with inline assembler). I really
|
||||
@ -673,7 +619,7 @@ bn_mul_comba8:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
#if defined(_HPUX_SOURCE) && !defined(_LP64)
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r34=0,r34 };;
|
||||
@ -1231,7 +1177,7 @@ bn_sqr_comba4:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
#if defined(_HPUX_SOURCE) && !defined(_LP64)
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
addp4 r32=0,r32
|
||||
addp4 r33=0,r33 };;
|
||||
@ -1264,7 +1210,7 @@ bn_mul_comba4:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
#if defined(_HPUX_SOURCE) && !defined(_LP64)
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r34=0,r34 };;
|
||||
@ -1448,8 +1394,8 @@ bn_mul_comba4:
|
||||
#define I r21
|
||||
|
||||
#if 0
|
||||
// Some preprocessors (most notably HP-UX) apper to be allergic to
|
||||
// macros enclosed to parenthesis as these three will be.
|
||||
// Some preprocessors (most notably HP-UX) appear to be allergic to
|
||||
// macros enclosed to parenthesis [as these three were].
|
||||
#define cont p16
|
||||
#define break p0 // p20
|
||||
#define equ p24
|
||||
@ -1581,9 +1527,18 @@ bn_div_words:
|
||||
// output: f8 = (int)(a/b)
|
||||
// clobbered: f8,f9,f10,f11,pred
|
||||
pred=p15
|
||||
// This procedure is essentially Intel code and therefore is
|
||||
// copyrighted to Intel Corporation (I suppose...). It's sligtly
|
||||
// modified for specific needs.
|
||||
// One can argue that this snippet is copyrighted to Intel
|
||||
// Corporation, as it's essentially identical to one of those
|
||||
// found in "Divide, Square Root and Remainder" section at
|
||||
// http://www.intel.com/software/products/opensource/libraries/num.htm.
|
||||
// Yes, I admit that the referred code was used as template,
|
||||
// but after I realized that there hardly is any other instruction
|
||||
// sequence which would perform this operation. I mean I figure that
|
||||
// any independent attempt to implement high-performance division
|
||||
// will result in code virtually identical to the Intel code. It
|
||||
// should be noted though that below division kernel is 1 cycle
|
||||
// faster than Intel one (note commented splits:-), not to mention
|
||||
// original prologue (rather lack of one) and epilogue.
|
||||
.align 32
|
||||
.skip 16
|
||||
.L_udiv64_32_b6:
|
||||
|
@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
||||
EXIT(0);
|
||||
err:
|
||||
BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices
|
||||
* the failure, see test_bn in test/Makefile.ssl*/
|
||||
* the failure, see test_bn in test/Makefile */
|
||||
BIO_flush(out);
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors_fp(stderr);
|
||||
|
92
crypto/openssl/crypto/buffer/Makefile
Normal file
92
crypto/openssl/crypto/buffer/Makefile
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# SSLeay/crypto/buffer/Makefile
|
||||
#
|
||||
|
||||
DIR= buffer
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= buffer.c buf_err.c
|
||||
LIBOBJ= buffer.o buf_err.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= buffer.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
buf_err.o: ../../include/openssl/symhacks.h buf_err.c
|
||||
buffer.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
buffer.o: ../cryptlib.h buffer.c
|
118
crypto/openssl/crypto/cast/Makefile
Normal file
118
crypto/openssl/crypto/cast/Makefile
Normal file
@ -0,0 +1,118 @@
|
||||
#
|
||||
# SSLeay/crypto/cast/Makefile
|
||||
#
|
||||
|
||||
DIR= cast
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CAST_ENC=c_enc.o
|
||||
# or use
|
||||
#CAST_ENC=asm/cx86-elf.o
|
||||
#CAST_ENC=asm/cx86-out.o
|
||||
#CAST_ENC=asm/cx86-sol.o
|
||||
#CAST_ENC=asm/cx86bdsi.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=casttest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
|
||||
LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= cast.h
|
||||
HEADER= cast_s.h cast_lcl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > cx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/cx86-out.o: asm/cx86unix.cpp
|
||||
$(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/cx86bsdi.o: asm/cx86unix.cpp
|
||||
$(CPP) -DBSDI asm/cx86unix.cpp | sed 's/ :/:/' | as -o asm/cx86bsdi.o
|
||||
|
||||
asm/cx86unix.cpp: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/cx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_cfb64.o: c_cfb64.c cast_lcl.h
|
||||
c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
|
||||
c_enc.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_enc.o: c_enc.c cast_lcl.h
|
||||
c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_ofb64.o: c_ofb64.c cast_lcl.h
|
||||
c_skey.o: ../../e_os.h ../../include/openssl/cast.h
|
||||
c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
c_skey.o: c_skey.c cast_lcl.h cast_s.h
|
112
crypto/openssl/crypto/comp/Makefile
Normal file
112
crypto/openssl/crypto/comp/Makefile
Normal file
@ -0,0 +1,112 @@
|
||||
#
|
||||
# SSLeay/crypto/comp/Makefile
|
||||
#
|
||||
|
||||
DIR= comp
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= comp_lib.c comp_err.c \
|
||||
c_rle.c c_zlib.c
|
||||
|
||||
LIBOBJ= comp_lib.o comp_err.o \
|
||||
c_rle.o c_zlib.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= comp.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
c_rle.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
|
||||
c_rle.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
c_rle.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
c_rle.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
c_rle.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
c_rle.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h c_rle.c
|
||||
c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
c_zlib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
|
||||
c_zlib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
c_zlib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
c_zlib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
c_zlib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
c_zlib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
c_zlib.o: c_zlib.c
|
||||
comp_err.o: ../../include/openssl/bio.h ../../include/openssl/comp.h
|
||||
comp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
comp_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
comp_err.o: ../../include/openssl/opensslconf.h
|
||||
comp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
comp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
comp_err.o: comp_err.c
|
||||
comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
comp_lib.o: ../../include/openssl/bn.h ../../include/openssl/comp.h
|
||||
comp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
comp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
comp_lib.o: ../../include/openssl/opensslconf.h
|
||||
comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
comp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
comp_lib.o: ../../include/openssl/symhacks.h comp_lib.c
|
@ -189,7 +189,17 @@ COMP_METHOD *COMP_zlib(void)
|
||||
if (!zlib_loaded)
|
||||
{
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
|
||||
zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0);
|
||||
zlib_dso = DSO_load(NULL, "ZLIB1", NULL, 0);
|
||||
if (!zlib_dso)
|
||||
{
|
||||
zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0);
|
||||
if (zlib_dso)
|
||||
{
|
||||
/* Clear the errors from the first failed
|
||||
DSO_load() */
|
||||
ERR_clear_error();
|
||||
}
|
||||
}
|
||||
#else
|
||||
zlib_dso = DSO_load(NULL, "z", NULL, 0);
|
||||
#endif
|
||||
|
181
crypto/openssl/crypto/conf/Makefile
Normal file
181
crypto/openssl/crypto/conf/Makefile
Normal file
@ -0,0 +1,181 @@
|
||||
#
|
||||
# SSLeay/crypto/conf/Makefile
|
||||
#
|
||||
|
||||
DIR= conf
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \
|
||||
conf_mall.c conf_sap.c
|
||||
|
||||
LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o conf_mod.o \
|
||||
conf_mall.o conf_sap.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= conf.h conf_api.h
|
||||
HEADER= conf_def.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
conf_api.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
conf_api.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h
|
||||
conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_api.o: conf_api.c
|
||||
conf_def.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
|
||||
conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
|
||||
conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_def.o: ../cryptlib.h conf_def.c conf_def.h
|
||||
conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
|
||||
conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
conf_err.o: ../../include/openssl/opensslconf.h
|
||||
conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_err.o: conf_err.c
|
||||
conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
|
||||
conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
|
||||
conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_lib.o: conf_lib.c
|
||||
conf_mall.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
conf_mall.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
conf_mall.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
conf_mall.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
conf_mall.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
conf_mall.o: ../../include/openssl/objects.h
|
||||
conf_mall.o: ../../include/openssl/opensslconf.h
|
||||
conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
conf_mall.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
conf_mall.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
conf_mall.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c
|
||||
conf_mod.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
conf_mod.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
conf_mod.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
conf_mod.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
conf_mod.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
conf_mod.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
conf_mod.o: ../../include/openssl/opensslconf.h
|
||||
conf_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
conf_mod.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
conf_mod.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
conf_mod.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
conf_mod.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
conf_mod.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
conf_mod.o: ../cryptlib.h conf_mod.c
|
||||
conf_sap.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
conf_sap.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
conf_sap.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
conf_sap.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
conf_sap.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
conf_sap.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
conf_sap.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
conf_sap.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
conf_sap.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c
|
@ -632,6 +632,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
|
||||
BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from)));
|
||||
while (*p)
|
||||
buf->data[to++]= *(p++);
|
||||
|
||||
/* Since we change the pointer 'from', we also have
|
||||
to change the perceived length of the string it
|
||||
points at. /RL */
|
||||
len -= e-from;
|
||||
from=e;
|
||||
}
|
||||
else
|
||||
|
@ -105,7 +105,9 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] =
|
||||
"engine",
|
||||
"ui",
|
||||
"hwcrhk", /* This is a HACK which will disappear in 0.9.8 */
|
||||
#if CRYPTO_NUM_LOCKS != 33
|
||||
"fips",
|
||||
"fips2",
|
||||
#if CRYPTO_NUM_LOCKS != 35
|
||||
# error "Inconsistency between crypto.h and cryptlib.c"
|
||||
#endif
|
||||
};
|
||||
@ -512,3 +514,122 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
file,line,assertion);
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
static int fips_started = 0;
|
||||
static int fips_mode = 0;
|
||||
static void *fips_rand_check = 0;
|
||||
static unsigned long fips_thread = 0;
|
||||
|
||||
void fips_set_started(void)
|
||||
{
|
||||
fips_started = 1;
|
||||
}
|
||||
|
||||
int fips_is_started(void)
|
||||
{
|
||||
return fips_started;
|
||||
}
|
||||
|
||||
int fips_is_owning_thread(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_FIPS2);
|
||||
if (fips_thread != 0 && fips_thread == CRYPTO_thread_id())
|
||||
ret = 1;
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_FIPS2);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fips_set_owning_thread(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_FIPS2);
|
||||
if (fips_thread == 0)
|
||||
{
|
||||
fips_thread = CRYPTO_thread_id();
|
||||
ret = 1;
|
||||
}
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_FIPS2);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fips_clear_owning_thread(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_FIPS2);
|
||||
if (fips_thread == CRYPTO_thread_id())
|
||||
{
|
||||
fips_thread = 0;
|
||||
ret = 1;
|
||||
}
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_FIPS2);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fips_set_mode(int onoff)
|
||||
{
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
|
||||
fips_mode = onoff;
|
||||
if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
}
|
||||
|
||||
void fips_set_rand_check(void *rand_check)
|
||||
{
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
|
||||
fips_rand_check = rand_check;
|
||||
if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
}
|
||||
|
||||
int FIPS_mode(void)
|
||||
{
|
||||
int ret = 0;
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
|
||||
ret = fips_mode;
|
||||
if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *FIPS_rand_check(void)
|
||||
{
|
||||
void *ret = 0;
|
||||
int owning_thread = fips_is_owning_thread();
|
||||
|
||||
if (fips_is_started())
|
||||
{
|
||||
if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
|
||||
ret = fips_rand_check;
|
||||
if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* OPENSSL_FIPS */
|
||||
|
||||
|
@ -128,7 +128,9 @@ extern "C" {
|
||||
#define CRYPTO_LOCK_ENGINE 30
|
||||
#define CRYPTO_LOCK_UI 31
|
||||
#define CRYPTO_LOCK_HWCRHK 32 /* This is a HACK which will disappear in 0.9.8 */
|
||||
#define CRYPTO_NUM_LOCKS 33
|
||||
#define CRYPTO_LOCK_FIPS 33
|
||||
#define CRYPTO_LOCK_FIPS2 34
|
||||
#define CRYPTO_NUM_LOCKS 35
|
||||
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
@ -434,6 +436,11 @@ void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion);
|
||||
#define OPENSSL_assert(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
int FIPS_mode(void);
|
||||
void *FIPS_rand_check(void);
|
||||
#endif /* def OPENSSL_FIPS */
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
|
@ -8,7 +8,7 @@ README - What this package is.
|
||||
VERSION - Which version this is and what was changed.
|
||||
KERBEROS - Kerberos version 4 notes.
|
||||
Makefile.PL - An old makefile to build with perl5, not current.
|
||||
Makefile.ssl - The SSLeay makefile
|
||||
Makefile - The SSLeay makefile
|
||||
Makefile.uni - The normal unix makefile.
|
||||
GNUmakefile - The makefile for use with glibc.
|
||||
makefile.bc - A Borland C makefile
|
||||
|
314
crypto/openssl/crypto/des/Makefile
Normal file
314
crypto/openssl/crypto/des/Makefile
Normal file
@ -0,0 +1,314 @@
|
||||
#
|
||||
# SSLeay/crypto/des/Makefile
|
||||
#
|
||||
|
||||
DIR= des
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=-I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
RANLIB= ranlib
|
||||
DES_ENC= des_enc.o fcrypt_b.o
|
||||
# or use
|
||||
#DES_ENC= dx86-elf.o yx86-elf.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=destest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \
|
||||
ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \
|
||||
fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c \
|
||||
qud_cksm.c rand_key.c rpc_enc.c set_key.c \
|
||||
des_enc.c fcrypt_b.c \
|
||||
xcbc_enc.c \
|
||||
str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \
|
||||
read2pwd.c
|
||||
|
||||
LIBOBJ= set_key.o ecb_enc.o cbc_enc.o \
|
||||
ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o ofb64ede.o \
|
||||
enc_read.o enc_writ.o ofb64enc.o \
|
||||
ofb_enc.o str2key.o pcbc_enc.o qud_cksm.o rand_key.o \
|
||||
${DES_ENC} \
|
||||
fcrypt.o xcbc_enc.o rpc_enc.o cbc_cksm.o \
|
||||
ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= des.h des_old.h
|
||||
HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
des: des.o cbc3_enc.o lib
|
||||
$(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
|
||||
|
||||
# elf
|
||||
asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s)
|
||||
|
||||
asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/dx86-out.o: asm/dx86unix.cpp
|
||||
$(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
|
||||
|
||||
asm/yx86-out.o: asm/yx86unix.cpp
|
||||
$(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
|
||||
|
||||
# bsdi
|
||||
asm/dx86bsdi.o: asm/dx86unix.cpp
|
||||
$(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
|
||||
|
||||
asm/yx86bsdi.o: asm/yx86unix.cpp
|
||||
$(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
|
||||
|
||||
asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
|
||||
|
||||
asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install: installs
|
||||
|
||||
installs:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
cbc_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
cbc_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
cbc_cksm.o: ../../include/openssl/opensslconf.h
|
||||
cbc_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
cbc_cksm.o: cbc_cksm.c des_locl.h
|
||||
cbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
cbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
cbc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
cbc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
cbc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
cbc_enc.o: ../../include/openssl/ui_compat.h cbc_enc.c des_locl.h ncbc_enc.c
|
||||
cfb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
cfb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
cfb64ede.o: ../../include/openssl/opensslconf.h
|
||||
cfb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
cfb64ede.o: cfb64ede.c des_locl.h
|
||||
cfb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
cfb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
cfb64enc.o: ../../include/openssl/opensslconf.h
|
||||
cfb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
cfb64enc.o: cfb64enc.c des_locl.h
|
||||
cfb_enc.o: ../../e_os.h ../../include/openssl/crypto.h
|
||||
cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
cfb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
cfb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
cfb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
cfb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
cfb_enc.o: cfb_enc.c des_locl.h
|
||||
des_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
des_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
des_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c
|
||||
des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
des_old.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
des_old.o: ../../include/openssl/ui_compat.h des_old.c
|
||||
des_old2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
des_old2.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
des_old2.o: ../../include/openssl/opensslconf.h
|
||||
des_old2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
des_old2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
des_old2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
des_old2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
des_old2.o: des_old2.c
|
||||
ecb3_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ecb3_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ecb3_enc.o: ../../include/openssl/opensslconf.h
|
||||
ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ecb3_enc.o: des_locl.h ecb3_enc.c
|
||||
ecb_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
ecb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
ecb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ecb_enc.o: des_locl.h des_ver.h ecb_enc.c spr.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/opensslconf.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/opensslv.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c
|
||||
enc_read.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
enc_read.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
enc_read.o: ../cryptlib.h des_locl.h enc_read.c
|
||||
enc_writ.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c
|
||||
fcrypt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
fcrypt.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
fcrypt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
fcrypt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
fcrypt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
fcrypt.o: ../../include/openssl/ui_compat.h des_locl.h fcrypt.c
|
||||
fcrypt_b.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
fcrypt_b.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
fcrypt_b.o: ../../include/openssl/opensslconf.h
|
||||
fcrypt_b.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
fcrypt_b.o: des_locl.h fcrypt_b.c
|
||||
ofb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ofb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ofb64ede.o: ../../include/openssl/opensslconf.h
|
||||
ofb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ofb64ede.o: des_locl.h ofb64ede.c
|
||||
ofb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ofb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ofb64enc.o: ../../include/openssl/opensslconf.h
|
||||
ofb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ofb64enc.o: des_locl.h ofb64enc.c
|
||||
ofb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ofb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ofb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
ofb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
ofb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
ofb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ofb_enc.c
|
||||
pcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
pcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
pcbc_enc.o: ../../include/openssl/opensslconf.h
|
||||
pcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
pcbc_enc.o: des_locl.h pcbc_enc.c
|
||||
qud_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
qud_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
qud_cksm.o: ../../include/openssl/opensslconf.h
|
||||
qud_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
qud_cksm.o: des_locl.h qud_cksm.c
|
||||
rand_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
rand_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
rand_key.o: ../../include/openssl/opensslconf.h
|
||||
rand_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
rand_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
rand_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
rand_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
rand_key.o: rand_key.c
|
||||
read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
read2pwd.o: ../../include/openssl/opensslconf.h
|
||||
read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
read2pwd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
read2pwd.o: read2pwd.c
|
||||
rpc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
rpc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
rpc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
rpc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
rpc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
rpc_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h rpc_des.h
|
||||
rpc_enc.o: rpc_enc.c
|
||||
set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
set_key.o: ../../include/openssl/ui_compat.h des_locl.h set_key.c
|
||||
str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
str2key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
str2key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
str2key.o: ../../include/openssl/ui_compat.h des_locl.h str2key.c
|
||||
xcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
xcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
xcbc_enc.o: ../../include/openssl/opensslconf.h
|
||||
xcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
xcbc_enc.o: des_locl.h xcbc_enc.c
|
@ -140,3 +140,114 @@ void DES_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This is compatible with the single key CFB-r for DES, even thought that's
|
||||
* not what EVP needs.
|
||||
*/
|
||||
|
||||
void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out,
|
||||
int numbits,long length,DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||
DES_cblock *ivec,int enc)
|
||||
{
|
||||
register DES_LONG d0,d1,v0,v1;
|
||||
register long l=length;
|
||||
register int num=numbits,n=(numbits+7)/8,i;
|
||||
DES_LONG ti[2];
|
||||
unsigned char *iv;
|
||||
unsigned char ovec[16];
|
||||
|
||||
if (num > 64) return;
|
||||
iv = &(*ivec)[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
if (enc)
|
||||
{
|
||||
while (l >= n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
ti[1]=v1;
|
||||
DES_encrypt3(ti,ks1,ks2,ks3);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
* l<<32 are bad under gcc :-( */
|
||||
if (num == 32)
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else
|
||||
{
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (l >= n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
ti[1]=v1;
|
||||
DES_encrypt3(ti,ks1,ks2,ks3);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
* l<<32 are bad under gcc :-( */
|
||||
if (num == 32)
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else
|
||||
{
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
}
|
||||
}
|
||||
iv = &(*ivec)[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
v0=v1=d0=d1=ti[0]=ti[1]=0;
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,8 @@
|
||||
|
||||
#include "des_locl.h"
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
|
||||
{
|
||||
register DES_LONG l,r,t,u;
|
||||
@ -287,8 +289,12 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
|
||||
data[1]=r;
|
||||
}
|
||||
|
||||
#endif /* ndef OPENSSL_FIPS */
|
||||
|
||||
#ifndef DES_DEFAULT_OPTIONS
|
||||
|
||||
#if !defined(OPENSSL_FIPS) || !defined(I386_ONLY)
|
||||
|
||||
#undef CBC_ENC_C__DONT_UPDATE_IV
|
||||
#include "ncbc_enc.c" /* DES_ncbc_encrypt */
|
||||
|
||||
@ -404,4 +410,6 @@ void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
tin[0]=tin[1]=0;
|
||||
}
|
||||
|
||||
#endif /* !defined(OPENSSL_FIPS) || !defined(I386_ONLY) */
|
||||
|
||||
#endif /* DES_DEFAULT_OPTIONS */
|
||||
|
@ -84,7 +84,7 @@ void _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,_ossl_old_des_cblock
|
||||
des_key_schedule ks1,des_key_schedule ks2,
|
||||
des_key_schedule ks3, int enc)
|
||||
{
|
||||
DES_ecb3_encrypt((const_DES_cblock *)input, output,
|
||||
DES_ecb3_encrypt((const unsigned char *)input, (unsigned char *)output,
|
||||
(DES_key_schedule *)ks1, (DES_key_schedule *)ks2,
|
||||
(DES_key_schedule *)ks3, enc);
|
||||
}
|
||||
|
@ -439,8 +439,8 @@ int main(int argc, char *argv[])
|
||||
memcpy(in,plain_data[i],8);
|
||||
memset(out,0,8);
|
||||
memset(outin,0,8);
|
||||
des_ecb2_encrypt(&in,&out,ks,ks2,DES_ENCRYPT);
|
||||
des_ecb2_encrypt(&out,&outin,ks,ks2,DES_DECRYPT);
|
||||
des_ecb2_encrypt(in,out,ks,ks2,DES_ENCRYPT);
|
||||
des_ecb2_encrypt(out,outin,ks,ks2,DES_DECRYPT);
|
||||
|
||||
if (memcmp(out,cipher_ecb2[i],8) != 0)
|
||||
{
|
||||
|
@ -58,15 +58,13 @@
|
||||
|
||||
#include "des_locl.h"
|
||||
|
||||
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
|
||||
void DES_ecb3_encrypt(const unsigned char *in, unsigned char *out,
|
||||
DES_key_schedule *ks1, DES_key_schedule *ks2,
|
||||
DES_key_schedule *ks3,
|
||||
int enc)
|
||||
{
|
||||
register DES_LONG l0,l1;
|
||||
DES_LONG ll[2];
|
||||
const unsigned char *in = &(*input)[0];
|
||||
unsigned char *out = &(*output)[0];
|
||||
|
||||
c2l(in,l0);
|
||||
c2l(in,l1);
|
||||
|
@ -65,6 +65,8 @@
|
||||
*/
|
||||
#include "des_locl.h"
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
|
||||
|
||||
static const unsigned char odd_parity[256]={
|
||||
@ -405,3 +407,5 @@ void des_fixup_key_parity(des_cblock *key)
|
||||
des_set_odd_parity(key);
|
||||
}
|
||||
*/
|
||||
|
||||
#endif /* ndef OPENSSL_FIPS */
|
||||
|
131
crypto/openssl/crypto/dh/Makefile
Normal file
131
crypto/openssl/crypto/dh/Makefile
Normal file
@ -0,0 +1,131 @@
|
||||
#
|
||||
# SSLeay/crypto/dh/Makefile
|
||||
#
|
||||
|
||||
DIR= dh
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST= dhtest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c
|
||||
LIBOBJ= dh_asn1.o dh_gen.o dh_key.o dh_lib.o dh_check.o dh_err.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= dh.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
dh_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dh_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
dh_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dh_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dh_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dh_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
dh_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
dh_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dh_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_asn1.c
|
||||
dh_check.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dh_check.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dh_check.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
|
||||
dh_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dh_check.o: ../../include/openssl/opensslconf.h
|
||||
dh_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dh_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_check.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_check.c
|
||||
dh_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dh_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dh_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dh_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dh_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dh_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_err.o: ../../include/openssl/symhacks.h dh_err.c
|
||||
dh_gen.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dh_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dh_gen.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
|
||||
dh_gen.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dh_gen.o: ../cryptlib.h dh_gen.c
|
||||
dh_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
|
||||
dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c
|
||||
dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dh_lib.o: ../cryptlib.h dh_lib.c
|
@ -70,6 +70,8 @@
|
||||
* should hold.
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
int DH_check(const DH *dh, int *ret)
|
||||
{
|
||||
int ok=0;
|
||||
@ -118,3 +120,5 @@ int DH_check(const DH *dh, int *ret)
|
||||
if (q != NULL) BN_free(q);
|
||||
return(ok);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* crypto/dh/dh_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -86,6 +86,9 @@
|
||||
* It's just as OK (and in some sense better) to use a generator of the
|
||||
* order-q subgroup.
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
DH *DH_generate_parameters(int prime_len, int generator,
|
||||
void (*callback)(int,int,void *), void *cb_arg)
|
||||
{
|
||||
@ -167,3 +170,5 @@ DH *DH_generate_parameters(int prime_len, int generator,
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -62,6 +62,8 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/dh.h>
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
static int generate_key(DH *dh);
|
||||
static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
||||
static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
|
||||
@ -220,3 +222,5 @@ static int dh_finish(DH *dh)
|
||||
BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p);
|
||||
return(1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
173
crypto/openssl/crypto/dsa/Makefile
Normal file
173
crypto/openssl/crypto/dsa/Makefile
Normal file
@ -0,0 +1,173 @@
|
||||
#
|
||||
# SSLeay/crypto/dsa/Makefile
|
||||
#
|
||||
|
||||
DIR= dsa
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=dsatest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c \
|
||||
dsa_err.c dsa_ossl.c
|
||||
LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_asn1.o dsa_vrf.o dsa_sign.o \
|
||||
dsa_err.o dsa_ossl.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= dsa.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
dsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
dsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_asn1.o: ../../include/openssl/opensslconf.h
|
||||
dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c
|
||||
dsa_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dsa_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dsa_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dsa_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
dsa_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_err.o: dsa_err.c
|
||||
dsa_gen.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
dsa_gen.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
dsa_gen.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
dsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
dsa_gen.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
dsa_gen.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
dsa_gen.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dsa_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
dsa_gen.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
dsa_gen.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
dsa_gen.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
dsa_gen.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
dsa_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dsa_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dsa_gen.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
dsa_gen.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
dsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
dsa_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
dsa_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dsa_gen.o: ../../include/openssl/ui_compat.h ../cryptlib.h dsa_gen.c
|
||||
dsa_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dsa_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_key.o: ../cryptlib.h dsa_key.c
|
||||
dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
dsa_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_lib.o: ../../include/openssl/ui.h ../cryptlib.h dsa_lib.c
|
||||
dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_ossl.o: ../cryptlib.h dsa_ossl.c
|
||||
dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dsa_sign.o: ../cryptlib.h dsa_sign.c
|
||||
dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
dsa_vrf.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
|
||||
dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_vrf.o: ../../include/openssl/ui.h ../cryptlib.h dsa_vrf.c
|
@ -81,6 +81,10 @@
|
||||
|
||||
#define DSA_FLAG_CACHE_MONT_P 0x01
|
||||
|
||||
#if defined(OPENSSL_FIPS)
|
||||
#define FIPS_DSA_SIZE_T int
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -80,6 +80,7 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
DSA *DSA_generate_parameters(int bits,
|
||||
unsigned char *seed_in, int seed_len,
|
||||
int *counter_ret, unsigned long *h_ret,
|
||||
@ -293,4 +294,6 @@ DSA *DSA_generate_parameters(int bits,
|
||||
if (mont != NULL) BN_MONT_CTX_free(mont);
|
||||
return(ok?ret:NULL);
|
||||
}
|
||||
#endif
|
||||
#endif /* ndef OPENSSL_FIPS */
|
||||
#endif /* ndef OPENSSL_NO_SHA */
|
||||
|
||||
|
@ -64,6 +64,7 @@
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
int DSA_generate_key(DSA *dsa)
|
||||
{
|
||||
int ok=0;
|
||||
@ -103,3 +104,4 @@ int DSA_generate_key(DSA *dsa)
|
||||
return(ok);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
||||
static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||
@ -346,3 +347,4 @@ static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
{
|
||||
return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
|
||||
}
|
||||
#endif
|
||||
|
@ -64,9 +64,17 @@
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/fips.h>
|
||||
|
||||
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||
{
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(FIPS_mode() && !FIPS_dsa_check(dsa))
|
||||
return NULL;
|
||||
#endif
|
||||
return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
|
||||
}
|
||||
|
||||
@ -87,6 +95,10 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
||||
|
||||
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
{
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(FIPS_mode() && !FIPS_dsa_check(dsa))
|
||||
return 0;
|
||||
#endif
|
||||
return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
|
||||
}
|
||||
|
||||
|
@ -65,10 +65,18 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/fips.h>
|
||||
|
||||
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||
DSA *dsa)
|
||||
{
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(FIPS_mode() && !FIPS_dsa_check(dsa))
|
||||
return -1;
|
||||
#endif
|
||||
return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
||||
}
|
||||
|
||||
|
140
crypto/openssl/crypto/dso/Makefile
Normal file
140
crypto/openssl/crypto/dso/Makefile
Normal file
@ -0,0 +1,140 @@
|
||||
#
|
||||
# SSLeay/crypto/dso/Makefile
|
||||
#
|
||||
|
||||
DIR= dso
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \
|
||||
dso_openssl.c dso_win32.c dso_vms.c
|
||||
LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \
|
||||
dso_openssl.o dso_win32.o dso_vms.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= dso.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
dso_dl.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_dl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_dl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_dl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_dl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dso_dl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_dl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_dl.c
|
||||
dso_dlfcn.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_dlfcn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_dlfcn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_dlfcn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_dlfcn.o: ../../include/openssl/opensslconf.h
|
||||
dso_dlfcn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
dso_dlfcn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dso_dlfcn.o: ../cryptlib.h dso_dlfcn.c
|
||||
dso_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
dso_err.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dso_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_err.o: ../../include/openssl/symhacks.h dso_err.c
|
||||
dso_lib.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_lib.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dso_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_lib.c
|
||||
dso_null.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_null.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_null.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_null.o: ../../include/openssl/opensslconf.h
|
||||
dso_null.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
dso_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dso_null.o: ../cryptlib.h dso_null.c
|
||||
dso_openssl.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_openssl.o: ../../include/openssl/opensslconf.h
|
||||
dso_openssl.o: ../../include/openssl/opensslv.h
|
||||
dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_openssl.c
|
||||
dso_vms.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_vms.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_vms.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h dso_vms.c
|
||||
dso_win32.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
dso_win32.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dso_win32.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
dso_win32.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_win32.o: ../../include/openssl/opensslconf.h
|
||||
dso_win32.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
dso_win32.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dso_win32.o: ../cryptlib.h dso_win32.c
|
126
crypto/openssl/crypto/ec/Makefile
Normal file
126
crypto/openssl/crypto/ec/Makefile
Normal file
@ -0,0 +1,126 @@
|
||||
#
|
||||
# crypto/ec/Makefile
|
||||
#
|
||||
|
||||
DIR= ec
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=ectest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \
|
||||
ec_err.c
|
||||
|
||||
LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \
|
||||
ec_err.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= ec.h
|
||||
HEADER= ec_lcl.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
|
||||
ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
|
||||
ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h
|
||||
ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ec_err.o: ec_err.c
|
||||
ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ec_lib.o: ec_lcl.h ec_lib.c
|
||||
ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ec_mult.o: ec_lcl.h ec_mult.c
|
||||
ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecp_mont.o: ec_lcl.h ecp_mont.c
|
||||
ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
|
||||
ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
|
||||
ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
|
||||
ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
|
||||
ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
|
||||
ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c
|
||||
ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h
|
||||
ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecp_smpl.o: ec_lcl.h ecp_smpl.c
|
536
crypto/openssl/crypto/engine/Makefile
Normal file
536
crypto/openssl/crypto/engine/Makefile
Normal file
@ -0,0 +1,536 @@
|
||||
#
|
||||
# OpenSSL/crypto/engine/Makefile
|
||||
#
|
||||
|
||||
DIR= engine
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST= enginetest.c
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \
|
||||
eng_table.c eng_pkey.c eng_fat.c eng_all.c \
|
||||
tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \
|
||||
eng_openssl.c eng_dyn.c eng_cnf.c \
|
||||
hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \
|
||||
hw_cryptodev.c hw_aep.c hw_sureware.c hw_4758_cca.c
|
||||
LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \
|
||||
eng_table.o eng_pkey.o eng_fat.o eng_all.o \
|
||||
tb_rsa.o tb_dsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \
|
||||
eng_openssl.o eng_dyn.o eng_cnf.o \
|
||||
hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \
|
||||
hw_cryptodev.o hw_aep.o hw_sureware.o hw_4758_cca.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= engine.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
errors:
|
||||
$(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \
|
||||
-nostatic -staticloader -write hw_*.c
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
||||
eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
eng_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_all.o: ../../include/openssl/ui.h eng_all.c eng_int.h
|
||||
eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
|
||||
eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_cnf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_cnf.o: ../cryptlib.h eng_cnf.c
|
||||
eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_ctrl.o: ../../include/openssl/opensslconf.h
|
||||
eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_ctrl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h
|
||||
eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_dyn.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h
|
||||
eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
|
||||
eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
eng_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_err.o: ../../include/openssl/ui.h eng_err.c
|
||||
eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
|
||||
eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_fat.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h
|
||||
eng_init.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_init.o: ../../include/openssl/opensslconf.h
|
||||
eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_init.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_init.o: ../cryptlib.h eng_init.c eng_int.h
|
||||
eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
eng_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_lib.o: ../../include/openssl/ui.h ../cryptlib.h eng_int.h eng_lib.c
|
||||
eng_list.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_list.o: ../../include/openssl/opensslconf.h
|
||||
eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_list.o: ../cryptlib.h eng_int.h eng_list.c
|
||||
eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
eng_openssl.o: ../../include/openssl/opensslconf.h
|
||||
eng_openssl.o: ../../include/openssl/opensslv.h
|
||||
eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
|
||||
eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
|
||||
eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
eng_openssl.o: ../cryptlib.h eng_openssl.c
|
||||
eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
eng_pkey.o: ../../include/openssl/opensslconf.h
|
||||
eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c
|
||||
eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
eng_table.o: ../../include/openssl/objects.h
|
||||
eng_table.o: ../../include/openssl/opensslconf.h
|
||||
eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
eng_table.o: eng_int.h eng_table.c
|
||||
hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
hw_4758_cca.o: ../../include/openssl/opensslconf.h
|
||||
hw_4758_cca.o: ../../include/openssl/opensslv.h
|
||||
hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h
|
||||
hw_4758_cca.o: vendor_defns/hw_4758_cca.h
|
||||
hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h
|
||||
hw_aep.o: vendor_defns/aep.h
|
||||
hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
hw_atalla.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
hw_atalla.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
hw_atalla.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
hw_atalla.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h
|
||||
hw_atalla.o: vendor_defns/atalla.h
|
||||
hw_cryptodev.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
hw_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
hw_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
hw_cryptodev.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
hw_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
hw_cryptodev.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
hw_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
hw_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
hw_cryptodev.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
hw_cryptodev.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
hw_cryptodev.o: ../../include/openssl/objects.h
|
||||
hw_cryptodev.o: ../../include/openssl/opensslconf.h
|
||||
hw_cryptodev.o: ../../include/openssl/opensslv.h
|
||||
hw_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
hw_cryptodev.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
hw_cryptodev.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
hw_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
hw_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
hw_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_cryptodev.o: ../../include/openssl/ui_compat.h hw_cryptodev.c
|
||||
hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
hw_cswift.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
hw_cswift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
hw_cswift.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h
|
||||
hw_cswift.o: vendor_defns/cswift.h
|
||||
hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
hw_ncipher.o: ../../include/openssl/opensslconf.h
|
||||
hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
|
||||
hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c
|
||||
hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h
|
||||
hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
hw_nuron.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
hw_nuron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
hw_nuron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h
|
||||
hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h
|
||||
hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
hw_sureware.o: ../../include/openssl/opensslconf.h
|
||||
hw_sureware.o: ../../include/openssl/opensslv.h
|
||||
hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
|
||||
hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
|
||||
hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c
|
||||
hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h
|
||||
hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
hw_ubsec.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
hw_ubsec.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
hw_ubsec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h
|
||||
hw_ubsec.o: vendor_defns/hw_ubsec.h
|
||||
tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_cipher.o: ../../include/openssl/objects.h
|
||||
tb_cipher.o: ../../include/openssl/opensslconf.h
|
||||
tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
tb_cipher.o: eng_int.h tb_cipher.c
|
||||
tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h
|
||||
tb_dh.o: tb_dh.c
|
||||
tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_digest.o: ../../include/openssl/objects.h
|
||||
tb_digest.o: ../../include/openssl/opensslconf.h
|
||||
tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
tb_digest.o: eng_int.h tb_digest.c
|
||||
tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
tb_dsa.o: eng_int.h tb_dsa.c
|
||||
tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
tb_rand.o: eng_int.h tb_rand.c
|
||||
tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
|
||||
tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
tb_rsa.o: eng_int.h tb_rsa.c
|
@ -77,7 +77,7 @@ static int cryptodev_max_iv(int cipher);
|
||||
static int cryptodev_key_length_valid(int cipher, int len);
|
||||
static int cipher_nid_to_cryptodev(int nid);
|
||||
static int get_cryptodev_ciphers(const int **cnids);
|
||||
static int get_cryptodev_digests(const int **cnids);
|
||||
/*static int get_cryptodev_digests(const int **cnids);*/
|
||||
static int cryptodev_usable_ciphers(const int **nids);
|
||||
static int cryptodev_usable_digests(const int **nids);
|
||||
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
@ -137,6 +137,7 @@ static struct {
|
||||
{ 0, NID_undef, 0, 0, },
|
||||
};
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
static struct {
|
||||
int id;
|
||||
int nid;
|
||||
@ -149,6 +150,7 @@ static struct {
|
||||
{ CRYPTO_SHA1, NID_undef, },
|
||||
{ 0, NID_undef, },
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
||||
@ -258,7 +260,7 @@ get_cryptodev_ciphers(const int **cnids)
|
||||
int fd, i, count = 0;
|
||||
|
||||
if ((fd = get_dev_crypto()) < 0) {
|
||||
*nids = NULL;
|
||||
*cnids = NULL;
|
||||
return (0);
|
||||
}
|
||||
memset(&sess, 0, sizeof(sess));
|
||||
@ -289,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids)
|
||||
* returning them here is harmless, as long as we return NULL
|
||||
* when asked for a handler in the cryptodev_engine_digests routine
|
||||
*/
|
||||
#if 0 /* UNUSED */
|
||||
static int
|
||||
get_cryptodev_digests(const int **cnids)
|
||||
{
|
||||
@ -297,7 +300,7 @@ get_cryptodev_digests(const int **cnids)
|
||||
int fd, i, count = 0;
|
||||
|
||||
if ((fd = get_dev_crypto()) < 0) {
|
||||
*nids = NULL;
|
||||
*cnids = NULL;
|
||||
return (0);
|
||||
}
|
||||
memset(&sess, 0, sizeof(sess));
|
||||
@ -318,6 +321,7 @@ get_cryptodev_digests(const int **cnids)
|
||||
*cnids = NULL;
|
||||
return (count);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Find the useable ciphers|digests from dev/crypto - this is the first
|
||||
@ -623,7 +627,7 @@ static int
|
||||
bn2crparam(const BIGNUM *a, struct crparam *crp)
|
||||
{
|
||||
int i, j, k;
|
||||
ssize_t words, bytes, bits;
|
||||
ssize_t bytes, bits;
|
||||
u_char *b;
|
||||
|
||||
crp->crp_p = NULL;
|
||||
|
118
crypto/openssl/crypto/err/Makefile
Normal file
118
crypto/openssl/crypto/err/Makefile
Normal file
@ -0,0 +1,118 @@
|
||||
#
|
||||
# SSLeay/crypto/err/Makefile
|
||||
#
|
||||
|
||||
DIR= err
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES= -I.. -I$(TOP) -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
MAKEDEPPROG= makedepend
|
||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||
MAKEFILE= Makefile
|
||||
AR= ar r
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC=err.c err_all.c err_prn.c
|
||||
LIBOBJ=err.o err_all.o err_prn.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= err.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
top:
|
||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
||||
|
||||
all: lib
|
||||
|
||||
lib: $(LIBOBJ)
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@touch lib
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||
|
||||
install:
|
||||
@for i in $(EXHEADER) ; \
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
tests:
|
||||
|
||||
lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
err.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c
|
||||
err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
|
||||
err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
|
||||
err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
|
||||
err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
|
||||
err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
err_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
err_all.o: err_all.c
|
||||
err_prn.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
err_prn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
err_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
err_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
err_prn.o: ../cryptlib.h err_prn.c
|
@ -149,6 +149,7 @@ static ERR_STRING_DATA ERR_str_libraries[]=
|
||||
{ERR_PACK(ERR_LIB_DSO,0,0) ,"DSO support routines"},
|
||||
{ERR_PACK(ERR_LIB_ENGINE,0,0) ,"engine routines"},
|
||||
{ERR_PACK(ERR_LIB_OCSP,0,0) ,"OCSP routines"},
|
||||
{ERR_PACK(ERR_LIB_FIPS,0,0) ,"FIPS routines"},
|
||||
{0,NULL},
|
||||
};
|
||||
|
||||
|
@ -131,6 +131,7 @@ typedef struct err_state_st
|
||||
#define ERR_LIB_OCSP 39
|
||||
#define ERR_LIB_UI 40
|
||||
#define ERR_LIB_COMP 41
|
||||
#define ERR_LIB_FIPS 42
|
||||
|
||||
#define ERR_LIB_USER 128
|
||||
|
||||
@ -159,6 +160,7 @@ typedef struct err_state_st
|
||||
#define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__)
|
||||
#define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__)
|
||||
#define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__)
|
||||
#define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)
|
||||
|
||||
/* Borland C seems too stupid to be able to shift and do longs in
|
||||
* the pre-processor :-( */
|
||||
|
@ -27,6 +27,7 @@ L DSO crypto/dso/dso.h crypto/dso/dso_err.c
|
||||
L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c
|
||||
L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c
|
||||
L UI crypto/ui/ui.h crypto/ui/ui_err.c
|
||||
L FIPS fips/fips.h fips/fips_err.h
|
||||
|
||||
# additional header files to be scanned for function names
|
||||
L NONE crypto/x509/x509_vfy.h NONE
|
||||
|
1076
crypto/openssl/crypto/evp/Makefile
Normal file
1076
crypto/openssl/crypto/evp/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
@ -176,10 +176,11 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
{
|
||||
case BIO_CTRL_RESET:
|
||||
if (b->init)
|
||||
EVP_DigestInit_ex(ctx,ctx->digest, NULL);
|
||||
ret = EVP_DigestInit_ex(ctx,ctx->digest, NULL);
|
||||
else
|
||||
ret=0;
|
||||
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
|
||||
if (ret > 0)
|
||||
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
|
||||
break;
|
||||
case BIO_C_GET_MD:
|
||||
if (b->init)
|
||||
@ -199,6 +200,12 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
else
|
||||
ret=0;
|
||||
break;
|
||||
case BIO_C_SET_MD_CTX:
|
||||
if (b->init)
|
||||
b->ptr=ptr;
|
||||
else
|
||||
ret=0;
|
||||
break;
|
||||
case BIO_C_DO_STATE_MACHINE:
|
||||
BIO_clear_retry_flags(b);
|
||||
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
|
||||
@ -207,8 +214,9 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
|
||||
case BIO_C_SET_MD:
|
||||
md=ptr;
|
||||
EVP_DigestInit_ex(ctx,md, NULL);
|
||||
b->init=1;
|
||||
ret = EVP_DigestInit_ex(ctx,md, NULL);
|
||||
if (ret > 0)
|
||||
b->init=1;
|
||||
break;
|
||||
case BIO_CTRL_DUP:
|
||||
dbio=ptr;
|
||||
|
@ -67,6 +67,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
|
||||
#ifndef OPENSSL_NO_DES
|
||||
EVP_add_cipher(EVP_des_cfb());
|
||||
EVP_add_cipher(EVP_des_cfb1());
|
||||
EVP_add_cipher(EVP_des_cfb8());
|
||||
EVP_add_cipher(EVP_des_ede_cfb());
|
||||
EVP_add_cipher(EVP_des_ede3_cfb());
|
||||
|
||||
@ -150,6 +152,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_128_ecb());
|
||||
EVP_add_cipher(EVP_aes_128_cbc());
|
||||
EVP_add_cipher(EVP_aes_128_cfb());
|
||||
EVP_add_cipher(EVP_aes_128_cfb1());
|
||||
EVP_add_cipher(EVP_aes_128_cfb8());
|
||||
EVP_add_cipher(EVP_aes_128_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_128_ctr());
|
||||
@ -159,6 +163,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_192_ecb());
|
||||
EVP_add_cipher(EVP_aes_192_cbc());
|
||||
EVP_add_cipher(EVP_aes_192_cfb());
|
||||
EVP_add_cipher(EVP_aes_192_cfb1());
|
||||
EVP_add_cipher(EVP_aes_192_cfb8());
|
||||
EVP_add_cipher(EVP_aes_192_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_192_ctr());
|
||||
@ -168,6 +174,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_256_ecb());
|
||||
EVP_add_cipher(EVP_aes_256_cbc());
|
||||
EVP_add_cipher(EVP_aes_256_cfb());
|
||||
EVP_add_cipher(EVP_aes_256_cfb1());
|
||||
EVP_add_cipher(EVP_aes_256_cfb8());
|
||||
EVP_add_cipher(EVP_aes_256_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_256_ctr());
|
||||
|
@ -84,17 +84,35 @@ IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
#define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16)
|
||||
|
||||
IMPLEMENT_AES_CFBR(128,1)
|
||||
IMPLEMENT_AES_CFBR(192,1)
|
||||
IMPLEMENT_AES_CFBR(256,1)
|
||||
|
||||
IMPLEMENT_AES_CFBR(128,8)
|
||||
IMPLEMENT_AES_CFBR(192,8)
|
||||
IMPLEMENT_AES_CFBR(256,8)
|
||||
|
||||
static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc) {
|
||||
const unsigned char *iv, int enc)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_CFB_MODE
|
||||
|| (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE
|
||||
|| enc)
|
||||
AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
ret=AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
else
|
||||
AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
ret=AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
|
||||
if(ret < 0)
|
||||
{
|
||||
EVPerr(EVP_F_AES_INIT_KEY,EVP_R_AES_KEY_SETUP_FAILED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -56,9 +56,9 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_NO_DES
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#ifndef OPENSSL_NO_DES
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/objects.h>
|
||||
#include "evp_locl.h"
|
||||
@ -92,20 +92,53 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
static int des_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
|
||||
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Although we have a CFB-r implementation for DES, it doesn't pack the right
|
||||
way, so wrap it here */
|
||||
static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
for(n=0 ; n < inl ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
DES_cfb_encrypt(c,d,1,1,ctx->cipher_data,(DES_cblock *)ctx->iv,
|
||||
ctx->encrypt);
|
||||
out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_cfb_encrypt(in,out,8,inl,ctx->cipher_data,(DES_cblock *)ctx->iv,
|
||||
ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64,
|
||||
0, des_init_key, NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1,0,des_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8,0,des_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc)
|
||||
|
@ -56,9 +56,9 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_NO_DES
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#ifndef OPENSSL_NO_DES
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/objects.h>
|
||||
#include "evp_locl.h"
|
||||
@ -85,7 +85,7 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
BLOCK_CIPHER_ecb_loop()
|
||||
DES_ecb3_encrypt((DES_cblock *)(in + i), (DES_cblock *)(out + i),
|
||||
DES_ecb3_encrypt(in + i,out + i,
|
||||
&data(ctx)->ks1, &data(ctx)->ks2,
|
||||
&data(ctx)->ks3,
|
||||
ctx->encrypt);
|
||||
@ -121,7 +121,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
static int des_ede_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_ede3_cfb64_encrypt(in, out, (long)inl,
|
||||
@ -130,13 +130,42 @@ static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Although we have a CFB-r implementation for 3-DES, it doesn't pack the right
|
||||
way, so wrap it here */
|
||||
static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
for(n=0 ; n < inl ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
DES_ede3_cfb_encrypt(c,d,1,1,
|
||||
&data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3,
|
||||
(DES_cblock *)ctx->iv,ctx->encrypt);
|
||||
out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_ede3_cfb_encrypt(in,out,8,inl,
|
||||
&data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3,
|
||||
(DES_cblock *)ctx->iv,ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
|
||||
0, des_ede_init_key, NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
#define des_ede3_cfb_cipher des_ede_cfb_cipher
|
||||
#define des_ede3_cfb64_cipher des_ede_cfb64_cipher
|
||||
#define des_ede3_ofb_cipher des_ede_ofb_cipher
|
||||
#define des_ede3_cbc_cipher des_ede_cbc_cipher
|
||||
#define des_ede3_ecb_cipher des_ede_ecb_cipher
|
||||
@ -147,6 +176,16 @@ BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1,0,
|
||||
des_ede3_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8,0,
|
||||
des_ede3_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc)
|
||||
{
|
||||
|
108
crypto/openssl/crypto/evp/e_old.c
Normal file
108
crypto/openssl/crypto/evp/e_old.c
Normal file
@ -0,0 +1,108 @@
|
||||
/* crypto/evp/e_old.c -*- mode:C; c-file-style: "eay" -*- */
|
||||
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
|
||||
* project 2004.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2004 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
/* Define some deprecated functions, so older programs
|
||||
don't crash and burn too quickly. On Windows and VMS,
|
||||
these will never be used, since functions and variables
|
||||
in shared libraries are selected by entry point location,
|
||||
not by name. */
|
||||
|
||||
#ifndef OPENSSL_NO_BF
|
||||
#undef EVP_bf_cfb
|
||||
const EVP_CIPHER *EVP_bf_cfb(void) { return EVP_bf_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DES
|
||||
#undef EVP_des_cfb
|
||||
const EVP_CIPHER *EVP_des_cfb(void) { return EVP_des_cfb64(); }
|
||||
#undef EVP_des_ede3_cfb
|
||||
const EVP_CIPHER *EVP_des_ede3_cfb(void) { return EVP_des_ede3_cfb64(); }
|
||||
#undef EVP_des_ede_cfb
|
||||
const EVP_CIPHER *EVP_des_ede_cfb(void) { return EVP_des_ede_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_IDEA
|
||||
#undef EVP_idea_cfb
|
||||
const EVP_CIPHER *EVP_idea_cfb(void) { return EVP_idea_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_RC2
|
||||
#undef EVP_rc2_cfb
|
||||
const EVP_CIPHER *EVP_rc2_cfb(void) { return EVP_rc2_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_CAST5
|
||||
#undef EVP_cast5_cfb
|
||||
const EVP_CIPHER *EVP_cast5_cfb(void) { return EVP_cast5_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_RC5
|
||||
#undef EVP_rc5_32_12_16_cfb
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void) { return EVP_rc5_32_12_16_cfb64(); }
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
#undef EVP_aes_128_cfb
|
||||
const EVP_CIPHER *EVP_aes_128_cfb(void) { return EVP_aes_128_cfb128(); }
|
||||
#undef EVP_aes_192_cfb
|
||||
const EVP_CIPHER *EVP_aes_192_cfb(void) { return EVP_aes_192_cfb128(); }
|
||||
#undef EVP_aes_256_cfb
|
||||
const EVP_CIPHER *EVP_aes_256_cfb(void) { return EVP_aes_256_cfb128(); }
|
||||
#endif
|
@ -1,6 +1,6 @@
|
||||
/* crypto/evp/evp_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -66,6 +66,7 @@
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
static ERR_STRING_DATA EVP_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,EVP_F_AES_INIT_KEY,0), "AES_INIT_KEY"},
|
||||
{ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"},
|
||||
{ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"},
|
||||
{ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"},
|
||||
@ -99,6 +100,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
|
||||
|
||||
static ERR_STRING_DATA EVP_str_reasons[]=
|
||||
{
|
||||
{EVP_R_AES_KEY_SETUP_FAILED ,"aes key setup failed"},
|
||||
{EVP_R_BAD_BLOCK_LENGTH ,"bad block length"},
|
||||
{EVP_R_BAD_DECRYPT ,"bad decrypt"},
|
||||
{EVP_R_BAD_KEY_LENGTH ,"bad key length"},
|
||||
|
@ -68,7 +68,7 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
|
||||
if (c->cipher->set_asn1_parameters != NULL)
|
||||
ret=c->cipher->set_asn1_parameters(c,type);
|
||||
else
|
||||
ret=1;
|
||||
return -1;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
|
||||
if (c->cipher->get_asn1_parameters != NULL)
|
||||
ret=c->cipher->get_asn1_parameters(c,type);
|
||||
else
|
||||
ret=1;
|
||||
return -1;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@ -133,6 +133,30 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
|
||||
|
||||
return NID_rc4;
|
||||
|
||||
case NID_aes_128_cfb128:
|
||||
case NID_aes_128_cfb8:
|
||||
case NID_aes_128_cfb1:
|
||||
|
||||
return NID_aes_128_cfb128;
|
||||
|
||||
case NID_aes_192_cfb128:
|
||||
case NID_aes_192_cfb8:
|
||||
case NID_aes_192_cfb1:
|
||||
|
||||
return NID_aes_192_cfb128;
|
||||
|
||||
case NID_aes_256_cfb128:
|
||||
case NID_aes_256_cfb8:
|
||||
case NID_aes_256_cfb1:
|
||||
|
||||
return NID_aes_256_cfb128;
|
||||
|
||||
case NID_des_cfb64:
|
||||
case NID_des_cfb8:
|
||||
case NID_des_cfb1:
|
||||
|
||||
return NID_des_cfb64;
|
||||
|
||||
default:
|
||||
/* Check it has an OID and it is valid */
|
||||
otmp = OBJ_nid2obj(nid);
|
||||
|
@ -90,7 +90,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
|
||||
}
|
||||
|
||||
#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
|
||||
static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
|
||||
static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
|
||||
{\
|
||||
cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
|
||||
return 1;\
|
||||
@ -127,7 +127,7 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, kstruct, nid, block_size, key_len, \
|
||||
#define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \
|
||||
iv_len, cbits, flags, init_key, cleanup, \
|
||||
set_asn1, get_asn1, ctrl) \
|
||||
BLOCK_CIPHER_def1(cname, cfb##cbits, cfb, CFB, kstruct, nid, 1, \
|
||||
BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \
|
||||
key_len, iv_len, flags, init_key, cleanup, set_asn1, \
|
||||
get_asn1, ctrl)
|
||||
|
||||
@ -225,3 +225,12 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
|
||||
get_asn1, ctrl)
|
||||
|
||||
#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
|
||||
|
||||
#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \
|
||||
BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \
|
||||
BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \
|
||||
NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \
|
||||
0, cipher##_init_key, NULL, \
|
||||
EVP_CIPHER_set_asn1_iv, \
|
||||
EVP_CIPHER_get_asn1_iv, \
|
||||
NULL)
|
||||
|
@ -136,7 +136,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
||||
const unsigned char *iv,int in,
|
||||
const unsigned char *plaintext,int pn,
|
||||
const unsigned char *ciphertext,int cn,
|
||||
int encdec)
|
||||
int encdec,int multiplier)
|
||||
{
|
||||
EVP_CIPHER_CTX ctx;
|
||||
unsigned char out[4096];
|
||||
@ -162,22 +162,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
||||
if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv))
|
||||
{
|
||||
fprintf(stderr,"EncryptInit failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(10);
|
||||
}
|
||||
EVP_CIPHER_CTX_set_padding(&ctx,0);
|
||||
|
||||
if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn))
|
||||
if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn*multiplier))
|
||||
{
|
||||
fprintf(stderr,"Encrypt failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(6);
|
||||
}
|
||||
if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2))
|
||||
{
|
||||
fprintf(stderr,"EncryptFinal failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(7);
|
||||
}
|
||||
|
||||
if(outl+outl2 != cn)
|
||||
if(outl+outl2 != cn*multiplier)
|
||||
{
|
||||
fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n",
|
||||
outl+outl2,cn);
|
||||
@ -198,22 +201,25 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
||||
if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv))
|
||||
{
|
||||
fprintf(stderr,"DecryptInit failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(11);
|
||||
}
|
||||
EVP_CIPHER_CTX_set_padding(&ctx,0);
|
||||
|
||||
if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn))
|
||||
if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn*multiplier))
|
||||
{
|
||||
fprintf(stderr,"Decrypt failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(6);
|
||||
}
|
||||
if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2))
|
||||
{
|
||||
fprintf(stderr,"DecryptFinal failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
test1_exit(7);
|
||||
}
|
||||
|
||||
if(outl+outl2 != cn)
|
||||
if(outl+outl2 != cn*multiplier)
|
||||
{
|
||||
fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
|
||||
outl+outl2,cn);
|
||||
@ -238,7 +244,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn,
|
||||
const unsigned char *iv,int in,
|
||||
const unsigned char *plaintext,int pn,
|
||||
const unsigned char *ciphertext,int cn,
|
||||
int encdec)
|
||||
int encdec,int multiplier)
|
||||
{
|
||||
const EVP_CIPHER *c;
|
||||
|
||||
@ -246,7 +252,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn,
|
||||
if(!c)
|
||||
return 0;
|
||||
|
||||
test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec);
|
||||
test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec,multiplier);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -272,16 +278,19 @@ static int test_digest(const char *digest,
|
||||
if(!EVP_DigestInit_ex(&ctx,d, NULL))
|
||||
{
|
||||
fprintf(stderr,"DigestInit failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
EXIT(100);
|
||||
}
|
||||
if(!EVP_DigestUpdate(&ctx,plaintext,pn))
|
||||
{
|
||||
fprintf(stderr,"DigestUpdate failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
EXIT(101);
|
||||
}
|
||||
if(!EVP_DigestFinal_ex(&ctx,md,&mdn))
|
||||
{
|
||||
fprintf(stderr,"DigestFinal failed\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
EXIT(101);
|
||||
}
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
@ -359,6 +368,7 @@ int main(int argc,char **argv)
|
||||
unsigned char *iv,*key,*plaintext,*ciphertext;
|
||||
int encdec;
|
||||
int kn,in,pn,cn;
|
||||
int multiplier=1;
|
||||
|
||||
if(!fgets((char *)line,sizeof line,f))
|
||||
break;
|
||||
@ -383,7 +393,15 @@ int main(int argc,char **argv)
|
||||
pn=convert(plaintext);
|
||||
cn=convert(ciphertext);
|
||||
|
||||
if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec)
|
||||
if(strchr(cipher,'*'))
|
||||
{
|
||||
p=cipher;
|
||||
sstrsep(&p,"*");
|
||||
multiplier=atoi(sstrsep(&p,"*"));
|
||||
}
|
||||
|
||||
if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec,
|
||||
multiplier)
|
||||
&& !test_digest(cipher,plaintext,pn,ciphertext,cn))
|
||||
{
|
||||
fprintf(stderr,"Can't find %s\n",cipher);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user