summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-04-27 11:12:51 +1000
committerPauli <pauli@openssl.org>2023-05-01 17:14:42 +1000
commit1c35e39ac0e5845c5bc7ca7f802ee832ca95388d (patch)
treebdb1c21ee921c62f4a2275b2bbf5a5764bfa8031 /doc
parentefe0222f5c9e07167aeac80d4d5e3d67aa8f1f36 (diff)
downloadopenssl-new-1c35e39ac0e5845c5bc7ca7f802ee832ca95388d.tar.gz
doc: note that the stack find functions no longer modify the stack
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/20842)
Diffstat (limited to 'doc')
-rw-r--r--doc/man3/DEFINE_STACK_OF.pod10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/man3/DEFINE_STACK_OF.pod b/doc/man3/DEFINE_STACK_OF.pod
index 12f033d977..044228129b 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<sk> is sorted and
B<sk_I<TYPE>_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<sk> can change. Note that because the stack may be
-sorted as the result of a B<sk_I<TYPE>_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<sk> can change.
B<sk_I<TYPE>_find_ex>() operates like B<sk_I<TYPE>_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<sk_I<TYPE>_reserve>() and B<sk_I<TYPE>_new_reserve>() were added in OpenSSL
1.1.1.
+From OpenSSL 3.2.0, the B<sk_I<TYPE>_find>(), B<sk_I<TYPE>_find_ex>()
+and B<sk_I<TYPE>_find_all>() calls are read-only and do not sort the
+stack. To avoid any performance implications this change introduces,
+B<sk_I<TYPE>_sort>() should be called before these find operations.
+
=head1 COPYRIGHT
Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.