From: Pauli Date: Thu, 27 Apr 2023 01:12:51 +0000 (+1000) Subject: doc: note that the stack find functions no longer modify the stack X-Git-Tag: openssl-3.2.0-alpha1~940 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c35e39ac0e5845c5bc7ca7f802ee832ca95388d;p=thirdparty%2Fopenssl.git doc: note that the stack find functions no longer modify the stack Reviewed-by: Tomas Mraz Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/20842) --- diff --git a/doc/man3/DEFINE_STACK_OF.pod b/doc/man3/DEFINE_STACK_OF.pod index 12f033d977e..044228129ba 100644 --- a/doc/man3/DEFINE_STACK_OF.pod +++ b/doc/man3/DEFINE_STACK_OF.pod @@ -178,10 +178,7 @@ where a comparison function has been specified, I is sorted and B_find>() returns the index of a matching element or B<-1> if there is no match. Note that, in this case the comparison function will usually compare the values pointed to rather than the pointers themselves and -the order of elements in I can change. Note that because the stack may be -sorted as the result of a B_find>() call, if a lock is being used to -synchronise access to the stack across multiple threads, then that lock must be -a "write" lock. +the order of elements in I can change. B_find_ex>() operates like B_find>() except when a comparison function has been specified and no matching element is found. @@ -295,6 +292,11 @@ and was not a public API. B_reserve>() and B_new_reserve>() were added in OpenSSL 1.1.1. +From OpenSSL 3.2.0, the B_find>(), B_find_ex>() +and B_find_all>() calls are read-only and do not sort the +stack. To avoid any performance implications this change introduces, +B_sort>() should be called before these find operations. + =head1 COPYRIGHT Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.