History log of /openbsd-current/lib/libssl/ssl_txt.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.37 08-Jul-2023 beck

Hide all public symbols in libssl

With the guentherizer 9000

ok tb@


Revision tags: OPENBSD_7_3_BASE
# 1.36 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


Revision tags: OPENBSD_7_2_BASE
# 1.35 07-Jun-2022 tb

Change the loop index from an unsigned int to size_t now that all
upper bounds are known to be size_t.

ok jsing


# 1.34 07-Jun-2022 tb

Drop an unnecessary cast

ok jsing


# 1.33 06-Jun-2022 tb

Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants.

ok jsing


# 1.32 06-Jun-2022 tb

Minor style cleanup in ssl_txt.c

Wrap long lines and fix a bug where the wrong struct member was checked
for NULL.

ok jsing


Revision tags: OPENBSD_7_1_BASE
# 1.31 29-Nov-2021 tb

Stop using BIO_s_file_inernal() in libssl.

BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.

ok jsing


# 1.30 23-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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.36 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


Revision tags: OPENBSD_7_2_BASE
# 1.35 07-Jun-2022 tb

Change the loop index from an unsigned int to size_t now that all
upper bounds are known to be size_t.

ok jsing


# 1.34 07-Jun-2022 tb

Drop an unnecessary cast

ok jsing


# 1.33 06-Jun-2022 tb

Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants.

ok jsing


# 1.32 06-Jun-2022 tb

Minor style cleanup in ssl_txt.c

Wrap long lines and fix a bug where the wrong struct member was checked
for NULL.

ok jsing


Revision tags: OPENBSD_7_1_BASE
# 1.31 29-Nov-2021 tb

Stop using BIO_s_file_inernal() in libssl.

BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.

ok jsing


# 1.30 23-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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.35 07-Jun-2022 tb

Change the loop index from an unsigned int to size_t now that all
upper bounds are known to be size_t.

ok jsing


# 1.34 07-Jun-2022 tb

Drop an unnecessary cast

ok jsing


# 1.33 06-Jun-2022 tb

Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants.

ok jsing


# 1.32 06-Jun-2022 tb

Minor style cleanup in ssl_txt.c

Wrap long lines and fix a bug where the wrong struct member was checked
for NULL.

ok jsing


Revision tags: OPENBSD_7_1_BASE
# 1.31 29-Nov-2021 tb

Stop using BIO_s_file_inernal() in libssl.

BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.

ok jsing


# 1.30 23-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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 06-Jun-2022 tb

Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants.

ok jsing


# 1.32 06-Jun-2022 tb

Minor style cleanup in ssl_txt.c

Wrap long lines and fix a bug where the wrong struct member was checked
for NULL.

ok jsing


Revision tags: OPENBSD_7_1_BASE
# 1.31 29-Nov-2021 tb

Stop using BIO_s_file_inernal() in libssl.

BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.

ok jsing


# 1.30 23-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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 29-Nov-2021 tb

Stop using BIO_s_file_inernal() in libssl.

BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.

ok jsing


# 1.30 23-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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-Oct-2021 jsing

Change tlsext_tick_lifetime_hint to uint32_t.

Now that SSL_SESSION is opaque, change tlsext_tick_lifetime_hint from long
to uint32_t (matching RFC4507), rather than continuing to work around an
inappropriate type choice.

ok tb@


Revision tags: OPENBSD_7_0_BASE
# 1.29 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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 11-Jun-2021 jsing

Indent all labels with a single space.

This ensures that diff reports the correct function prototype.

Prompted by 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
# 1.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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.28 07-Feb-2017 beck

Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible


# 1.27 26-Jan-2017 beck

Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public
API will not break, and we replace all internal use of the two argument
SSL_err() with the internal only SSL_error() that only takes a reason code.
ok jsing@


# 1.26 14-Dec-2014 jsing

Remove trailing whitespace.


# 1.25 16-Nov-2014 jsing

Sort and group includes.


# 1.24 12-Jul-2014 jsing

Provide ssl_version_string() function, which uses one of those modern C
constructs (a switch statement) and returns the appropriate string defined
by SSL_TXT_* for the given version, including support for DTLSv1 and
DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print().

ok beck@


# 1.23 11-Jul-2014 beck

Remove the PSK code. We don't need to drag around this
baggage.
ok miod@ jsing@


# 1.22 10-Jul-2014 tedu

decompress libssl. ok beck jsing


# 1.21 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.20 31-May-2014 jsing

TLS would not be entirely functional without extensions, so unifdef
OPENSSL_NO_TLSEXT.

ok tedu@


# 1.19 29-May-2014 beck

Everything sane has stdio, and FILE *. we don't need ifdefs for this.
ok to firebomb from tedu@


# 1.18 25-May-2014 jsing

The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.

Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.

ok miod@


# 1.17 05-May-2014 tedu

Remove SRP and Kerberos support from libssl. These are complex protocols
all on their own and we can't effectively maintain them without using them,
which we don't. If the need arises, the code can be resurrected.


# 1.16 25-Apr-2014 lteo

KNF fixes


# 1.15 20-Apr-2014 guenther

Chop off more SSLv2 tentacles and start fixing and noting y2038 issues.
APIs that pass times as longs will have to change at some point...
Bump major on both libcrypto and libssl.

ok tedu@


# 1.14 16-Apr-2014 tedu

add back SRP. i was being too greedy.


# 1.13 16-Apr-2014 tedu

disentangle SRP code from TLS


# 1.12 16-Apr-2014 guenther

Kill the bogus "send an SSLv3/TLS hello in SSLv2 format" crap from
the SSLv23_* client code. The server continues to accept it. It
also kills the bits for SSL2 SESSIONs; even when the server gets
an SSLv2-style compat handshake, the session that it creates has
the correct version internally.

ok tedu@ beck@


# 1.11 14-Apr-2014 jsing

First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.


# 1.10 13-Oct-2012 djm

resolve conflicts


# 1.9 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.8 06-Sep-2008 djm

resolve conflicts


# 1.7 29-Apr-2005 djm

resolve conflicts


# 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