diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-10-13 11:39:35 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-10-21 18:03:36 +0200 |
commit | b20d44eac8f0af4ecd7038f4c6b16c55eb794d0f (patch) | |
tree | 5130382332e1a165a01776135d5aa893b52e12f4 | |
parent | 367ee2152e019d72f63537ae898eda311bc9219a (diff) |
Document the stack functions that are forgiving
I.e., those that can be called with NULL stack parameter or invalid index.
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19400)
(cherry picked from commit 0778364f8ec1f9702e62e6298aaa212ec40b6111)
-rw-r--r-- | doc/man3/DEFINE_STACK_OF.pod | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/man3/DEFINE_STACK_OF.pod b/doc/man3/DEFINE_STACK_OF.pod index 9cec998924..12f033d977 100644 --- a/doc/man3/DEFINE_STACK_OF.pod +++ b/doc/man3/DEFINE_STACK_OF.pod @@ -229,6 +229,13 @@ A failed search is indicated by a B<-1> return value. STACK_OF(), DEFINE_STACK_OF(), DEFINE_STACK_OF_CONST(), and DEFINE_SPECIAL_STACK_OF() are implemented as macros. +It is not an error to call B<sk_I<TYPE>_num>(), B<sk_I<TYPE>_value>(), +B<sk_I<TYPE>_free>(), B<sk_I<TYPE>_zero>(), B<sk_I<TYPE>_pop_free>(), +B<sk_I<TYPE>_delete>(), B<sk_I<TYPE>_delete_ptr>(), B<sk_I<TYPE>_pop>(), +B<sk_I<TYPE>_shift>(), B<sk_I<TYPE>_find>(), B<sk_I<TYPE>_find_ex>(), +and B<sk_I<TYPE>_find_all>() on a NULL stack, empty stack, or with +an invalid index. An error is not raised in these conditions. + The underlying utility B<OPENSSL_sk_> API should not be used directly. It defines these functions: OPENSSL_sk_deep_copy(), OPENSSL_sk_delete(), OPENSSL_sk_delete_ptr(), OPENSSL_sk_dup(), |