summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
authortb <>2024-01-13 10:57:08 +0000
committertb <>2024-01-13 10:57:08 +0000
commitfa1aed9be4e7cffefc5a40174eb97c98d39a9942 (patch)
tree0fd48c87176036b6c3e261429aa318870888df67 /src/lib/libssl
parentfdc0b6d6723ac761e12533c4208099d4bbc2af0e (diff)
downloadopenbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.tar.gz
openbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.tar.bz2
openbsd-fa1aed9be4e7cffefc5a40174eb97c98d39a9942.zip
Add a table of cipher names, ciphers and aliases
This arranges the data provided by dynamic library initialization in a static table and will help avoid gross code with missing error checking and other defects on every use of the library. This table isn't pretty due to various naming inconsistecies accumulated over the decades. It will significantly simplify the implementation of API such as EVP_get_cipherbyname() and EVP_CIPHER_do_all(). All the table does is map strings to ciphers, typically used on the openssl(1) command line or in code it's the mechanism that underlies the map from NID_chacha20 to the data returned by EVP_chacha20(). It's of course more complicated because it just had to be stupid. This is one of the places where the use of bsearch() is justified. The price to pay for the simplification is that adding custom aliases and custom ciphers to this table will no longer be supported. It is one significant user of the LHASH madness. That's just another piece of the awful "toolkit aspect"-guided misdesign that contributes to making this codebase so terrible. A corresponding table for the digests will be added in the next commit. ok jsing
Diffstat (limited to 'src/lib/libssl')
0 files changed, 0 insertions, 0 deletions