Skip to content

Commit

Permalink
Add missing symbols for postgres (#979)
Browse files Browse the repository at this point in the history
This had already existed in AWS-LC when we were working on removing decrepit. 
During the work for that, we had the consensus that we would remove everything
that did not have usage internally and incrementally add back functions if
customers needed the functionality.
We can consider influencing the Postgres upstream by submitting a PR to them to 
ifdef out the Cast ciphersuites. However, this change would only be added in new
Postgres releases and won't be applicable to old releases. PostgreSQL Versions
11-15 are currently supported, with each major version of PostgreSQL having a
support timeline of 5 years. Any upstream influence we make now, won't truly be
felt until PostgreSQL15 is deprecated in 2027 (assuming an upstream contribution
makes it to Version 16).
Considering these factors, we should look to add minimal support for the Cast
ciphersuites through EVP now, so we can gain adoption in existing versions of 
PostGres. We can still make an upstream contribution to ifdef the CAST,
blowfish, and des usage out of PostGres when building with AWS-LC, so that new
versions of PostGres don't continue rely on this behavior.
We're making sure to only expose the minimal amount of symbols needed, which are
the EVP_CIPHERs in this case. We're also adding the AWS_LC_DEPRECATED macro in
front of the CAST ciphersuites to indicate that these function should not be
relied on. This will intentionally cause current builds of PostGres to complain
about deprecated symbols. We can make an upstream contribution to ifdef these
deprecated symbols to silence these warnings.
  • Loading branch information
samuel40791765 authored May 1, 2023
1 parent 413bce5 commit d31f1c3
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ add_library(
x509v3/v3_utl.c
decrepit/bio/base64_bio.c
decrepit/blowfish/blowfish.c
decrepit/cast/cast.c
decrepit/cast/cast_tables.c
decrepit/cfb/cfb.c
decrepit/dh/dh_decrepit.c
Expand Down Expand Up @@ -731,6 +732,7 @@ if(BUILD_TESTING)
x509/x509_time_test.cc
x509v3/tab_test.cc
decrepit/blowfish/blowfish_test.cc
decrepit/cast/cast_test.cc
decrepit/cfb/cfb_test.cc
decrepit/evp/evp_test.cc
decrepit/ripemd/ripemd_test.cc
Expand Down
Loading

0 comments on commit d31f1c3

Please sign in to comment.