summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/c_all.c
diff options
context:
space:
mode:
authortb <>2024-01-13 11:08:39 +0000
committertb <>2024-01-13 11:08:39 +0000
commit9fffb87f5d35d0387d2fef05868f79d200d8a912 (patch)
treef1a62b5297113e91a818c32f3ecb135d9a98c389 /src/lib/libcrypto/evp/c_all.c
parent455bb26ef6b3e1e6c272effb3d99a0c59a1300d8 (diff)
downloadopenbsd-9fffb87f5d35d0387d2fef05868f79d200d8a912.tar.gz
openbsd-9fffb87f5d35d0387d2fef05868f79d200d8a912.tar.bz2
openbsd-9fffb87f5d35d0387d2fef05868f79d200d8a912.zip
Reimplement {EVP_CIPHER,EVP_MD,OBJ_NAME}_do_all{,_sorted}(3)
This implements the do_all API by simple loops over the tables of digests and ciphers. Since some ciphers are only available on some platforms, we need to skip them if necessary. We use loops in each of the functions rather the convoluted way of reducing some of the loops to others. Since the tables are sorted, as ensured by regress, both do_all() and do_all_sorted() walk the lists in order. In particular, we no longer need to allocate to be able to sort hash tables by name on the fly in a void function that may end up doing nothing because allocation failed. We still need to do an unchecked OPENSSL_init_crypto() call. But that's what prayer and clean living are there for (as beck put it). The OBJ_NAME API is completely misnamed. It has little to do with objects and a lot to do with EVP. Therefore we implement what will remain from its saner replacement in the evp directory, i.e., evp_names.c. ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/c_all.c')
0 files changed, 0 insertions, 0 deletions