Pull FIPS back into stable.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
openssl.pc
|
openssl.pc
|
||||||
Makefile.ssl
|
Makefile
|
||||||
MINFO
|
MINFO
|
||||||
makefile.one
|
makefile.one
|
||||||
tmp
|
tmp
|
||||||
@@ -14,3 +14,4 @@ cctest.c
|
|||||||
cctest.a
|
cctest.a
|
||||||
libcrypto.so.*
|
libcrypto.so.*
|
||||||
libssl.so.*
|
libssl.so.*
|
||||||
|
libcrypto.sha1
|
||||||
|
46
Configure
46
Configure
@@ -10,7 +10,7 @@ use strict;
|
|||||||
|
|
||||||
# see INSTALL for instructions.
|
# 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:
|
# Options:
|
||||||
#
|
#
|
||||||
@@ -135,11 +135,12 @@ my %table=(
|
|||||||
# Our development configs
|
# Our development configs
|
||||||
"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
|
"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", "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","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-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-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-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-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-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}",
|
||||||
@@ -609,7 +610,7 @@ my $threads=0;
|
|||||||
my $no_asm=0;
|
my $no_asm=0;
|
||||||
my $no_dso=0;
|
my $no_dso=0;
|
||||||
my @skip=();
|
my @skip=();
|
||||||
my $Makefile="Makefile.ssl";
|
my $Makefile="Makefile";
|
||||||
my $des_locl="crypto/des/des_locl.h";
|
my $des_locl="crypto/des/des_locl.h";
|
||||||
my $des ="crypto/des/des.h";
|
my $des ="crypto/des/des.h";
|
||||||
my $bn ="crypto/bn/bn.h";
|
my $bn ="crypto/bn/bn.h";
|
||||||
@@ -621,6 +622,7 @@ my $rc2 ="crypto/rc2/rc2.h";
|
|||||||
my $bf ="crypto/bf/bf_locl.h";
|
my $bf ="crypto/bf/bf_locl.h";
|
||||||
my $bn_asm ="bn_asm.o";
|
my $bn_asm ="bn_asm.o";
|
||||||
my $des_enc="des_enc.o fcrypt_b.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 $bf_enc ="bf_enc.o";
|
||||||
my $cast_enc="c_enc.o";
|
my $cast_enc="c_enc.o";
|
||||||
my $rc4_enc="rc4_enc.o";
|
my $rc4_enc="rc4_enc.o";
|
||||||
@@ -631,6 +633,8 @@ my $rmd160_obj="";
|
|||||||
my $processor="";
|
my $processor="";
|
||||||
my $default_ranlib;
|
my $default_ranlib;
|
||||||
my $perl;
|
my $perl;
|
||||||
|
my $fips=0;
|
||||||
|
my $debug=0;
|
||||||
|
|
||||||
my $no_ssl2=0;
|
my $no_ssl2=0;
|
||||||
my $no_ssl3=0;
|
my $no_ssl3=0;
|
||||||
@@ -739,6 +743,8 @@ PROCESS_ARGS:
|
|||||||
{ $no_ssl3 = 1; }
|
{ $no_ssl3 = 1; }
|
||||||
elsif (/^no-tls1?$/)
|
elsif (/^no-tls1?$/)
|
||||||
{ $no_tls1 = 1; }
|
{ $no_tls1 = 1; }
|
||||||
|
elsif (/^no-fips$/)
|
||||||
|
{ $fips = 0; }
|
||||||
elsif (/^no-(.+)$/)
|
elsif (/^no-(.+)$/)
|
||||||
{
|
{
|
||||||
my $algo=$1;
|
my $algo=$1;
|
||||||
@@ -804,6 +810,14 @@ PROCESS_ARGS:
|
|||||||
}
|
}
|
||||||
elsif (/^386$/)
|
elsif (/^386$/)
|
||||||
{ $processor=386; }
|
{ $processor=386; }
|
||||||
|
elsif (/^fips$/)
|
||||||
|
{
|
||||||
|
$fips=1;
|
||||||
|
}
|
||||||
|
elsif (/^debug$/)
|
||||||
|
{
|
||||||
|
$debug=1;
|
||||||
|
}
|
||||||
elsif (/^rsaref$/)
|
elsif (/^rsaref$/)
|
||||||
{
|
{
|
||||||
# No RSAref support any more since it's not needed.
|
# No RSAref support any more since it's not needed.
|
||||||
@@ -1139,12 +1153,20 @@ if ($ranlib eq "")
|
|||||||
|
|
||||||
$bn_obj = $bn_asm unless $bn_obj ne "";
|
$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$/);
|
$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/);
|
||||||
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
|
$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/);
|
||||||
$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
|
$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/);
|
||||||
$rc5_obj=$rc5_enc unless ($rc5_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;
|
# $sha1_obj=$sha1_enc;
|
||||||
$cflags.=" -DSHA1_ASM";
|
$cflags.=" -DSHA1_ASM";
|
||||||
@@ -1160,6 +1182,12 @@ if ($rmd160_obj =~ /\.o$/)
|
|||||||
$cflags.=" -DRMD160_ASM";
|
$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
|
# "Stringify" the C flags string. This permits it to be made part of a string
|
||||||
# and works as well on command lines.
|
# and works as well on command lines.
|
||||||
$cflags =~ s/([\\\"])/\\\1/g;
|
$cflags =~ s/([\\\"])/\\\1/g;
|
||||||
@@ -1232,12 +1260,14 @@ while (<IN>)
|
|||||||
s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
|
s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
|
||||||
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
|
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
|
||||||
s/^DES_ENC=.*$/DES_ENC= $des_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/^BF_ENC=.*$/BF_ENC= $bf_obj/;
|
||||||
s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
|
s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
|
||||||
s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
|
s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/;
|
||||||
s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
|
s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/;
|
||||||
s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
|
s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
|
||||||
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_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/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||||
@@ -1470,7 +1500,7 @@ if($IsWindows) {
|
|||||||
printf OUT <<EOF;
|
printf OUT <<EOF;
|
||||||
#ifndef MK1MF_BUILD
|
#ifndef MK1MF_BUILD
|
||||||
/* auto-generated by Configure for crypto/cversion.c:
|
/* 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
|
* Windows builds (and other mk1mf builds) compile cversion.c with
|
||||||
* -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
|
* -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
|
||||||
#error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
|
#error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
|
||||||
@@ -1478,7 +1508,7 @@ if($IsWindows) {
|
|||||||
EOF
|
EOF
|
||||||
close(OUT);
|
close(OUT);
|
||||||
} else {
|
} else {
|
||||||
my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
|
my $make_command = "make PERL=\'$perl\'";
|
||||||
my $make_targets = "";
|
my $make_targets = "";
|
||||||
$make_targets .= " links" if $symlink;
|
$make_targets .= " links" if $symlink;
|
||||||
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
||||||
|
2
FAQ
2
FAQ
@@ -460,7 +460,7 @@ get the best result from OpenSSL. A bit more complicated solution is the
|
|||||||
following:
|
following:
|
||||||
|
|
||||||
----- snip:start -----
|
----- 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 /'`"
|
sed -e 's/ -O[0-9] / -O0 /'`"
|
||||||
rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
|
rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
|
||||||
make
|
make
|
||||||
|
4
INSTALL
4
INSTALL
@@ -123,7 +123,7 @@
|
|||||||
generic configurations "cc" or "gcc" should usually work on 32 bit
|
generic configurations "cc" or "gcc" should usually work on 32 bit
|
||||||
systems.
|
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
|
defines various macros in crypto/opensslconf.h (generated from
|
||||||
crypto/opensslconf.h.in).
|
crypto/opensslconf.h.in).
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
the failure that isn't a problem in OpenSSL itself (like a missing
|
the failure that isn't a problem in OpenSSL itself (like a missing
|
||||||
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
||||||
try removing any compiler optimization flags from the CFLAG line
|
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
|
report to <openssl-bugs@openssl.org>, including the output of
|
||||||
"make report" in order to be added to the request tracker at
|
"make report" in order to be added to the request tracker at
|
||||||
http://www.openssl.org/support/rt2.html.
|
http://www.openssl.org/support/rt2.html.
|
||||||
|
13
INSTALL.W32
13
INSTALL.W32
@@ -46,12 +46,13 @@
|
|||||||
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
||||||
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
||||||
|
|
||||||
Firstly you should run Configure:
|
Firstly you should run Configure (to build a FIPS-certified variant of
|
||||||
|
OpenSSL, add the option "fips"):
|
||||||
|
|
||||||
> perl Configure VC-WIN32
|
> perl Configure VC-WIN32
|
||||||
|
|
||||||
Next you need to build the Makefiles and optionally the assembly language
|
Next you need to build the Makefiles and optionally the assembly language
|
||||||
files:
|
files (to build a FIPS-certified variant of OpenSSL, add the argument "fips"):
|
||||||
|
|
||||||
- If you are using MASM then run:
|
- If you are using MASM then run:
|
||||||
|
|
||||||
@@ -100,10 +101,12 @@
|
|||||||
Borland C++ builder 5
|
Borland C++ builder 5
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
* Configure for building with Borland Builder:
|
* Configure for building with Borland Builder (to build a FIPS-certified
|
||||||
|
variant of OpenSSL, add the option "fips"):
|
||||||
> perl Configure BC-32
|
> perl Configure BC-32
|
||||||
|
|
||||||
* Create the appropriate makefile
|
* Create the appropriate makefile (to build a FIPS-certified variant of
|
||||||
|
OpenSSL, add the argument "fips")
|
||||||
> ms\do_nasm
|
> ms\do_nasm
|
||||||
|
|
||||||
* Build
|
* Build
|
||||||
@@ -194,6 +197,8 @@
|
|||||||
occur, try
|
occur, try
|
||||||
> ms\mingw32 no-asm
|
> ms\mingw32 no-asm
|
||||||
instead.
|
instead.
|
||||||
|
If you want to build a FIPS-certified variant of OpenSSL, add the argument
|
||||||
|
"fips"
|
||||||
|
|
||||||
libcrypto.a and libssl.a are the static libraries. To use the DLLs,
|
libcrypto.a and libssl.a are the static libraries. To use the DLLs,
|
||||||
link with libeay32.a and libssl32.a instead.
|
link with libeay32.a and libssl32.a instead.
|
||||||
|
70
Makefile.org
70
Makefile.org
@@ -101,6 +101,7 @@ PROCESSOR=
|
|||||||
|
|
||||||
# Set DES_ENC to des_enc.o if you want to use the C version
|
# Set DES_ENC to des_enc.o if you want to use the C version
|
||||||
#There are 4 x86 assember options.
|
#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= asm/dx86-out.o asm/yx86-out.o
|
||||||
#DES_ENC= des_enc.o fcrypt_b.o # C
|
#DES_ENC= des_enc.o fcrypt_b.o # C
|
||||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
|
#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
|
# Also need SHA1_ASM defined
|
||||||
SHA1_ASM_OBJ= asm/sx86-out.o
|
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-elf.o # elf
|
||||||
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
||||||
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
||||||
@@ -173,23 +175,24 @@ LIBKRB5=
|
|||||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||||
SHLIB_MARK=
|
SHLIB_MARK=
|
||||||
|
|
||||||
DIRS= crypto ssl $(SHLIB_MARK) apps test tools
|
DIRS= crypto fips ssl $(SHLIB_MARK) sigs apps test tools
|
||||||
SHLIBDIRS= crypto ssl
|
SHLIBDIRS= fips crypto ssl
|
||||||
|
|
||||||
# dirs in crypto to build
|
# dirs in crypto to build
|
||||||
SDIRS= \
|
SDIRS= objects \
|
||||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||||
des rc2 rc4 rc5 idea bf cast \
|
des rc2 rc4 rc5 idea bf cast \
|
||||||
bn ec rsa dsa dh dso engine aes \
|
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
|
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
|
||||||
|
|
||||||
|
FDIRS= sha1 rand des aes dsa rsa
|
||||||
|
|
||||||
# tests to perform. "alltests" is a special word indicating that all tests
|
# tests to perform. "alltests" is a special word indicating that all tests
|
||||||
# should be performed.
|
# should be performed.
|
||||||
TESTS = alltests
|
TESTS = alltests
|
||||||
|
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
|
|
||||||
MANDIR=$(OPENSSLDIR)/man
|
MANDIR=$(OPENSSLDIR)/man
|
||||||
MAN1=1
|
MAN1=1
|
||||||
@@ -202,6 +205,7 @@ ONEDIRS=out tmp
|
|||||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||||
WDIRS= windows
|
WDIRS= windows
|
||||||
LIBS= libcrypto.a libssl.a
|
LIBS= libcrypto.a libssl.a
|
||||||
|
SIGS= libcrypto.sha1
|
||||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||||
SHARED_LIBS=
|
SHARED_LIBS=
|
||||||
@@ -219,14 +223,32 @@ HEADER= e_os.h
|
|||||||
# When we're prepared to use shared libraries in the programs we link here
|
# 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
|
# 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.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.sha1; \
|
||||||
|
fi
|
||||||
|
|
||||||
sub_all:
|
sub_all:
|
||||||
@for i in $(DIRS); \
|
@for i in $(DIRS); \
|
||||||
do \
|
do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making all in $$i..." && \
|
(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 \
|
else \
|
||||||
$(MAKE) $$i; \
|
$(MAKE) $$i; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -483,7 +505,7 @@ do_hpux-shared:
|
|||||||
libs="$(LIBKRB5) $$libs"; \
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
fi; \
|
fi; \
|
||||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||||
+vnocompatwarnings \
|
+vnocompatwarnings \
|
||||||
-b -z +s \
|
-b -z +s \
|
||||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
@@ -506,7 +528,7 @@ do_hpux64-shared:
|
|||||||
libs="$(LIBKRB5) $$libs"; \
|
libs="$(LIBKRB5) $$libs"; \
|
||||||
fi; \
|
fi; \
|
||||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||||
-b -z \
|
-b -z \
|
||||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
+forceload lib$$i.a -ldl -lc ) || exit 1; \
|
||||||
@@ -577,7 +599,7 @@ do_reliantunix-shared:
|
|||||||
libs="-l$$i $$libs"; \
|
libs="-l$$i $$libs"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
openssl.pc: Makefile.ssl
|
openssl.pc: Makefile
|
||||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||||
echo 'exec_prefix=$${prefix}'; \
|
echo 'exec_prefix=$${prefix}'; \
|
||||||
echo 'libdir=$${exec_prefix}/lib'; \
|
echo 'libdir=$${exec_prefix}/lib'; \
|
||||||
@@ -590,8 +612,8 @@ openssl.pc: Makefile.ssl
|
|||||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||||
|
|
||||||
Makefile.ssl: Makefile.org
|
Makefile: Makefile.org
|
||||||
@echo "Makefile.ssl is older than Makefile.org."
|
@echo "Makefile is older than Makefile.org."
|
||||||
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
@echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||||
@false
|
@false
|
||||||
|
|
||||||
@@ -621,7 +643,7 @@ makefile.one: files
|
|||||||
sh util/do_ms.sh
|
sh util/do_ms.sh
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
@@ -631,19 +653,18 @@ files:
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
||||||
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
||||||
@for i in $(DIRS); do \
|
@for i in $(DIRS); do \
|
||||||
if [ -d "$$i" ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making links in $$i..." && \
|
(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; \
|
fi; \
|
||||||
done;
|
done;
|
||||||
|
|
||||||
gentests:
|
gentests:
|
||||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
@(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:
|
dclean:
|
||||||
rm -f *.bak
|
rm -f *.bak
|
||||||
@@ -672,7 +693,7 @@ test: tests
|
|||||||
|
|
||||||
tests: rehash
|
tests: rehash
|
||||||
@(cd test && echo "testing..." && \
|
@(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"; \
|
@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||||
@@ -795,7 +816,9 @@ install: all install_docs
|
|||||||
if [ -f "$$i" ]; then \
|
if [ -f "$$i" ]; then \
|
||||||
( echo installing $$i; \
|
( echo installing $$i; \
|
||||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
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 \
|
||||||
|
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||||
|
fi; \
|
||||||
chmod 644 $(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 ); \
|
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -832,6 +855,15 @@ install: all install_docs
|
|||||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||||
fi; \
|
fi; \
|
||||||
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
|
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
||||||
|
|
||||||
|
4
PROBLEMS
4
PROBLEMS
@@ -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
|
means that -L switches won't matter unless OpenSSL is built with shared
|
||||||
library support.
|
library support.
|
||||||
|
|
||||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
The workaround may be to change the following lines in apps/Makefile and
|
||||||
test/Makefile.ssl:
|
test/Makefile:
|
||||||
|
|
||||||
LIBCRYPTO=-L.. -lcrypto
|
LIBCRYPTO=-L.. -lcrypto
|
||||||
LIBSSL=-L.. -lssl
|
LIBSSL=-L.. -lssl
|
||||||
|
@@ -3,3 +3,4 @@ Makefile.save
|
|||||||
der_chop
|
der_chop
|
||||||
der_chop.bak
|
der_chop.bak
|
||||||
CA.pl
|
CA.pl
|
||||||
|
openssl.sha1
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# apps/Makefile.ssl
|
# apps/Makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
DIR= apps
|
DIR= apps
|
||||||
@@ -10,10 +10,9 @@ CFLAG= -g -static
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
INSTALLTOP= /usr/local/ssl
|
INSTALLTOP= /usr/local/ssl
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
PERL= perl
|
PERL= perl
|
||||||
RM= rm -f
|
RM= rm -f
|
||||||
# KRB5 stuff
|
# KRB5 stuff
|
||||||
@@ -94,7 +93,7 @@ sreq.o: req.c
|
|||||||
$(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
|
$(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@for i in $(EXE); \
|
@for i in $(EXE); \
|
||||||
@@ -121,7 +120,6 @@ tags:
|
|||||||
tests:
|
tests:
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||||
@@ -151,6 +149,7 @@ $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
|||||||
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
||||||
$(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
|
$(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
|
||||||
fi
|
fi
|
||||||
|
TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a $(PROGRAM)
|
||||||
-(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
|
-(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
|
||||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||||
@@ -344,21 +343,22 @@ dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
|||||||
dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h
|
dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h
|
||||||
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||||
dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
|
dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||||
dgst.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
dgst.o: ../include/openssl/evp.h ../include/openssl/hmac.h
|
||||||
dgst.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
dgst.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
dgst.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
dgst.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
dgst.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||||
dgst.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
dgst.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
dgst.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||||
dgst.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
dgst.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
dgst.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
|
dgst.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||||
dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h dgst.c
|
dgst.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
|
||||||
|
dgst.o: ../include/openssl/x509_vfy.h apps.h dgst.c
|
||||||
dh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
|
dh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
|
||||||
dh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
|
dh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
|
||||||
dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||||
@@ -637,24 +637,25 @@ openssl.o: ../include/openssl/des.h ../include/openssl/des_old.h
|
|||||||
openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||||
openssl.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
openssl.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
||||||
openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
openssl.o: ../include/openssl/idea.h ../include/openssl/kssl.h
|
openssl.o: ../include/openssl/fips.h ../include/openssl/idea.h
|
||||||
openssl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||||
openssl.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
openssl.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
openssl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
openssl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||||
openssl.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
openssl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
openssl.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||||
openssl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
openssl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
openssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
openssl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
openssl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
openssl.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||||
openssl.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
openssl.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||||
openssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
openssl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
openssl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
openssl.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||||
openssl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
|
openssl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
|
||||||
openssl.o: ../include/openssl/x509_vfy.h apps.h openssl.c progs.h s_apps.h
|
openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||||
|
openssl.o: openssl.c progs.h s_apps.h
|
||||||
passwd.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
|
passwd.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
|
||||||
passwd.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
|
passwd.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
|
||||||
passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
10
apps/apps.c
10
apps/apps.c
@@ -126,16 +126,6 @@
|
|||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#endif
|
#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
|
#define NON_MAIN
|
||||||
#include "apps.h"
|
#include "apps.h"
|
||||||
#undef NON_MAIN
|
#undef NON_MAIN
|
||||||
|
10
apps/ca.c
10
apps/ca.c
@@ -76,16 +76,6 @@
|
|||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/pem.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
|
#ifndef W_OK
|
||||||
# ifdef OPENSSL_SYS_VMS
|
# ifdef OPENSSL_SYS_VMS
|
||||||
# if defined(__DECC)
|
# if defined(__DECC)
|
||||||
|
50
apps/dgst.c
50
apps/dgst.c
@@ -66,6 +66,7 @@
|
|||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
#include <openssl/hmac.h>
|
||||||
|
|
||||||
#undef BUFSIZE
|
#undef BUFSIZE
|
||||||
#define BUFSIZE 1024*8
|
#define BUFSIZE 1024*8
|
||||||
@@ -73,9 +74,11 @@
|
|||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG dgst_main
|
#define PROG dgst_main
|
||||||
|
|
||||||
|
static HMAC_CTX hmac_ctx;
|
||||||
|
|
||||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
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,
|
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 **);
|
int MAIN(int, char **);
|
||||||
|
|
||||||
@@ -103,6 +106,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
char *engine=NULL;
|
char *engine=NULL;
|
||||||
#endif
|
#endif
|
||||||
|
char *hmac_key=NULL;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -181,6 +185,12 @@ int MAIN(int argc, char **argv)
|
|||||||
out_bin = 1;
|
out_bin = 1;
|
||||||
else if (strcmp(*argv,"-d") == 0)
|
else if (strcmp(*argv,"-d") == 0)
|
||||||
debug=1;
|
debug=1;
|
||||||
|
else if (!strcmp(*argv,"-hmac"))
|
||||||
|
{
|
||||||
|
if (--argc < 1)
|
||||||
|
break;
|
||||||
|
hmac_key=*++argv;
|
||||||
|
}
|
||||||
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
||||||
md=m;
|
md=m;
|
||||||
else
|
else
|
||||||
@@ -235,7 +245,7 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
e = setup_engine(bio_err, engine, 0);
|
e = setup_engine(bio_err, engine, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
in=BIO_new(BIO_s_file());
|
in=BIO_new(BIO_s_file());
|
||||||
@@ -319,8 +329,6 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* we use md as a filter, reading from 'in' */
|
/* we use md as a filter, reading from 'in' */
|
||||||
BIO_set_md(bmd,md);
|
BIO_set_md(bmd,md);
|
||||||
inp=BIO_push(bmd,in);
|
inp=BIO_push(bmd,in);
|
||||||
@@ -329,7 +337,7 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
||||||
err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
|
err=do_fp(out, buf,inp,separator, out_bin, sigkey, sigbuf,
|
||||||
siglen,"","(stdin)");
|
siglen,"","(stdin)",bmd,hmac_key);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -347,14 +355,15 @@ int MAIN(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if(!out_bin)
|
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);
|
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
|
else
|
||||||
tmp="";
|
tmp="";
|
||||||
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
r=do_fp(out,buf,inp,separator,out_bin,sigkey,sigbuf,
|
||||||
siglen,tmp,argv[i]);
|
siglen,tmp,argv[i],bmd,hmac_key);
|
||||||
if(r)
|
if(r)
|
||||||
err=r;
|
err=r;
|
||||||
if(tofree)
|
if(tofree)
|
||||||
@@ -379,11 +388,21 @@ end:
|
|||||||
|
|
||||||
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
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,
|
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;
|
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 (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
i=BIO_read(bp,(char *)buf,BUFSIZE);
|
||||||
@@ -426,6 +445,11 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(hmac_key)
|
||||||
|
{
|
||||||
|
HMAC_Final(&hmac_ctx,buf,&len);
|
||||||
|
HMAC_CTX_cleanup(&hmac_ctx);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
len=BIO_gets(bp,(char *)buf,BUFSIZE);
|
len=BIO_gets(bp,(char *)buf,BUFSIZE);
|
||||||
|
|
||||||
@@ -433,7 +457,7 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_write(out,title,strlen(title));
|
BIO_write(out,title,strlen(title));
|
||||||
for (i=0; i<len; i++)
|
for (i=0; (unsigned int)i<len; i++)
|
||||||
{
|
{
|
||||||
if (sep && (i != 0))
|
if (sep && (i != 0))
|
||||||
BIO_printf(out, ":");
|
BIO_printf(out, ":");
|
||||||
@@ -441,6 +465,10 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
|||||||
}
|
}
|
||||||
BIO_printf(out, "\n");
|
BIO_printf(out, "\n");
|
||||||
}
|
}
|
||||||
|
if (hmac_key)
|
||||||
|
{
|
||||||
|
BIO_set_md_ctx(bmd,md_ctx);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -129,6 +129,7 @@
|
|||||||
#include "progs.h"
|
#include "progs.h"
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
|
||||||
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
|
/* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the
|
||||||
* base prototypes (we cast each variable inside the function to the required
|
* base prototypes (we cast each variable inside the function to the required
|
||||||
@@ -231,6 +232,24 @@ int main(int Argc, char *Argv[])
|
|||||||
arg.data=NULL;
|
arg.data=NULL;
|
||||||
arg.count=0;
|
arg.count=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);
|
||||||
|
}
|
||||||
|
if (getenv("OPENSSL_FIPS_MD5"))
|
||||||
|
FIPS_allow_md5(1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
@@ -11,10 +11,9 @@ CFLAG= -g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP= /usr/local/ssl
|
INSTALLTOP= /usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
RM= rm -f
|
RM= rm -f
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
@@ -52,9 +51,9 @@ top:
|
|||||||
|
|
||||||
all: shared
|
all: shared
|
||||||
|
|
||||||
buildinf.h: ../Makefile.ssl
|
buildinf.h: ../Makefile
|
||||||
( echo "#ifndef MK1MF_BUILD"; \
|
( echo "#ifndef MK1MF_BUILD"; \
|
||||||
echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
|
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
|
||||||
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
||||||
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
||||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||||
@@ -73,7 +72,7 @@ subdirs:
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
@for i in $(SDIRS) ;\
|
@for i in $(SDIRS) ;\
|
||||||
do \
|
do \
|
||||||
(cd $$i && echo "making 'files' in crypto/$$i..." && \
|
(cd $$i && echo "making 'files' in crypto/$$i..." && \
|
||||||
@@ -81,11 +80,9 @@ files:
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@for i in $(SDIRS); do \
|
@for i in $(SDIRS); do \
|
||||||
(cd $$i && echo "making links in crypto/$$i..." && \
|
(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 ); \
|
$(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 ); \
|
||||||
@@ -203,6 +200,8 @@ 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/opensslconf.h ../include/openssl/opensslv.h
|
||||||
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||||
mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
|
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: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
|
||||||
o_time.o: o_time.h
|
o_time.o: o_time.h
|
||||||
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP= /usr/local/ssl
|
INSTALLTOP= /usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
|
# CFLAGS= -mpentiumpro $(INCLUDES) $(CFLAG) -O3 -fexpensive-optimizations -funroll-loops -fforce-addr
|
||||||
@@ -49,10 +48,9 @@ lib: $(LIBOBJ)
|
|||||||
$(LIBOBJ): $(LIBSRC)
|
$(LIBOBJ): $(LIBSRC)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -91,7 +89,8 @@ 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/aes.h ../../include/openssl/e_os2.h
|
||||||
aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c aes_locl.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/aes.h ../../include/openssl/e_os2.h
|
||||||
aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.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/aes.h ../../include/openssl/e_os2.h
|
||||||
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c aes_locl.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/aes.h ../../include/openssl/e_os2.h
|
@@ -95,6 +95,15 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
|||||||
void AES_cfb128_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,
|
const unsigned long length, const AES_KEY *key,
|
||||||
unsigned char *ivec, int *num, const int enc);
|
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,
|
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||||
const unsigned long length, const AES_KEY *key,
|
const unsigned long length, const AES_KEY *key,
|
||||||
unsigned char *ivec, int *num);
|
unsigned char *ivec, int *num);
|
||||||
|
@@ -155,3 +155,96 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
|||||||
*num=n;
|
*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 <stdlib.h>
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
|
#include <openssl/fips.h>
|
||||||
#include "aes_locl.h"
|
#include "aes_locl.h"
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Te0[x] = S [x].[02, 01, 01, 03];
|
Te0[x] = S [x].[02, 01, 01, 03];
|
||||||
Te1[x] = S [x].[03, 02, 01, 01];
|
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);
|
PUTU32(out + 12, s3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -74,10 +73,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
BF_ENC= bf_enc.o
|
BF_ENC= bf_enc.o
|
||||||
@@ -65,10 +64,9 @@ asm/bx86unix.cpp: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
|||||||
(cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
|
(cd asm; $(PERL) bf-586.pl cpp $(PROCESSOR) >bx86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -54,10 +53,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -347,6 +347,7 @@ typedef struct bio_f_buffer_ctx_struct
|
|||||||
#define BIO_C_NWRITE0 145
|
#define BIO_C_NWRITE0 145
|
||||||
#define BIO_C_NWRITE 146
|
#define BIO_C_NWRITE 146
|
||||||
#define BIO_C_RESET_READ_REQUEST 147
|
#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)
|
#define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
|
||||||
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
BN_ASM= bn_asm.o
|
BN_ASM= bn_asm.o
|
||||||
@@ -124,10 +123,9 @@ asm/pa-risc2W.o: asm/pa-risc2W.s
|
|||||||
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
|||||||
EXIT(0);
|
EXIT(0);
|
||||||
err:
|
err:
|
||||||
BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices
|
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);
|
BIO_flush(out);
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CAST_ENC=c_enc.o
|
CAST_ENC=c_enc.o
|
||||||
@@ -68,10 +67,9 @@ asm/cx86unix.cpp: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
|||||||
(cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
|
(cd asm; $(PERL) cast-586.pl cpp $(PROCESSOR) >cx86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -1 +1,2 @@
|
|||||||
cx86unix.cpp
|
cx86unix.cpp
|
||||||
|
cx86-elf.s
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -47,10 +46,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -47,10 +46,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -66,6 +66,11 @@
|
|||||||
static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
|
static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
int FIPS_mode;
|
||||||
|
void *FIPS_rand_check;
|
||||||
|
#endif /* def OPENSSL_FIPS */
|
||||||
|
|
||||||
DECLARE_STACK_OF(CRYPTO_dynlock)
|
DECLARE_STACK_OF(CRYPTO_dynlock)
|
||||||
IMPLEMENT_STACK_OF(CRYPTO_dynlock)
|
IMPLEMENT_STACK_OF(CRYPTO_dynlock)
|
||||||
|
|
||||||
|
@@ -158,7 +158,7 @@ $!
|
|||||||
$ APPS_DES = "DES/DES,CBC3_ENC"
|
$ APPS_DES = "DES/DES,CBC3_ENC"
|
||||||
$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
|
$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
|
||||||
$
|
$
|
||||||
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time"
|
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time,o_str"
|
||||||
$ LIB_MD2 = "md2_dgst,md2_one"
|
$ LIB_MD2 = "md2_dgst,md2_one"
|
||||||
$ LIB_MD4 = "md4_dgst,md4_one"
|
$ LIB_MD4 = "md4_dgst,md4_one"
|
||||||
$ LIB_MD5 = "md5_dgst,md5_one"
|
$ LIB_MD5 = "md5_dgst,md5_one"
|
||||||
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
RANLIB= ranlib
|
RANLIB= ranlib
|
||||||
DES_ENC= des_enc.o fcrypt_b.o
|
DES_ENC= des_enc.o fcrypt_b.o
|
||||||
@@ -94,10 +93,9 @@ asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl
|
|||||||
(cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
|
(cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -170,7 +168,7 @@ 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/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.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/symhacks.h ../../include/openssl/ui.h
|
||||||
des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c
|
des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h
|
||||||
des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
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/des_old.h ../../include/openssl/e_os2.h
|
||||||
des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
@@ -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);
|
DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -128,7 +128,7 @@ OPENSSL_DECLARE_GLOBAL(int,DES_rw_mode); /* defaults to DES_PCBC_MODE */
|
|||||||
#define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
|
#define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
|
||||||
|
|
||||||
const char *DES_options(void);
|
const char *DES_options(void);
|
||||||
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
|
void DES_ecb3_encrypt(const unsigned char *input, unsigned char *output,
|
||||||
DES_key_schedule *ks1,DES_key_schedule *ks2,
|
DES_key_schedule *ks1,DES_key_schedule *ks2,
|
||||||
DES_key_schedule *ks3, int enc);
|
DES_key_schedule *ks3, int enc);
|
||||||
DES_LONG DES_cbc_cksum(const unsigned char *input,DES_cblock *output,
|
DES_LONG DES_cbc_cksum(const unsigned char *input,DES_cblock *output,
|
||||||
@@ -187,6 +187,10 @@ void DES_ede3_cfb64_encrypt(const unsigned char *in,unsigned char *out,
|
|||||||
long length,DES_key_schedule *ks1,
|
long length,DES_key_schedule *ks1,
|
||||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||||
DES_cblock *ivec,int *num,int enc);
|
DES_cblock *ivec,int *num,int enc);
|
||||||
|
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);
|
||||||
void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out,
|
void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out,
|
||||||
long length,DES_key_schedule *ks1,
|
long length,DES_key_schedule *ks1,
|
||||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||||
|
@@ -58,6 +58,8 @@
|
|||||||
|
|
||||||
#include "des_locl.h"
|
#include "des_locl.h"
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
|
|
||||||
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
|
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
|
||||||
{
|
{
|
||||||
register DES_LONG l,r,t,u;
|
register DES_LONG l,r,t,u;
|
||||||
@@ -287,8 +289,12 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
|
|||||||
data[1]=r;
|
data[1]=r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
|
||||||
#ifndef DES_DEFAULT_OPTIONS
|
#ifndef DES_DEFAULT_OPTIONS
|
||||||
|
|
||||||
|
#if !defined(OPENSSL_FIPS) || !defined(I386_ONLY)
|
||||||
|
|
||||||
#undef CBC_ENC_C__DONT_UPDATE_IV
|
#undef CBC_ENC_C__DONT_UPDATE_IV
|
||||||
#include "ncbc_enc.c" /* DES_ncbc_encrypt */
|
#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;
|
tin[0]=tin[1]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* !defined(OPENSSL_FIPS) || !defined(I386_ONLY) */
|
||||||
|
|
||||||
#endif /* DES_DEFAULT_OPTIONS */
|
#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 ks1,des_key_schedule ks2,
|
||||||
des_key_schedule ks3, int enc)
|
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 *)ks1, (DES_key_schedule *)ks2,
|
||||||
(DES_key_schedule *)ks3, enc);
|
(DES_key_schedule *)ks3, enc);
|
||||||
}
|
}
|
||||||
|
@@ -439,8 +439,8 @@ int main(int argc, char *argv[])
|
|||||||
memcpy(in,plain_data[i],8);
|
memcpy(in,plain_data[i],8);
|
||||||
memset(out,0,8);
|
memset(out,0,8);
|
||||||
memset(outin,0,8);
|
memset(outin,0,8);
|
||||||
des_ecb2_encrypt(&in,&out,ks,ks2,DES_ENCRYPT);
|
des_ecb2_encrypt(in,out,ks,ks2,DES_ENCRYPT);
|
||||||
des_ecb2_encrypt(&out,&outin,ks,ks2,DES_DECRYPT);
|
des_ecb2_encrypt(out,outin,ks,ks2,DES_DECRYPT);
|
||||||
|
|
||||||
if (memcmp(out,cipher_ecb2[i],8) != 0)
|
if (memcmp(out,cipher_ecb2[i],8) != 0)
|
||||||
{
|
{
|
||||||
|
@@ -58,15 +58,13 @@
|
|||||||
|
|
||||||
#include "des_locl.h"
|
#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 *ks1, DES_key_schedule *ks2,
|
||||||
DES_key_schedule *ks3,
|
DES_key_schedule *ks3,
|
||||||
int enc)
|
int enc)
|
||||||
{
|
{
|
||||||
register DES_LONG l0,l1;
|
register DES_LONG l0,l1;
|
||||||
DES_LONG ll[2];
|
DES_LONG ll[2];
|
||||||
const unsigned char *in = &(*input)[0];
|
|
||||||
unsigned char *out = &(*output)[0];
|
|
||||||
|
|
||||||
c2l(in,l0);
|
c2l(in,l0);
|
||||||
c2l(in,l1);
|
c2l(in,l1);
|
||||||
|
@@ -65,6 +65,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "des_locl.h"
|
#include "des_locl.h"
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
|
|
||||||
OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
|
OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key); /* defaults to false */
|
||||||
|
|
||||||
static const unsigned char odd_parity[256]={
|
static const unsigned char odd_parity[256]={
|
||||||
@@ -405,3 +407,5 @@ void des_fixup_key_parity(des_cblock *key)
|
|||||||
des_set_odd_parity(key);
|
des_set_odd_parity(key);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -46,10 +45,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -153,19 +151,23 @@ 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/bio.h ../../include/openssl/bn.h
|
||||||
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.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/dh.h ../../include/openssl/dsa.h
|
||||||
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.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/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||||
dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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_sign.o: ../cryptlib.h dsa_sign.c
|
||||||
dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
|
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/asn1_mac.h ../../include/openssl/bio.h
|
||||||
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.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/crypto.h ../../include/openssl/dh.h
|
||||||
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||||
dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.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/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||||
dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
dsa_vrf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
dsa_vrf.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_vrf.c
|
dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
|
dsa_vrf.o: ../../include/openssl/ui.h ../cryptlib.h dsa_vrf.c
|
@@ -80,6 +80,7 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
DSA *DSA_generate_parameters(int bits,
|
DSA *DSA_generate_parameters(int bits,
|
||||||
unsigned char *seed_in, int seed_len,
|
unsigned char *seed_in, int seed_len,
|
||||||
int *counter_ret, unsigned long *h_ret,
|
int *counter_ret, unsigned long *h_ret,
|
||||||
@@ -293,4 +294,6 @@ err:
|
|||||||
if (mont != NULL) BN_MONT_CTX_free(mont);
|
if (mont != NULL) BN_MONT_CTX_free(mont);
|
||||||
return(ok?ret:NULL);
|
return(ok?ret:NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
#endif /* ndef OPENSSL_NO_SHA */
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
int DSA_generate_key(DSA *dsa)
|
int DSA_generate_key(DSA *dsa)
|
||||||
{
|
{
|
||||||
int ok=0;
|
int ok=0;
|
||||||
@@ -103,3 +104,4 @@ err:
|
|||||||
return(ok);
|
return(ok);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
@@ -65,6 +65,7 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
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_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,
|
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);
|
return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@@ -64,9 +64,17 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.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)
|
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);
|
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)
|
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);
|
return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,10 +65,18 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/asn1_mac.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,
|
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||||
DSA *dsa)
|
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);
|
return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -46,10 +45,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -47,10 +46,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -54,10 +53,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -77,7 +77,7 @@ static int cryptodev_max_iv(int cipher);
|
|||||||
static int cryptodev_key_length_valid(int cipher, int len);
|
static int cryptodev_key_length_valid(int cipher, int len);
|
||||||
static int cipher_nid_to_cryptodev(int nid);
|
static int cipher_nid_to_cryptodev(int nid);
|
||||||
static int get_cryptodev_ciphers(const int **cnids);
|
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_ciphers(const int **nids);
|
||||||
static int cryptodev_usable_digests(const int **nids);
|
static int cryptodev_usable_digests(const int **nids);
|
||||||
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
@@ -137,6 +137,7 @@ static struct {
|
|||||||
{ 0, NID_undef, 0, 0, },
|
{ 0, NID_undef, 0, 0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static struct {
|
static struct {
|
||||||
int id;
|
int id;
|
||||||
int nid;
|
int nid;
|
||||||
@@ -149,6 +150,7 @@ static struct {
|
|||||||
{ CRYPTO_SHA1, NID_undef, },
|
{ CRYPTO_SHA1, NID_undef, },
|
||||||
{ 0, NID_undef, },
|
{ 0, NID_undef, },
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
||||||
@@ -289,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids)
|
|||||||
* returning them here is harmless, as long as we return NULL
|
* returning them here is harmless, as long as we return NULL
|
||||||
* when asked for a handler in the cryptodev_engine_digests routine
|
* when asked for a handler in the cryptodev_engine_digests routine
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static int
|
static int
|
||||||
get_cryptodev_digests(const int **cnids)
|
get_cryptodev_digests(const int **cnids)
|
||||||
{
|
{
|
||||||
@@ -318,6 +321,7 @@ get_cryptodev_digests(const int **cnids)
|
|||||||
*cnids = NULL;
|
*cnids = NULL;
|
||||||
return (count);
|
return (count);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the useable ciphers|digests from dev/crypto - this is the first
|
* 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)
|
bn2crparam(const BIGNUM *a, struct crparam *crp)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
ssize_t words, bytes, bits;
|
ssize_t bytes, bits;
|
||||||
u_char *b;
|
u_char *b;
|
||||||
|
|
||||||
crp->crp_p = NULL;
|
crp->crp_p = NULL;
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -94,22 +92,23 @@ 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/dsa.h ../../include/openssl/dso.h
|
||||||
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.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/engine.h ../../include/openssl/err.h
|
||||||
err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
|
||||||
err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||||
err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||||
err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||||
err_all.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
|
err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
|
||||||
err_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem2.h
|
err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
|
err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
|
||||||
err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||||
err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||||
err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
err_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||||
err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
err_all.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||||
err_all.o: ../../include/openssl/x509v3.h err_all.c
|
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: ../../e_os.h ../../include/openssl/bio.h
|
||||||
err_prn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.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/e_os2.h ../../include/openssl/err.h
|
@@ -131,6 +131,7 @@ typedef struct err_state_st
|
|||||||
#define ERR_LIB_OCSP 39
|
#define ERR_LIB_OCSP 39
|
||||||
#define ERR_LIB_UI 40
|
#define ERR_LIB_UI 40
|
||||||
#define ERR_LIB_COMP 41
|
#define ERR_LIB_COMP 41
|
||||||
|
#define ERR_LIB_FIPS 42
|
||||||
|
|
||||||
#define ERR_LIB_USER 128
|
#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 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 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 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
|
/* Borland C seems too stupid to be able to shift and do longs in
|
||||||
* the pre-processor :-( */
|
* the pre-processor :-( */
|
||||||
|
@@ -87,6 +87,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
|
||||||
void ERR_load_crypto_strings(void)
|
void ERR_load_crypto_strings(void)
|
||||||
{
|
{
|
||||||
@@ -129,5 +130,8 @@ void ERR_load_crypto_strings(void)
|
|||||||
#endif
|
#endif
|
||||||
ERR_load_OCSP_strings();
|
ERR_load_OCSP_strings();
|
||||||
ERR_load_UI_strings();
|
ERR_load_UI_strings();
|
||||||
|
#endif
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
ERR_load_FIPS_strings();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -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 ENGINE crypto/engine/engine.h crypto/engine/eng_err.c
|
||||||
L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_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 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
|
# additional header files to be scanned for function names
|
||||||
L NONE crypto/x509/x509_vfy.h NONE
|
L NONE crypto/x509/x509_vfy.h NONE
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -64,10 +63,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
cp $(TESTDATA) ../../test
|
cp $(TESTDATA) ../../test
|
@@ -199,6 +199,12 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
|
|||||||
else
|
else
|
||||||
ret=0;
|
ret=0;
|
||||||
break;
|
break;
|
||||||
|
case BIO_C_SET_MD_CTX:
|
||||||
|
if (b->init)
|
||||||
|
b->ptr=ptr;
|
||||||
|
else
|
||||||
|
ret=0;
|
||||||
|
break;
|
||||||
case BIO_C_DO_STATE_MACHINE:
|
case BIO_C_DO_STATE_MACHINE:
|
||||||
BIO_clear_retry_flags(b);
|
BIO_clear_retry_flags(b);
|
||||||
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
|
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
|
||||||
|
@@ -67,6 +67,8 @@ void OpenSSL_add_all_ciphers(void)
|
|||||||
|
|
||||||
#ifndef OPENSSL_NO_DES
|
#ifndef OPENSSL_NO_DES
|
||||||
EVP_add_cipher(EVP_des_cfb());
|
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_ede_cfb());
|
||||||
EVP_add_cipher(EVP_des_ede3_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_ecb());
|
||||||
EVP_add_cipher(EVP_aes_128_cbc());
|
EVP_add_cipher(EVP_aes_128_cbc());
|
||||||
EVP_add_cipher(EVP_aes_128_cfb());
|
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());
|
EVP_add_cipher(EVP_aes_128_ofb());
|
||||||
#if 0
|
#if 0
|
||||||
EVP_add_cipher(EVP_aes_128_ctr());
|
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_ecb());
|
||||||
EVP_add_cipher(EVP_aes_192_cbc());
|
EVP_add_cipher(EVP_aes_192_cbc());
|
||||||
EVP_add_cipher(EVP_aes_192_cfb());
|
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());
|
EVP_add_cipher(EVP_aes_192_ofb());
|
||||||
#if 0
|
#if 0
|
||||||
EVP_add_cipher(EVP_aes_192_ctr());
|
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_ecb());
|
||||||
EVP_add_cipher(EVP_aes_256_cbc());
|
EVP_add_cipher(EVP_aes_256_cbc());
|
||||||
EVP_add_cipher(EVP_aes_256_cfb());
|
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());
|
EVP_add_cipher(EVP_aes_256_ofb());
|
||||||
#if 0
|
#if 0
|
||||||
EVP_add_cipher(EVP_aes_256_ctr());
|
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,
|
EVP_CIPHER_get_asn1_iv,
|
||||||
NULL)
|
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,
|
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
|
if ((ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_CFB_MODE
|
||||||
|| (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE
|
|| (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE
|
||||||
|| enc)
|
|| 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
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,9 +56,9 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DES
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
|
#ifndef OPENSSL_NO_DES
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include "evp_locl.h"
|
#include "evp_locl.h"
|
||||||
@@ -92,20 +92,53 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
static int des_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
const unsigned char *in, unsigned int inl)
|
const unsigned char *in, unsigned int inl)
|
||||||
{
|
{
|
||||||
DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
|
DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
|
||||||
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
|
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
|
||||||
return 1;
|
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,
|
BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64,
|
||||||
0, des_init_key, NULL,
|
0, des_init_key, NULL,
|
||||||
EVP_CIPHER_set_asn1_iv,
|
EVP_CIPHER_set_asn1_iv,
|
||||||
EVP_CIPHER_get_asn1_iv,
|
EVP_CIPHER_get_asn1_iv,
|
||||||
NULL)
|
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,
|
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||||
const unsigned char *iv, int enc)
|
const unsigned char *iv, int enc)
|
||||||
|
@@ -56,9 +56,9 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_DES
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
|
#ifndef OPENSSL_NO_DES
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include "evp_locl.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)
|
const unsigned char *in, unsigned int inl)
|
||||||
{
|
{
|
||||||
BLOCK_CIPHER_ecb_loop()
|
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)->ks1, &data(ctx)->ks2,
|
||||||
&data(ctx)->ks3,
|
&data(ctx)->ks3,
|
||||||
ctx->encrypt);
|
ctx->encrypt);
|
||||||
@@ -121,7 +121,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
|||||||
return 1;
|
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)
|
const unsigned char *in, unsigned int inl)
|
||||||
{
|
{
|
||||||
DES_ede3_cfb64_encrypt(in, out, (long)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;
|
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,
|
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
|
||||||
0, des_ede_init_key, NULL,
|
0, des_ede_init_key, NULL,
|
||||||
EVP_CIPHER_set_asn1_iv,
|
EVP_CIPHER_set_asn1_iv,
|
||||||
EVP_CIPHER_get_asn1_iv,
|
EVP_CIPHER_get_asn1_iv,
|
||||||
NULL)
|
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_ofb_cipher des_ede_ofb_cipher
|
||||||
#define des_ede3_cbc_cipher des_ede_cbc_cipher
|
#define des_ede3_cbc_cipher des_ede_cbc_cipher
|
||||||
#define des_ede3_ecb_cipher des_ede_ecb_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,
|
EVP_CIPHER_get_asn1_iv,
|
||||||
NULL)
|
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,
|
static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||||
const unsigned char *iv, int enc)
|
const unsigned char *iv, int enc)
|
||||||
{
|
{
|
||||||
|
@@ -499,6 +499,7 @@ void BIO_set_md(BIO *,const EVP_MD *md);
|
|||||||
#endif
|
#endif
|
||||||
#define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp)
|
#define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp)
|
||||||
#define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp)
|
#define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp)
|
||||||
|
#define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp)
|
||||||
#define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL)
|
#define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL)
|
||||||
#define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp)
|
#define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp)
|
||||||
|
|
||||||
@@ -640,9 +641,20 @@ const EVP_CIPHER *EVP_des_ede(void);
|
|||||||
const EVP_CIPHER *EVP_des_ede3(void);
|
const EVP_CIPHER *EVP_des_ede3(void);
|
||||||
const EVP_CIPHER *EVP_des_ede_ecb(void);
|
const EVP_CIPHER *EVP_des_ede_ecb(void);
|
||||||
const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||||
const EVP_CIPHER *EVP_des_cfb(void);
|
const EVP_CIPHER *EVP_des_cfb64(void);
|
||||||
const EVP_CIPHER *EVP_des_ede_cfb(void);
|
# define EVP_des_cfb EVP_des_cfb64
|
||||||
const EVP_CIPHER *EVP_des_ede3_cfb(void);
|
const EVP_CIPHER *EVP_des_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_des_cfb8(void);
|
||||||
|
const EVP_CIPHER *EVP_des_ede_cfb64(void);
|
||||||
|
# define EVP_des_ede_cfb EVP_des_ede_cfb64
|
||||||
|
#if 0
|
||||||
|
const EVP_CIPHER *EVP_des_ede_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_des_ede_cfb8(void);
|
||||||
|
#endif
|
||||||
|
const EVP_CIPHER *EVP_des_ede3_cfb64(void);
|
||||||
|
# define EVP_des_ede3_cfb EVP_des_ede3_cfb64
|
||||||
|
const EVP_CIPHER *EVP_des_ede3_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_des_ede3_cfb8(void);
|
||||||
const EVP_CIPHER *EVP_des_ofb(void);
|
const EVP_CIPHER *EVP_des_ofb(void);
|
||||||
const EVP_CIPHER *EVP_des_ede_ofb(void);
|
const EVP_CIPHER *EVP_des_ede_ofb(void);
|
||||||
const EVP_CIPHER *EVP_des_ede3_ofb(void);
|
const EVP_CIPHER *EVP_des_ede3_ofb(void);
|
||||||
@@ -666,7 +678,8 @@ const EVP_CIPHER *EVP_rc4_40(void);
|
|||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_IDEA
|
#ifndef OPENSSL_NO_IDEA
|
||||||
const EVP_CIPHER *EVP_idea_ecb(void);
|
const EVP_CIPHER *EVP_idea_ecb(void);
|
||||||
const EVP_CIPHER *EVP_idea_cfb(void);
|
const EVP_CIPHER *EVP_idea_cfb64(void);
|
||||||
|
# define EVP_idea_cfb EVP_idea_cfb64
|
||||||
const EVP_CIPHER *EVP_idea_ofb(void);
|
const EVP_CIPHER *EVP_idea_ofb(void);
|
||||||
const EVP_CIPHER *EVP_idea_cbc(void);
|
const EVP_CIPHER *EVP_idea_cbc(void);
|
||||||
#endif
|
#endif
|
||||||
@@ -675,45 +688,58 @@ const EVP_CIPHER *EVP_rc2_ecb(void);
|
|||||||
const EVP_CIPHER *EVP_rc2_cbc(void);
|
const EVP_CIPHER *EVP_rc2_cbc(void);
|
||||||
const EVP_CIPHER *EVP_rc2_40_cbc(void);
|
const EVP_CIPHER *EVP_rc2_40_cbc(void);
|
||||||
const EVP_CIPHER *EVP_rc2_64_cbc(void);
|
const EVP_CIPHER *EVP_rc2_64_cbc(void);
|
||||||
const EVP_CIPHER *EVP_rc2_cfb(void);
|
const EVP_CIPHER *EVP_rc2_cfb64(void);
|
||||||
|
# define EVP_rc2_cfb EVP_rc2_cfb64
|
||||||
const EVP_CIPHER *EVP_rc2_ofb(void);
|
const EVP_CIPHER *EVP_rc2_ofb(void);
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_BF
|
#ifndef OPENSSL_NO_BF
|
||||||
const EVP_CIPHER *EVP_bf_ecb(void);
|
const EVP_CIPHER *EVP_bf_ecb(void);
|
||||||
const EVP_CIPHER *EVP_bf_cbc(void);
|
const EVP_CIPHER *EVP_bf_cbc(void);
|
||||||
const EVP_CIPHER *EVP_bf_cfb(void);
|
const EVP_CIPHER *EVP_bf_cfb64(void);
|
||||||
|
# define EVP_bf_cfb EVP_bf_cfb64
|
||||||
const EVP_CIPHER *EVP_bf_ofb(void);
|
const EVP_CIPHER *EVP_bf_ofb(void);
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_CAST
|
#ifndef OPENSSL_NO_CAST
|
||||||
const EVP_CIPHER *EVP_cast5_ecb(void);
|
const EVP_CIPHER *EVP_cast5_ecb(void);
|
||||||
const EVP_CIPHER *EVP_cast5_cbc(void);
|
const EVP_CIPHER *EVP_cast5_cbc(void);
|
||||||
const EVP_CIPHER *EVP_cast5_cfb(void);
|
const EVP_CIPHER *EVP_cast5_cfb64(void);
|
||||||
|
# define EVP_cast5_cfb EVP_cast5_cfb64
|
||||||
const EVP_CIPHER *EVP_cast5_ofb(void);
|
const EVP_CIPHER *EVP_cast5_ofb(void);
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_RC5
|
#ifndef OPENSSL_NO_RC5
|
||||||
const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
|
const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
|
||||||
const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
|
const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
|
||||||
const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void);
|
const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void);
|
||||||
|
# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64
|
||||||
const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
|
const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
|
||||||
#endif
|
#endif
|
||||||
#ifndef OPENSSL_NO_AES
|
#ifndef OPENSSL_NO_AES
|
||||||
const EVP_CIPHER *EVP_aes_128_ecb(void);
|
const EVP_CIPHER *EVP_aes_128_ecb(void);
|
||||||
const EVP_CIPHER *EVP_aes_128_cbc(void);
|
const EVP_CIPHER *EVP_aes_128_cbc(void);
|
||||||
const EVP_CIPHER *EVP_aes_128_cfb(void);
|
const EVP_CIPHER *EVP_aes_128_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_128_cfb8(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
||||||
|
# define EVP_aes_128_cfb EVP_aes_128_cfb128
|
||||||
const EVP_CIPHER *EVP_aes_128_ofb(void);
|
const EVP_CIPHER *EVP_aes_128_ofb(void);
|
||||||
#if 0
|
#if 0
|
||||||
const EVP_CIPHER *EVP_aes_128_ctr(void);
|
const EVP_CIPHER *EVP_aes_128_ctr(void);
|
||||||
#endif
|
#endif
|
||||||
const EVP_CIPHER *EVP_aes_192_ecb(void);
|
const EVP_CIPHER *EVP_aes_192_ecb(void);
|
||||||
const EVP_CIPHER *EVP_aes_192_cbc(void);
|
const EVP_CIPHER *EVP_aes_192_cbc(void);
|
||||||
const EVP_CIPHER *EVP_aes_192_cfb(void);
|
const EVP_CIPHER *EVP_aes_192_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_192_cfb8(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_192_cfb128(void);
|
||||||
|
# define EVP_aes_192_cfb EVP_aes_192_cfb128
|
||||||
const EVP_CIPHER *EVP_aes_192_ofb(void);
|
const EVP_CIPHER *EVP_aes_192_ofb(void);
|
||||||
#if 0
|
#if 0
|
||||||
const EVP_CIPHER *EVP_aes_192_ctr(void);
|
const EVP_CIPHER *EVP_aes_192_ctr(void);
|
||||||
#endif
|
#endif
|
||||||
const EVP_CIPHER *EVP_aes_256_ecb(void);
|
const EVP_CIPHER *EVP_aes_256_ecb(void);
|
||||||
const EVP_CIPHER *EVP_aes_256_cbc(void);
|
const EVP_CIPHER *EVP_aes_256_cbc(void);
|
||||||
const EVP_CIPHER *EVP_aes_256_cfb(void);
|
const EVP_CIPHER *EVP_aes_256_cfb1(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_256_cfb8(void);
|
||||||
|
const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||||
|
# define EVP_aes_256_cfb EVP_aes_256_cfb128
|
||||||
const EVP_CIPHER *EVP_aes_256_ofb(void);
|
const EVP_CIPHER *EVP_aes_256_ofb(void);
|
||||||
#if 0
|
#if 0
|
||||||
const EVP_CIPHER *EVP_aes_256_ctr(void);
|
const EVP_CIPHER *EVP_aes_256_ctr(void);
|
||||||
@@ -825,6 +851,7 @@ void ERR_load_EVP_strings(void);
|
|||||||
/* Error codes for the EVP functions. */
|
/* Error codes for the EVP functions. */
|
||||||
|
|
||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
|
#define EVP_F_AES_INIT_KEY 129
|
||||||
#define EVP_F_D2I_PKEY 100
|
#define EVP_F_D2I_PKEY 100
|
||||||
#define EVP_F_EVP_CIPHERINIT 123
|
#define EVP_F_EVP_CIPHERINIT 123
|
||||||
#define EVP_F_EVP_CIPHER_CTX_CTRL 124
|
#define EVP_F_EVP_CIPHER_CTX_CTRL 124
|
||||||
@@ -855,6 +882,7 @@ void ERR_load_EVP_strings(void);
|
|||||||
#define EVP_F_RC5_CTRL 125
|
#define EVP_F_RC5_CTRL 125
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
|
#define EVP_R_AES_KEY_SETUP_FAILED 140
|
||||||
#define EVP_R_BAD_BLOCK_LENGTH 136
|
#define EVP_R_BAD_BLOCK_LENGTH 136
|
||||||
#define EVP_R_BAD_DECRYPT 100
|
#define EVP_R_BAD_DECRYPT 100
|
||||||
#define EVP_R_BAD_KEY_LENGTH 137
|
#define EVP_R_BAD_KEY_LENGTH 137
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/evp/evp_err.c */
|
/* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
static ERR_STRING_DATA EVP_str_functs[]=
|
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_D2I_PKEY,0), "D2I_PKEY"},
|
||||||
{ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"},
|
{ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"},
|
||||||
{ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"},
|
{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[]=
|
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_BLOCK_LENGTH ,"bad block length"},
|
||||||
{EVP_R_BAD_DECRYPT ,"bad decrypt"},
|
{EVP_R_BAD_DECRYPT ,"bad decrypt"},
|
||||||
{EVP_R_BAD_KEY_LENGTH ,"bad key length"},
|
{EVP_R_BAD_KEY_LENGTH ,"bad key length"},
|
||||||
|
@@ -133,6 +133,30 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
|
|||||||
|
|
||||||
return NID_rc4;
|
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:
|
default:
|
||||||
/* Check it has an OID and it is valid */
|
/* Check it has an OID and it is valid */
|
||||||
otmp = OBJ_nid2obj(nid);
|
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) \
|
#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);\
|
cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
|
||||||
return 1;\
|
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, \
|
#define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \
|
||||||
iv_len, cbits, flags, init_key, cleanup, \
|
iv_len, cbits, flags, init_key, cleanup, \
|
||||||
set_asn1, get_asn1, ctrl) \
|
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, \
|
key_len, iv_len, flags, init_key, cleanup, set_asn1, \
|
||||||
get_asn1, ctrl)
|
get_asn1, ctrl)
|
||||||
|
|
||||||
@@ -225,3 +225,12 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
|
|||||||
get_asn1, ctrl)
|
get_asn1, ctrl)
|
||||||
|
|
||||||
#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
|
#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 *iv,int in,
|
||||||
const unsigned char *plaintext,int pn,
|
const unsigned char *plaintext,int pn,
|
||||||
const unsigned char *ciphertext,int cn,
|
const unsigned char *ciphertext,int cn,
|
||||||
int encdec)
|
int encdec,int multiplier)
|
||||||
{
|
{
|
||||||
EVP_CIPHER_CTX ctx;
|
EVP_CIPHER_CTX ctx;
|
||||||
unsigned char out[4096];
|
unsigned char out[4096];
|
||||||
@@ -166,7 +166,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
|||||||
}
|
}
|
||||||
EVP_CIPHER_CTX_set_padding(&ctx,0);
|
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");
|
fprintf(stderr,"Encrypt failed\n");
|
||||||
test1_exit(6);
|
test1_exit(6);
|
||||||
@@ -177,7 +177,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
|||||||
test1_exit(7);
|
test1_exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(outl+outl2 != cn)
|
if(outl+outl2 != cn*multiplier)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n",
|
fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n",
|
||||||
outl+outl2,cn);
|
outl+outl2,cn);
|
||||||
@@ -202,7 +202,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
|||||||
}
|
}
|
||||||
EVP_CIPHER_CTX_set_padding(&ctx,0);
|
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");
|
fprintf(stderr,"Decrypt failed\n");
|
||||||
test1_exit(6);
|
test1_exit(6);
|
||||||
@@ -213,7 +213,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
|
|||||||
test1_exit(7);
|
test1_exit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(outl+outl2 != cn)
|
if(outl+outl2 != cn*multiplier)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
|
fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
|
||||||
outl+outl2,cn);
|
outl+outl2,cn);
|
||||||
@@ -238,7 +238,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn,
|
|||||||
const unsigned char *iv,int in,
|
const unsigned char *iv,int in,
|
||||||
const unsigned char *plaintext,int pn,
|
const unsigned char *plaintext,int pn,
|
||||||
const unsigned char *ciphertext,int cn,
|
const unsigned char *ciphertext,int cn,
|
||||||
int encdec)
|
int encdec,int multiplier)
|
||||||
{
|
{
|
||||||
const EVP_CIPHER *c;
|
const EVP_CIPHER *c;
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn,
|
|||||||
if(!c)
|
if(!c)
|
||||||
return 0;
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -359,6 +359,7 @@ int main(int argc,char **argv)
|
|||||||
unsigned char *iv,*key,*plaintext,*ciphertext;
|
unsigned char *iv,*key,*plaintext,*ciphertext;
|
||||||
int encdec;
|
int encdec;
|
||||||
int kn,in,pn,cn;
|
int kn,in,pn,cn;
|
||||||
|
int multiplier=1;
|
||||||
|
|
||||||
if(!fgets((char *)line,sizeof line,f))
|
if(!fgets((char *)line,sizeof line,f))
|
||||||
break;
|
break;
|
||||||
@@ -383,7 +384,15 @@ int main(int argc,char **argv)
|
|||||||
pn=convert(plaintext);
|
pn=convert(plaintext);
|
||||||
cn=convert(ciphertext);
|
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))
|
&& !test_digest(cipher,plaintext,pn,ciphertext,cn))
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Can't find %s\n",cipher);
|
fprintf(stderr,"Can't find %s\n",cipher);
|
||||||
|
@@ -92,7 +92,102 @@ AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000
|
|||||||
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D
|
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D
|
||||||
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461
|
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461
|
||||||
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B
|
AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B
|
||||||
# We don't support CFB{1,8}-AESxxx.{En,De}crypt
|
|
||||||
|
# CFB1-AES128.Encrypt
|
||||||
|
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1
|
||||||
|
# all of the above packed into one...
|
||||||
|
# in: 0110 1011 1100 0001 = 6bc1
|
||||||
|
# out: 0110 1000 1011 0011 = 68b3
|
||||||
|
AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1
|
||||||
|
|
||||||
|
# CFB1-AES128.Decrypt
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0
|
||||||
|
AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0
|
||||||
|
# all of the above packed into one...
|
||||||
|
# in: 0110 1000 1011 0011 = 68b3
|
||||||
|
# out: 0110 1011 1100 0001 = 6bc1
|
||||||
|
AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0
|
||||||
|
|
||||||
|
# TODO: CFB1-AES192 and 256
|
||||||
|
|
||||||
|
# CFB8-AES128.Encrypt
|
||||||
|
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1
|
||||||
|
# all of the above packed into one
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1
|
||||||
|
|
||||||
|
# CFB8-AES128.Decrypt
|
||||||
|
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0
|
||||||
|
# all of the above packed into one
|
||||||
|
AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0
|
||||||
|
|
||||||
|
# TODO: 192 and 256 bit keys
|
||||||
|
|
||||||
# For all CFB128 encrypts and decrypts, the transformed sequence is
|
# For all CFB128 encrypts and decrypts, the transformed sequence is
|
||||||
# AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
|
# AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
|
||||||
# CFB128-AES128.Encrypt
|
# CFB128-AES128.Encrypt
|
||||||
@@ -174,6 +269,16 @@ DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363
|
|||||||
# DES EDE3 CBC tests (from destest)
|
# DES EDE3 CBC tests (from destest)
|
||||||
DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675
|
DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675
|
||||||
|
|
||||||
|
# DES CFB1 from FIPS 81
|
||||||
|
# plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77
|
||||||
|
# ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9
|
||||||
|
|
||||||
|
DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9
|
||||||
|
|
||||||
|
# DES CFB8 from FIPS 81
|
||||||
|
|
||||||
|
DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f
|
||||||
|
|
||||||
# RC4 tests (from rc4test)
|
# RC4 tests (from rc4test)
|
||||||
RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596
|
RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596
|
||||||
RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879
|
RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# OpenSSL/krb5/Makefile.ssl
|
# OpenSSL/krb5/Makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
DIR= krb5
|
DIR= krb5
|
||||||
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -45,10 +44,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile ;
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -128,6 +128,10 @@
|
|||||||
* <appro@fy.chalmers.se>
|
* <appro@fy.chalmers.se>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
#include <openssl/err.h>
|
||||||
|
#include "../fips/fips_locl.h"
|
||||||
|
|
||||||
#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN)
|
#if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN)
|
||||||
#error "DATA_ORDER must be defined!"
|
#error "DATA_ORDER must be defined!"
|
||||||
#endif
|
#endif
|
||||||
@@ -555,6 +559,14 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c)
|
|||||||
static const unsigned char end[4]={0x80,0x00,0x00,0x00};
|
static const unsigned char end[4]={0x80,0x00,0x00,0x00};
|
||||||
const unsigned char *cp=end;
|
const unsigned char *cp=end;
|
||||||
|
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
if(FIPS_mode && !FIPS_md5_allowed)
|
||||||
|
{
|
||||||
|
FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* c->num should definitly have room for at least one more byte. */
|
/* c->num should definitly have room for at least one more byte. */
|
||||||
p=c->data;
|
p=c->data;
|
||||||
i=c->num>>2;
|
i=c->num>>2;
|
||||||
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -45,10 +44,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -80,10 +78,14 @@ clean:
|
|||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
md4_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md4.h
|
md4_dgst.o: ../../fips/fips_locl.h ../../include/openssl/bio.h
|
||||||
|
md4_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
|
md4_dgst.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||||
|
md4_dgst.o: ../../include/openssl/lhash.h ../../include/openssl/md4.h
|
||||||
md4_dgst.o: ../../include/openssl/opensslconf.h
|
md4_dgst.o: ../../include/openssl/opensslconf.h
|
||||||
md4_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md4_dgst.c
|
md4_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
md4_dgst.o: md4_locl.h
|
md4_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
|
md4_dgst.o: ../md32_common.h md4_dgst.c md4_locl.h
|
||||||
md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h
|
md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h
|
||||||
md4_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
md4_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
MD5_ASM_OBJ=
|
MD5_ASM_OBJ=
|
||||||
@@ -81,10 +80,9 @@ asm/md5-sparcv9.o: asm/md5-sparcv9.S
|
|||||||
-o asm/md5-sparcv9.o asm/md5-sparcv9.S
|
-o asm/md5-sparcv9.o asm/md5-sparcv9.S
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -116,10 +114,14 @@ clean:
|
|||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md5.h
|
md5_dgst.o: ../../fips/fips_locl.h ../../include/openssl/bio.h
|
||||||
|
md5_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
|
md5_dgst.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||||
|
md5_dgst.o: ../../include/openssl/lhash.h ../../include/openssl/md5.h
|
||||||
md5_dgst.o: ../../include/openssl/opensslconf.h
|
md5_dgst.o: ../../include/openssl/opensslconf.h
|
||||||
md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_dgst.c
|
md5_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
md5_dgst.o: md5_locl.h
|
md5_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
|
md5_dgst.o: ../md32_common.h md5_dgst.c md5_locl.h
|
||||||
md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
|
md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
|
||||||
md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
PERL= perl
|
PERL= perl
|
||||||
|
|
||||||
@@ -52,10 +51,9 @@ obj_mac.h: objects.pl objects.txt obj_mac.num
|
|||||||
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
|
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -62,9 +62,9 @@
|
|||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define NUM_NID 650
|
#define NUM_NID 660
|
||||||
#define NUM_SN 643
|
#define NUM_SN 653
|
||||||
#define NUM_LN 643
|
#define NUM_LN 653
|
||||||
#define NUM_OBJ 617
|
#define NUM_OBJ 617
|
||||||
|
|
||||||
static unsigned char lvalues[4455]={
|
static unsigned char lvalues[4455]={
|
||||||
@@ -1728,20 +1728,36 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
|||||||
10,&(lvalues[4434]),0},
|
10,&(lvalues[4434]),0},
|
||||||
{"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10,
|
{"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10,
|
||||||
&(lvalues[4444]),0},
|
&(lvalues[4444]),0},
|
||||||
|
{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL},
|
||||||
|
{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL},
|
||||||
|
{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL},
|
||||||
|
{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL},
|
||||||
|
{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL},
|
||||||
|
{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL},
|
||||||
|
{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL},
|
||||||
|
{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL},
|
||||||
|
{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL},
|
||||||
|
{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||||
&(nid_objs[364]),/* "AD_DVCS" */
|
&(nid_objs[364]),/* "AD_DVCS" */
|
||||||
&(nid_objs[419]),/* "AES-128-CBC" */
|
&(nid_objs[419]),/* "AES-128-CBC" */
|
||||||
&(nid_objs[421]),/* "AES-128-CFB" */
|
&(nid_objs[421]),/* "AES-128-CFB" */
|
||||||
|
&(nid_objs[650]),/* "AES-128-CFB1" */
|
||||||
|
&(nid_objs[653]),/* "AES-128-CFB8" */
|
||||||
&(nid_objs[418]),/* "AES-128-ECB" */
|
&(nid_objs[418]),/* "AES-128-ECB" */
|
||||||
&(nid_objs[420]),/* "AES-128-OFB" */
|
&(nid_objs[420]),/* "AES-128-OFB" */
|
||||||
&(nid_objs[423]),/* "AES-192-CBC" */
|
&(nid_objs[423]),/* "AES-192-CBC" */
|
||||||
&(nid_objs[425]),/* "AES-192-CFB" */
|
&(nid_objs[425]),/* "AES-192-CFB" */
|
||||||
|
&(nid_objs[651]),/* "AES-192-CFB1" */
|
||||||
|
&(nid_objs[654]),/* "AES-192-CFB8" */
|
||||||
&(nid_objs[422]),/* "AES-192-ECB" */
|
&(nid_objs[422]),/* "AES-192-ECB" */
|
||||||
&(nid_objs[424]),/* "AES-192-OFB" */
|
&(nid_objs[424]),/* "AES-192-OFB" */
|
||||||
&(nid_objs[427]),/* "AES-256-CBC" */
|
&(nid_objs[427]),/* "AES-256-CBC" */
|
||||||
&(nid_objs[429]),/* "AES-256-CFB" */
|
&(nid_objs[429]),/* "AES-256-CFB" */
|
||||||
|
&(nid_objs[652]),/* "AES-256-CFB1" */
|
||||||
|
&(nid_objs[655]),/* "AES-256-CFB8" */
|
||||||
&(nid_objs[426]),/* "AES-256-ECB" */
|
&(nid_objs[426]),/* "AES-256-ECB" */
|
||||||
&(nid_objs[428]),/* "AES-256-OFB" */
|
&(nid_objs[428]),/* "AES-256-OFB" */
|
||||||
&(nid_objs[91]),/* "BF-CBC" */
|
&(nid_objs[91]),/* "BF-CBC" */
|
||||||
@@ -1762,6 +1778,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
|||||||
&(nid_objs[31]),/* "DES-CBC" */
|
&(nid_objs[31]),/* "DES-CBC" */
|
||||||
&(nid_objs[643]),/* "DES-CDMF" */
|
&(nid_objs[643]),/* "DES-CDMF" */
|
||||||
&(nid_objs[30]),/* "DES-CFB" */
|
&(nid_objs[30]),/* "DES-CFB" */
|
||||||
|
&(nid_objs[656]),/* "DES-CFB1" */
|
||||||
|
&(nid_objs[657]),/* "DES-CFB8" */
|
||||||
&(nid_objs[29]),/* "DES-ECB" */
|
&(nid_objs[29]),/* "DES-ECB" */
|
||||||
&(nid_objs[32]),/* "DES-EDE" */
|
&(nid_objs[32]),/* "DES-EDE" */
|
||||||
&(nid_objs[43]),/* "DES-EDE-CBC" */
|
&(nid_objs[43]),/* "DES-EDE-CBC" */
|
||||||
@@ -1770,6 +1788,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
|||||||
&(nid_objs[33]),/* "DES-EDE3" */
|
&(nid_objs[33]),/* "DES-EDE3" */
|
||||||
&(nid_objs[44]),/* "DES-EDE3-CBC" */
|
&(nid_objs[44]),/* "DES-EDE3-CBC" */
|
||||||
&(nid_objs[61]),/* "DES-EDE3-CFB" */
|
&(nid_objs[61]),/* "DES-EDE3-CFB" */
|
||||||
|
&(nid_objs[658]),/* "DES-EDE3-CFB1" */
|
||||||
|
&(nid_objs[659]),/* "DES-EDE3-CFB8" */
|
||||||
&(nid_objs[63]),/* "DES-EDE3-OFB" */
|
&(nid_objs[63]),/* "DES-EDE3-OFB" */
|
||||||
&(nid_objs[45]),/* "DES-OFB" */
|
&(nid_objs[45]),/* "DES-OFB" */
|
||||||
&(nid_objs[80]),/* "DESX-CBC" */
|
&(nid_objs[80]),/* "DESX-CBC" */
|
||||||
@@ -2485,14 +2505,20 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
|||||||
&(nid_objs[606]),/* "additional verification" */
|
&(nid_objs[606]),/* "additional verification" */
|
||||||
&(nid_objs[419]),/* "aes-128-cbc" */
|
&(nid_objs[419]),/* "aes-128-cbc" */
|
||||||
&(nid_objs[421]),/* "aes-128-cfb" */
|
&(nid_objs[421]),/* "aes-128-cfb" */
|
||||||
|
&(nid_objs[650]),/* "aes-128-cfb1" */
|
||||||
|
&(nid_objs[653]),/* "aes-128-cfb8" */
|
||||||
&(nid_objs[418]),/* "aes-128-ecb" */
|
&(nid_objs[418]),/* "aes-128-ecb" */
|
||||||
&(nid_objs[420]),/* "aes-128-ofb" */
|
&(nid_objs[420]),/* "aes-128-ofb" */
|
||||||
&(nid_objs[423]),/* "aes-192-cbc" */
|
&(nid_objs[423]),/* "aes-192-cbc" */
|
||||||
&(nid_objs[425]),/* "aes-192-cfb" */
|
&(nid_objs[425]),/* "aes-192-cfb" */
|
||||||
|
&(nid_objs[651]),/* "aes-192-cfb1" */
|
||||||
|
&(nid_objs[654]),/* "aes-192-cfb8" */
|
||||||
&(nid_objs[422]),/* "aes-192-ecb" */
|
&(nid_objs[422]),/* "aes-192-ecb" */
|
||||||
&(nid_objs[424]),/* "aes-192-ofb" */
|
&(nid_objs[424]),/* "aes-192-ofb" */
|
||||||
&(nid_objs[427]),/* "aes-256-cbc" */
|
&(nid_objs[427]),/* "aes-256-cbc" */
|
||||||
&(nid_objs[429]),/* "aes-256-cfb" */
|
&(nid_objs[429]),/* "aes-256-cfb" */
|
||||||
|
&(nid_objs[652]),/* "aes-256-cfb1" */
|
||||||
|
&(nid_objs[655]),/* "aes-256-cfb8" */
|
||||||
&(nid_objs[426]),/* "aes-256-ecb" */
|
&(nid_objs[426]),/* "aes-256-ecb" */
|
||||||
&(nid_objs[428]),/* "aes-256-ofb" */
|
&(nid_objs[428]),/* "aes-256-ofb" */
|
||||||
&(nid_objs[376]),/* "algorithm" */
|
&(nid_objs[376]),/* "algorithm" */
|
||||||
@@ -2531,6 +2557,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
|||||||
&(nid_objs[31]),/* "des-cbc" */
|
&(nid_objs[31]),/* "des-cbc" */
|
||||||
&(nid_objs[643]),/* "des-cdmf" */
|
&(nid_objs[643]),/* "des-cdmf" */
|
||||||
&(nid_objs[30]),/* "des-cfb" */
|
&(nid_objs[30]),/* "des-cfb" */
|
||||||
|
&(nid_objs[656]),/* "des-cfb1" */
|
||||||
|
&(nid_objs[657]),/* "des-cfb8" */
|
||||||
&(nid_objs[29]),/* "des-ecb" */
|
&(nid_objs[29]),/* "des-ecb" */
|
||||||
&(nid_objs[32]),/* "des-ede" */
|
&(nid_objs[32]),/* "des-ede" */
|
||||||
&(nid_objs[43]),/* "des-ede-cbc" */
|
&(nid_objs[43]),/* "des-ede-cbc" */
|
||||||
@@ -2539,6 +2567,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
|||||||
&(nid_objs[33]),/* "des-ede3" */
|
&(nid_objs[33]),/* "des-ede3" */
|
||||||
&(nid_objs[44]),/* "des-ede3-cbc" */
|
&(nid_objs[44]),/* "des-ede3-cbc" */
|
||||||
&(nid_objs[61]),/* "des-ede3-cfb" */
|
&(nid_objs[61]),/* "des-ede3-cfb" */
|
||||||
|
&(nid_objs[658]),/* "des-ede3-cfb1" */
|
||||||
|
&(nid_objs[659]),/* "des-ede3-cfb8" */
|
||||||
&(nid_objs[63]),/* "des-ede3-ofb" */
|
&(nid_objs[63]),/* "des-ede3-ofb" */
|
||||||
&(nid_objs[45]),/* "des-ofb" */
|
&(nid_objs[45]),/* "des-ofb" */
|
||||||
&(nid_objs[107]),/* "description" */
|
&(nid_objs[107]),/* "description" */
|
||||||
|
@@ -2009,6 +2009,46 @@
|
|||||||
#define NID_aes_256_cfb128 429
|
#define NID_aes_256_cfb128 429
|
||||||
#define OBJ_aes_256_cfb128 OBJ_aes,44L
|
#define OBJ_aes_256_cfb128 OBJ_aes,44L
|
||||||
|
|
||||||
|
#define SN_aes_128_cfb1 "AES-128-CFB1"
|
||||||
|
#define LN_aes_128_cfb1 "aes-128-cfb1"
|
||||||
|
#define NID_aes_128_cfb1 650
|
||||||
|
|
||||||
|
#define SN_aes_192_cfb1 "AES-192-CFB1"
|
||||||
|
#define LN_aes_192_cfb1 "aes-192-cfb1"
|
||||||
|
#define NID_aes_192_cfb1 651
|
||||||
|
|
||||||
|
#define SN_aes_256_cfb1 "AES-256-CFB1"
|
||||||
|
#define LN_aes_256_cfb1 "aes-256-cfb1"
|
||||||
|
#define NID_aes_256_cfb1 652
|
||||||
|
|
||||||
|
#define SN_aes_128_cfb8 "AES-128-CFB8"
|
||||||
|
#define LN_aes_128_cfb8 "aes-128-cfb8"
|
||||||
|
#define NID_aes_128_cfb8 653
|
||||||
|
|
||||||
|
#define SN_aes_192_cfb8 "AES-192-CFB8"
|
||||||
|
#define LN_aes_192_cfb8 "aes-192-cfb8"
|
||||||
|
#define NID_aes_192_cfb8 654
|
||||||
|
|
||||||
|
#define SN_aes_256_cfb8 "AES-256-CFB8"
|
||||||
|
#define LN_aes_256_cfb8 "aes-256-cfb8"
|
||||||
|
#define NID_aes_256_cfb8 655
|
||||||
|
|
||||||
|
#define SN_des_cfb1 "DES-CFB1"
|
||||||
|
#define LN_des_cfb1 "des-cfb1"
|
||||||
|
#define NID_des_cfb1 656
|
||||||
|
|
||||||
|
#define SN_des_cfb8 "DES-CFB8"
|
||||||
|
#define LN_des_cfb8 "des-cfb8"
|
||||||
|
#define NID_des_cfb8 657
|
||||||
|
|
||||||
|
#define SN_des_ede3_cfb1 "DES-EDE3-CFB1"
|
||||||
|
#define LN_des_ede3_cfb1 "des-ede3-cfb1"
|
||||||
|
#define NID_des_ede3_cfb1 658
|
||||||
|
|
||||||
|
#define SN_des_ede3_cfb8 "DES-EDE3-CFB8"
|
||||||
|
#define LN_des_ede3_cfb8 "des-ede3-cfb8"
|
||||||
|
#define NID_des_ede3_cfb8 659
|
||||||
|
|
||||||
#define SN_hold_instruction_code "holdInstructionCode"
|
#define SN_hold_instruction_code "holdInstructionCode"
|
||||||
#define LN_hold_instruction_code "Hold Instruction Code"
|
#define LN_hold_instruction_code "Hold Instruction Code"
|
||||||
#define NID_hold_instruction_code 430
|
#define NID_hold_instruction_code 430
|
||||||
|
@@ -647,3 +647,13 @@ joint_iso_itu_t 646
|
|||||||
international_organizations 647
|
international_organizations 647
|
||||||
ms_smartcard_login 648
|
ms_smartcard_login 648
|
||||||
ms_upn 649
|
ms_upn 649
|
||||||
|
aes_128_cfb1 650
|
||||||
|
aes_192_cfb1 651
|
||||||
|
aes_256_cfb1 652
|
||||||
|
aes_128_cfb8 653
|
||||||
|
aes_192_cfb8 654
|
||||||
|
aes_256_cfb8 655
|
||||||
|
des_cfb1 656
|
||||||
|
des_cfb8 657
|
||||||
|
des_ede3_cfb1 658
|
||||||
|
des_ede3_cfb8 659
|
||||||
|
@@ -681,6 +681,19 @@ aes 43 : AES-256-OFB : aes-256-ofb
|
|||||||
!Cname aes-256-cfb128
|
!Cname aes-256-cfb128
|
||||||
aes 44 : AES-256-CFB : aes-256-cfb
|
aes 44 : AES-256-CFB : aes-256-cfb
|
||||||
|
|
||||||
|
# There are no OIDs for these modes...
|
||||||
|
|
||||||
|
: AES-128-CFB1 : aes-128-cfb1
|
||||||
|
: AES-192-CFB1 : aes-192-cfb1
|
||||||
|
: AES-256-CFB1 : aes-256-cfb1
|
||||||
|
: AES-128-CFB8 : aes-128-cfb8
|
||||||
|
: AES-192-CFB8 : aes-192-cfb8
|
||||||
|
: AES-256-CFB8 : aes-256-cfb8
|
||||||
|
: DES-CFB1 : des-cfb1
|
||||||
|
: DES-CFB8 : des-cfb8
|
||||||
|
: DES-EDE3-CFB1 : des-ede3-cfb1
|
||||||
|
: DES-EDE3-CFB8 : des-ede3-cfb8
|
||||||
|
|
||||||
# Hold instruction CRL entry extension
|
# Hold instruction CRL entry extension
|
||||||
!Cname hold-instruction-code
|
!Cname hold-instruction-code
|
||||||
id-ce 23 : holdInstructionCode : Hold Instruction Code
|
id-ce 23 : holdInstructionCode : Hold Instruction Code
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# OpenSSL/ocsp/Makefile.ssl
|
# OpenSSL/ocsp/Makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
DIR= ocsp
|
DIR= ocsp
|
||||||
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -47,10 +46,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile ;
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -47,10 +46,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links: $(EXHEADER)
|
links: $(EXHEADER)
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -50,10 +49,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
PEX_LIBS=
|
PEX_LIBS=
|
||||||
@@ -65,10 +64,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -46,10 +45,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -88,19 +86,19 @@ md_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
|
|||||||
md_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
md_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||||
md_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
md_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||||
md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
md_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
md_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
md_rand.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
|
||||||
md_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
md_rand.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||||
md_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
md_rand.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||||
md_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
md_rand.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||||
md_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
md_rand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
md_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
md_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
md_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||||
md_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
md_rand.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
md_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
md_rand.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||||
md_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
md_rand.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
md_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
md_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
md_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||||
md_rand.o: md_rand.c rand_lcl.h
|
md_rand.o: ../../include/openssl/ui_compat.h md_rand.c rand_lcl.h
|
||||||
rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h
|
rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h
|
||||||
rand_egd.o: ../../include/openssl/opensslconf.h
|
rand_egd.o: ../../include/openssl/opensslconf.h
|
||||||
rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||||
@@ -115,15 +113,17 @@ rand_err.o: rand_err.c
|
|||||||
rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
|
rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||||
rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
|
rand_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||||
rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||||
rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||||
rand_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
rand_lib.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||||
|
rand_lib.o: ../../include/openssl/fips_rand.h ../../include/openssl/lhash.h
|
||||||
rand_lib.o: ../../include/openssl/opensslconf.h
|
rand_lib.o: ../../include/openssl/opensslconf.h
|
||||||
rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||||
rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
rand_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||||
rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
rand_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
rand_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||||
rand_lib.o: ../cryptlib.h rand_lib.c
|
rand_lib.o: ../../include/openssl/ui_compat.h ../cryptlib.h rand_lib.c
|
||||||
rand_os2.o: ../../e_os.h ../../include/openssl/aes.h
|
rand_os2.o: ../../e_os.h ../../include/openssl/aes.h
|
||||||
rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
rand_os2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
rand_os2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
@@ -126,6 +126,7 @@
|
|||||||
|
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
|
||||||
#ifdef BN_DEBUG
|
#ifdef BN_DEBUG
|
||||||
# define PREDICT
|
# define PREDICT
|
||||||
@@ -332,6 +333,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
|
|||||||
#endif
|
#endif
|
||||||
int do_stir_pool = 0;
|
int do_stir_pool = 0;
|
||||||
|
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
if(FIPS_mode)
|
||||||
|
{
|
||||||
|
FIPSerr(FIPS_F_SSLEAY_RAND_BYTES,FIPS_R_NON_FIPS_METHOD);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PREDICT
|
#ifdef PREDICT
|
||||||
if (rand_predictable)
|
if (rand_predictable)
|
||||||
{
|
{
|
||||||
|
@@ -121,11 +121,14 @@ void ERR_load_RAND_strings(void);
|
|||||||
/* Error codes for the RAND functions. */
|
/* Error codes for the RAND functions. */
|
||||||
|
|
||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
|
#define RAND_F_FIPS_RAND_BYTES 102
|
||||||
#define RAND_F_RAND_GET_RAND_METHOD 101
|
#define RAND_F_RAND_GET_RAND_METHOD 101
|
||||||
#define RAND_F_SSLEAY_RAND_BYTES 100
|
#define RAND_F_SSLEAY_RAND_BYTES 100
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
|
#define RAND_R_NON_FIPS_METHOD 101
|
||||||
#define RAND_R_PRNG_NOT_SEEDED 100
|
#define RAND_R_PRNG_NOT_SEEDED 100
|
||||||
|
#define RAND_R_PRNG_STUCK 102
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* crypto/rand/rand_err.c */
|
/* crypto/rand/rand_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
#ifndef OPENSSL_NO_ERR
|
#ifndef OPENSSL_NO_ERR
|
||||||
static ERR_STRING_DATA RAND_str_functs[]=
|
static ERR_STRING_DATA RAND_str_functs[]=
|
||||||
{
|
{
|
||||||
|
{ERR_PACK(0,RAND_F_FIPS_RAND_BYTES,0), "FIPS_RAND_BYTES"},
|
||||||
{ERR_PACK(0,RAND_F_RAND_GET_RAND_METHOD,0), "RAND_get_rand_method"},
|
{ERR_PACK(0,RAND_F_RAND_GET_RAND_METHOD,0), "RAND_get_rand_method"},
|
||||||
{ERR_PACK(0,RAND_F_SSLEAY_RAND_BYTES,0), "SSLEAY_RAND_BYTES"},
|
{ERR_PACK(0,RAND_F_SSLEAY_RAND_BYTES,0), "SSLEAY_RAND_BYTES"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
@@ -73,7 +74,9 @@ static ERR_STRING_DATA RAND_str_functs[]=
|
|||||||
|
|
||||||
static ERR_STRING_DATA RAND_str_reasons[]=
|
static ERR_STRING_DATA RAND_str_reasons[]=
|
||||||
{
|
{
|
||||||
|
{RAND_R_NON_FIPS_METHOD ,"non fips method"},
|
||||||
{RAND_R_PRNG_NOT_SEEDED ,"PRNG not seeded"},
|
{RAND_R_PRNG_NOT_SEEDED ,"PRNG not seeded"},
|
||||||
|
{RAND_R_PRNG_STUCK ,"prng stuck"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -63,6 +63,8 @@
|
|||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <openssl/fips.h>
|
||||||
|
#include <openssl/fips_rand.h>
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
/* non-NULL if default_RAND_meth is ENGINE-provided */
|
/* non-NULL if default_RAND_meth is ENGINE-provided */
|
||||||
@@ -85,6 +87,15 @@ int RAND_set_rand_method(const RAND_METHOD *meth)
|
|||||||
|
|
||||||
const RAND_METHOD *RAND_get_rand_method(void)
|
const RAND_METHOD *RAND_get_rand_method(void)
|
||||||
{
|
{
|
||||||
|
#ifdef OPENSSL_FIPS
|
||||||
|
if(FIPS_mode && default_RAND_meth != FIPS_rand_check)
|
||||||
|
{
|
||||||
|
RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (!default_RAND_meth)
|
if (!default_RAND_meth)
|
||||||
{
|
{
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
RC4_ENC=rc4_enc.o
|
RC4_ENC=rc4_enc.o
|
||||||
@@ -68,10 +67,9 @@ asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
|
|||||||
(cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
|
(cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
RC5_ENC= rc5_enc.o
|
RC5_ENC= rc5_enc.o
|
||||||
@@ -65,10 +64,9 @@ asm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
|||||||
(cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp)
|
(cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
RIP_ASM_OBJ=
|
RIP_ASM_OBJ=
|
||||||
@@ -63,10 +62,9 @@ asm/rm86unix.cpp: asm/rmd-586.pl ../perlasm/x86asm.pl
|
|||||||
(cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp)
|
(cd asm; $(PERL) rmd-586.pl cpp >rm86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -98,9 +96,14 @@ clean:
|
|||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
rmd_dgst.o: ../../fips/fips_locl.h ../../include/openssl/bio.h
|
||||||
|
rmd_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
|
rmd_dgst.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||||
|
rmd_dgst.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h
|
rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h
|
||||||
rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h
|
rmd_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
|
rmd_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h rmd_dgst.c
|
||||||
|
rmd_dgst.o: rmd_locl.h rmdconst.h
|
||||||
rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h
|
rmd_one.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -48,10 +47,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -62,7 +62,7 @@
|
|||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
#ifndef RSA_NULL
|
#if !defined(RSA_NULL) && !defined(OPENSSL_FIPS)
|
||||||
|
|
||||||
static int RSA_eay_public_encrypt(int flen, const unsigned char *from,
|
static int RSA_eay_public_encrypt(int flen, const unsigned char *from,
|
||||||
unsigned char *to, RSA *rsa,int padding);
|
unsigned char *to, RSA *rsa,int padding);
|
||||||
|
@@ -62,6 +62,8 @@
|
|||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
|
|
||||||
RSA *RSA_generate_key(int bits, unsigned long e_value,
|
RSA *RSA_generate_key(int bits, unsigned long e_value,
|
||||||
void (*callback)(int,int,void *), void *cb_arg)
|
void (*callback)(int,int,void *), void *cb_arg)
|
||||||
{
|
{
|
||||||
@@ -195,3 +197,4 @@ err:
|
|||||||
return(rsa);
|
return(rsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -11,10 +11,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
SHA1_ASM_OBJ=
|
SHA1_ASM_OBJ=
|
||||||
@@ -63,10 +62,9 @@ asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl
|
|||||||
(cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
|
(cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
||||||
@@ -103,12 +101,16 @@ sha1_one.o: ../../include/openssl/opensslconf.h
|
|||||||
sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c
|
sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c
|
||||||
sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
sha1dgst.o: ../../include/openssl/opensslconf.h
|
||||||
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
|
sha1dgst.o: ../../include/openssl/opensslv.h sha1dgst.c
|
||||||
sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
|
sha_dgst.o: ../../fips/fips_locl.h ../../include/openssl/bio.h
|
||||||
sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
sha_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
|
sha_dgst.o: ../../include/openssl/err.h ../../include/openssl/fips.h
|
||||||
sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
|
sha_dgst.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
|
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
|
sha_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
|
sha_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha_dgst.c
|
||||||
|
sha_dgst.o: sha_locl.h
|
||||||
sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||||
sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
@@ -62,12 +62,20 @@
|
|||||||
#define SHA_1
|
#define SHA_1
|
||||||
|
|
||||||
#include <openssl/opensslv.h>
|
#include <openssl/opensslv.h>
|
||||||
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
|
#ifndef OPENSSL_FIPS
|
||||||
const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
|
const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
|
||||||
|
|
||||||
/* The implementation is in ../md32_common.h */
|
/* The implementation is in ../md32_common.h */
|
||||||
|
|
||||||
#include "sha_locl.h"
|
#include "sha_locl.h"
|
||||||
|
|
||||||
|
#else /* ndef OPENSSL_FIPS */
|
||||||
|
|
||||||
|
static void *dummy=&dummy;
|
||||||
|
|
||||||
|
#endif /* ndef OPENSSL_FIPS */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@@ -10,10 +10,9 @@ CFLAG=-g
|
|||||||
INSTALL_PREFIX=
|
INSTALL_PREFIX=
|
||||||
OPENSSLDIR= /usr/local/ssl
|
OPENSSLDIR= /usr/local/ssl
|
||||||
INSTALLTOP=/usr/local/ssl
|
INSTALLTOP=/usr/local/ssl
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPPROG= makedepend
|
MAKEDEPPROG= makedepend
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
|
||||||
MAKEFILE= Makefile.ssl
|
MAKEFILE= Makefile
|
||||||
AR= ar r
|
AR= ar r
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||||
@@ -44,10 +43,9 @@ lib: $(LIBOBJ)
|
|||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||||
|
|
||||||
links:
|
links:
|
||||||
@sh $(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user