History log of /openbsd-current/lib/libcrypto/bn/bn_mul.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.39 08-Jul-2023 beck

Hide symbols in bn

ok tb@


# 1.38 12-Jun-2023 jsing

Provide and use various quad word primitives.

This includes bn_qwaddqw(), bn_qwsubqw(), bn_qwmulw_addw() and
bn_qwmulw_addqw_addw(). These can typically be optimised on architectures
that have a reasonable number of general purpose registers.

ok tb@


# 1.37 19-Apr-2023 jsing

unifdef BN_RECURSION

This removes a bunch of incomplete and scary code, which potentially leaks
secrets and is not constant time. A performance gain is achieved on arm64
for sizes that we care about, while a minimal decrease in performance is
noted for larger sizes on some other platforms.

While we will potentially reimplement Karatsuba (or Toom-Cook) at a later
date, it will be easier and safer to do it from a clean slate.

ok tb@


# 1.36 30-Mar-2023 tb

Call bn_copy() unconditionally in BN_mul() and BN_sqr()

bn_copy() does the right thing if source and target are the same, so
there is no need for an additional check.

Requested by jsing


# 1.35 27-Mar-2023 tb

Convert BN_copy() with missing error checks to bn_copy()

ok jsing


Revision tags: OPENBSD_7_3_BASE
# 1.34 22-Feb-2023 jsing

Replace bn_sub_part_words() with bn_sub().

Now that bn_sub() handles word arrays with potentially different lengths,
we no longer need bn_sub_part_words() - call bn_sub() instead. This allows
us to entirely remove the unnecessarily complex bn_sub_part_words() code.

ok tb@


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.38 12-Jun-2023 jsing

Provide and use various quad word primitives.

This includes bn_qwaddqw(), bn_qwsubqw(), bn_qwmulw_addw() and
bn_qwmulw_addqw_addw(). These can typically be optimised on architectures
that have a reasonable number of general purpose registers.

ok tb@


# 1.37 19-Apr-2023 jsing

unifdef BN_RECURSION

This removes a bunch of incomplete and scary code, which potentially leaks
secrets and is not constant time. A performance gain is achieved on arm64
for sizes that we care about, while a minimal decrease in performance is
noted for larger sizes on some other platforms.

While we will potentially reimplement Karatsuba (or Toom-Cook) at a later
date, it will be easier and safer to do it from a clean slate.

ok tb@


# 1.36 30-Mar-2023 tb

Call bn_copy() unconditionally in BN_mul() and BN_sqr()

bn_copy() does the right thing if source and target are the same, so
there is no need for an additional check.

Requested by jsing


# 1.35 27-Mar-2023 tb

Convert BN_copy() with missing error checks to bn_copy()

ok jsing


Revision tags: OPENBSD_7_3_BASE
# 1.34 22-Feb-2023 jsing

Replace bn_sub_part_words() with bn_sub().

Now that bn_sub() handles word arrays with potentially different lengths,
we no longer need bn_sub_part_words() - call bn_sub() instead. This allows
us to entirely remove the unnecessarily complex bn_sub_part_words() code.

ok tb@


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.37 19-Apr-2023 jsing

unifdef BN_RECURSION

This removes a bunch of incomplete and scary code, which potentially leaks
secrets and is not constant time. A performance gain is achieved on arm64
for sizes that we care about, while a minimal decrease in performance is
noted for larger sizes on some other platforms.

While we will potentially reimplement Karatsuba (or Toom-Cook) at a later
date, it will be easier and safer to do it from a clean slate.

ok tb@


# 1.36 30-Mar-2023 tb

Call bn_copy() unconditionally in BN_mul() and BN_sqr()

bn_copy() does the right thing if source and target are the same, so
there is no need for an additional check.

Requested by jsing


# 1.35 27-Mar-2023 tb

Convert BN_copy() with missing error checks to bn_copy()

ok jsing


Revision tags: OPENBSD_7_3_BASE
# 1.34 22-Feb-2023 jsing

Replace bn_sub_part_words() with bn_sub().

Now that bn_sub() handles word arrays with potentially different lengths,
we no longer need bn_sub_part_words() - call bn_sub() instead. This allows
us to entirely remove the unnecessarily complex bn_sub_part_words() code.

ok tb@


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.34 22-Feb-2023 jsing

Replace bn_sub_part_words() with bn_sub().

Now that bn_sub() handles word arrays with potentially different lengths,
we no longer need bn_sub_part_words() - call bn_sub() instead. This allows
us to entirely remove the unnecessarily complex bn_sub_part_words() code.

ok tb@


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.33 15-Feb-2023 jsing

Place bn_mul_add_words() after bn_mul_words().


# 1.32 14-Feb-2023 jsing

Reimplement bn_mul_words(), bn_mul_add_words() and bn_mul_comba{4,8}().

Use bignum primitives rather than the current mess of macros, which also
allows us to remove the essentially duplicate versions of
bn_mul_words() and bn_mul_add_words() for BN_LLONG.

The "mul" macro gets replaced by bn_mulw_addw(), "mul_add" with
bn_mulw_addw_addw() and "mul_add_c" with bn_mulw_addtw() (where 'w'
indicates single word input and 'tw' indicates triple word input).

The variables in the comba functions have also been reordered, so that the
patterns are easier to understand - the compiler can take care of
optimising the inputs and outputs to avoid register moves.

ok tb@


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.31 13-Feb-2023 jsing

Avoid negative zero.

Whenever setting negative to one (or when it could potentially be one),
always use BN_set_negative() since it checks for a zero valued bignum and
will not permit negative to be set in this case. Since BN_is_zero()
currently relies on top == 0, call BN_set_negative() after top has been
set (or bn_correct_top() has been called).

This fixes a long standing issue where -0 and +0 have been permitted,
however multiple code paths (such as BN_cmp()) fail to treat these as
equivalent.

Prompted by Guido Vranken who is adding negative zero fuzzing to oss-fuzz.

ok tb@


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.30 23-Jan-2023 jsing

Move bn_mul_add_words() and bn_mul_words() from bn_asm.c to bn_mul.c.

These are wrapped with #ifndef HAVE_BN_ADD_MUL_WORDS/HAVE_BN_MUL_WORDS,
which are defined for architectures that provide their own assembly
versions.


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.29 21-Jan-2023 jsing

Refactor BN_mul().

This splits BN_mul() into two parts, one of which is a separate bn_mul()
function. This makes the code more readable and managable, while also
providing a better entry point for assembly optimisation. A separate
bn_mul() is provided for the BN_RECURSION implementation, to reduce
complexity.

This also enables bn_mul_comba4() for four word long bignums - this was
disabled for unknown reasons.

ok tb@


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.28 20-Jan-2023 jsing

Move bn_{mul,sqr}_comba{4,8}() from bn_asm.c to bn_mul.c/bn_sqr.c.

Wrap these in HAVE_BN_{MUL,SQR}_COMBA{4,8} defines. Add these defines to
bn_arch.h where the architecture currently provides its own version.

ok tb@


# 1.27 20-Jan-2023 jsing

Remove unused code.

ok tb@


# 1.26 20-Jan-2023 jsing

Reorder functions.

No functional change.


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.25 16-Jan-2023 jsing

Mop up debug code that escaped previously.

This is the result of `unifdef -m -U BN_COUNT'.


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.24 30-Nov-2022 jsing

Mop up more BN_DEBUG related code.


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.23 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.22 26-Nov-2022 jsing

Remove BIGNUM consistency macros.

Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND)
supposedly adds consistency checks to the BN code. These are rarely if ever
used and introduce a bunch of clutter in the code. Furthermore, there are
hacks in place to undo things that the debugging code does.

Remove all of this mess and instead rely on always enabled checks, more
readable code and proper regress coverage to ensure correct behaviour.

"Good riddance." tb@


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


# 1.21 24-Nov-2022 jsing

Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.20 09-Feb-2015 jsing

BN_CTX_get() can fail - consistently check its return value.

There are currently cases where the return from each call is checked,
the return from only the last call is checked and cases where it is not
checked at all (including code in bn, ec and engine).

Checking the last return value is valid as once the function fails it will
continue to return NULL. However, in order to be consistent check each
call with the same idiom. This makes it easy to verify.

Note there are still a handful of cases that do not follow the idiom -
these will be handled separately.

ok beck@ doug@


# 1.19 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.18 10-Jul-2014 jsing

Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.

This also includes some miscellaneous sorting/tidying of headers.


# 1.17 10-Jul-2014 jsing

Stop including standard headers via cryptlib.h - pull in the headers that
are needed in the source files that actually require them.

ok beck@ miod@


# 1.16 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.15 08-May-2014 jsing

Emergency knfectomie requested by tedu@.


# 1.14 03-Nov-2011 djm

openssl-1.0.0e: resolve conflicts


# 1.13 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.12 06-Sep-2008 djm

resolve conflicts


# 1.11 11-Nov-2003 markus

merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table
[make includes before you build libssl/libcrypto]


# 1.10 12-May-2003 markus

merge 0.9.7b with local changes; crank majors for libssl/libcrypto


# 1.9 10-Sep-2002 markus

merge openssl-0.9.7-beta3, tested on vax by miod@


# 1.8 07-Jun-2002 beck

Merge OpenSSL 0.9.7-stable-20020605,
correctly autogenerate obj_mac.h


# 1.7 21-May-2002 beck

Merge openssl-0.9.7-stable-SNAP-20020519


# 1.6 15-May-2002 beck

OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.5 15-Dec-2000 beck

openssl-engine-0.9.6 merge


# 1.4 15-Apr-2000 beck

OpenSSL 0.9.5a merge


# 1.3 19-Mar-2000 beck

OpenSSL 0.9.5 merge

*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs


# 1.2 29-Sep-1999 beck

OpenSSL 0.9.4 merge


# 1.1 05-Oct-1998 ryker

branches: 1.1.1;
Initial revision