Skip to content

Commit 6a4a714

Browse files
cput8m
authored andcommitted
doc: clarify SSL_CIPHER_description allocation
Previously the documentation for `SSL_CIPHER_description` said: > If buf is provided, it must be at least 128 bytes, otherwise a buffer > will be allocated using OPENSSL_malloc(). In reality, `OPENSSL_malloc` is only invoked if the provided `buf` argument is `NULL`. If the `buf` arg is not `NULL`, but smaller than 128 bytes, the function returns `NULL` without attempting to allocate a new buffer for the description. This commit adjusts the documentation to better describe the implemented behaviour. CLA: trivial Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl/openssl#23921)
1 parent 58ffcbb commit 6a4a714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/man3/SSL_CIPHER_get_name.pod

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ cipher B<c>.
109109

110110
SSL_CIPHER_description() returns a textual description of the cipher used
111111
into the buffer B<buf> of length B<len> provided. If B<buf> is provided, it
112-
must be at least 128 bytes, otherwise a buffer will be allocated using
112+
must be at least 128 bytes. If B<buf> is NULL it will be allocated using
113113
OPENSSL_malloc(). If the provided buffer is too small, or the allocation fails,
114114
B<NULL> is returned.
115115

0 commit comments

Comments
 (0)