Fix safestack issues in ssl.h
authorMatt Caswell <matt@openssl.org>
Wed, 2 Sep 2020 15:15:06 +0000 (16:15 +0100)
committerMatt Caswell <matt@openssl.org>
Sun, 13 Sep 2020 10:09:45 +0000 (11:09 +0100)
commit6ac1cd10ba8a1d92d3858e53a7aea2cf444adf26
tree9b2ccdb7ea5335deb20cfb4d98ee23b8ae10e299
parent08073700cc50bcd0df5c0ee68c100e300a320d03
Fix safestack issues in ssl.h

We fix 3 problems with safestack:
- Including an openssl header file without linking against libcrypto
  can cause compilation failures (even if the app does not otherwise need
  to link against libcrypto). See issue #8102
- Recent changes means that applications in no-deprecated builds will need
  to include additional macro calls in the source code for all stacks that
  they need to use - which is an API break. This changes avoids that
  necessity.
- It is not possible to write code using stacks that works in both a
  no-deprecated and a normal build of OpenSSL. See issue #12707.

Fixes #12707
Contains a partial fix for #8102. A similar PR will be needed for hash to
fully fix.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)
24 files changed:
.gitignore
apps/ciphers.c
apps/s_server.c
build.info
fuzz/client.c
fuzz/server.c
include/openssl/ssl.h.in [moved from include/openssl/ssl.h with 99% similarity]
ssl/d1_srtp.c
ssl/s3_lib.c
ssl/ssl_ciph.c
ssl/ssl_lib.c
ssl/statem/extensions_clnt.c
ssl/statem/extensions_srvr.c
ssl/statem/statem_clnt.c
ssl/statem/statem_lib.c
ssl/statem/statem_srvr.c
ssl/t1_lib.c
test/cipherbytes_test.c
test/cipherlist_test.c
test/ciphername_test.c
test/dtls_mtu_test.c
test/sslcorrupttest.c
test/ssltest_old.c
util/perl/OpenSSL/stackhash.pm [new file with mode: 0644]