--- a/Configure
+++ b/Configure
-@@ -34,6 +34,8 @@ my $usage="Usage: Configure [no-<cipher>
+@@ -36,6 +36,8 @@ my $usage="Usage: Configure [no-<cipher>
# (Default: KRB5_DIR/include)
# --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently
# supported values are "MIT" and "Heimdal". A value is required.
#
# --test-sanity Make a number of sanity checks on the data in this file.
# This is a debugging tool for OpenSSL developers.
-@@ -540,6 +542,9 @@ my %table=(
+@@ -547,6 +549,9 @@ my %table=(
##### Compaq Non-Stop Kernel (Tandem)
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
);
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
-@@ -589,6 +594,8 @@ my $montasm=1; # but "no-montasm" is d
+@@ -601,6 +606,8 @@ my $montasm=1; # but "no-montasm" is d
my $no_asm=0;
my $no_dso=0;
my $no_gmp=0;
my @skip=();
my $Makefile="Makefile";
my $des_locl="crypto/des/des_locl.h";
-@@ -716,6 +723,14 @@ PROCESS_ARGS:
+@@ -749,6 +756,14 @@ PROCESS_ARGS:
{
exit(&test_sanity());
}
elsif (/^reconfigure/ || /^reconf/)
{
if (open(IN,"<$Makefile"))
-@@ -924,6 +939,7 @@ foreach (sort (keys %disabled))
+@@ -1037,6 +1052,7 @@ foreach (sort (keys %disabled))
print " OPENSSL_NO_$ALGO";
if (/^err$/) { $flags .= "-DOPENSSL_NO_ERR "; }
elsif (/^asm$/) { $no_asm = 1; }
}
else
-@@ -1064,6 +1080,16 @@ if (!$no_krb5)
+@@ -1161,6 +1177,16 @@ if (!$no_krb5)
$withargs{"krb5-dir"} ne "";
}
----------------------
--- a/Makefile.org
+++ b/Makefile.org
-@@ -367,7 +367,7 @@ files:
+@@ -502,7 +502,7 @@ files:
links:
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
- @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
+ @$(PERL) $(TOP)/util/mklink.pl include/openssl $(HEADER) $(EXHEADER)
@set -e; target=links; $(RECURSIVE_BUILD_CMD)
-
- gentests:
+ @if [ -z "$(FIPSCANLIB)" ]; then \
+ set -e; target=links; dir=fips ; $(BUILD_CMD) ; \
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -6,13 +6,13 @@
# on Unix, "cyg" for certain forms under Cygwin...) or suffix (.a, .so,
--- a/config
+++ b/config
-@@ -48,10 +48,10 @@ done
-
- # First get uname entries that we use below
-
--MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
--RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
--SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
--VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
-+[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
-+[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
-+[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
-+[ "$VERSION" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
-
-
- # Now test for ISC and SCO, since it is has a braindamaged uname.
-@@ -270,7 +270,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
+@@ -270,7 +270,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
echo "ppc-apple-darwin${VERSION}"
;;
*)
;;
esac
exit 0
-@@ -401,9 +401,9 @@ exit 0
+@@ -399,7 +399,8 @@ exit 0
+ # this is where the translation occurs into SSLeay terms
+ # ---------------------------------------------------------------------------
- # figure out if gcc is available and if so we use it otherwise
- # we fallback to whatever cc does on the system
-GCCVER=`(gcc -dumpversion) 2>/dev/null`
+CC="${CC:-gcc}"
+GCCVER=`(${CC} -dumpversion) 2>/dev/null`
if [ "$GCCVER" != "" ]; then
-- CC=gcc
# then strip off whatever prefix egcs prepends the number with...
# Hopefully, this will work for any future prefixes as well.
- GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'`
-@@ -413,7 +413,7 @@ if [ "$GCCVER" != "" ]; then
+@@ -409,6 +410,8 @@ if [ "$GCCVER" != "" ]; then
+ # major and minor version numbers.
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
- else
-- CC=cc
++else
+ CC="${CC:-cc}"
fi
- GCCVER=${GCCVER:-0}
- if [ "$SYSTEM" = "HP-UX" ];then
-@@ -482,6 +482,9 @@ echo Operating system: $GUESSOS
+
+ # Only set CC if not supplied already
+@@ -493,6 +493,9 @@ echo Operating system: $GUESSOS
# script above so we end up with values in vars but that would take
# more time that I want to waste at the moment
case "$GUESSOS" in
static double results[ALGOR_NUM][SIZE_NUM];
-static int lengths[SIZE_NUM]={16,64,256,1024,8*1024};
+static int lengths[SIZE_NUM]={16,64,256,1024,2*1024,4*1024};
+ #ifndef OPENSSL_NO_RSA
static double rsa_results[RSA_NUM][2];
- static double dsa_results[DSA_NUM][2];
- #ifndef OPENSSL_NO_ECDSA
+ #endif
@@ -328,6 +328,79 @@ static SIGRETTYPE sig_done(int sig)
#define START 0
#define STOP 1
j++;
}
--#ifdef HAVE_FORK
+-#ifndef NO_FORK
- if(multi && do_multi(multi))
- goto show_res;
-#endif
results[alg][run_no]=((double)count)/time_used*lengths[run_no];
}
-@@ -2806,29 +2928,11 @@ static int do_multi(int multi)
+@@ -2808,29 +2930,11 @@ static int do_multi(int multi)
p=buf+3;
alg=atoi(sstrsep(&p,sep));
sstrsep(&p,sep);
}
else if(!strncmp(buf,"+F2:",4))
{
-@@ -2839,12 +2943,18 @@ static int do_multi(int multi)
+@@ -2841,12 +2945,18 @@ static int do_multi(int multi)
k=atoi(sstrsep(&p,sep));
sstrsep(&p,sep);
d=atof(sstrsep(&p,sep));
if(n)
rsa_results[k][1]=1/(1/rsa_results[k][1]+1/d);
-@@ -2860,12 +2970,18 @@ static int do_multi(int multi)
+@@ -2862,12 +2972,18 @@ static int do_multi(int multi)
k=atoi(sstrsep(&p,sep));
sstrsep(&p,sep);
static int get_cryptodev_ciphers(const int **cnids);
static int get_cryptodev_digests(const int **cnids);
static int cryptodev_usable_ciphers(const int **nids);
-@@ -100,7 +112,7 @@ static int cryptodev_asym(struct crypt_k
- static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a,
- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
- static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I,
-- RSA *rsa);
-+ RSA *rsa, BN_CTX *ctx);
- static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
- static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a,
- const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
@@ -130,9 +142,12 @@ static struct {
int ivmax;
int keylen;
*digest = NULL;
break;
}
-@@ -625,7 +942,7 @@ static int
- bn2crparam(const BIGNUM *a, struct crparam *crp)
- {
- int i, j, k;
-- ssize_t words, bytes, bits;
-+ ssize_t bytes, bits;
- u_char *b;
-
- crp->crp_p = NULL;
@@ -637,6 +954,7 @@ bn2crparam(const BIGNUM *a, struct crpar
b = malloc(bytes);
if (b == NULL)
if (kop->crk_param[i].crp_p)
free(kop->crk_param[i].crp_p);
kop->crk_param[i].crp_p = NULL;
-@@ -756,12 +1074,10 @@ err:
- }
-
- static int
--cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa)
-+cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
- {
- int r;
-- BN_CTX *ctx;
--
-- ctx = BN_CTX_new();
-+ ctx = BN_CTX_new(); /* not sure why we reallocate this. DM */
- r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL);
- BN_CTX_free(ctx);
- return (r);
--- a/crypto/engine/engine.h
+++ b/crypto/engine/engine.h
@@ -703,7 +703,7 @@ typedef int (*dynamic_bind_engine)(ENGIN