Commit c9a89ac815 for openssl.org
commit c9a89ac8153c1f89a72536f1bb9c63b141cee420
Author: Steve Grubb <ausearch.1@gmail.com>
Date: Tue Jun 9 17:35:49 2026 -0400
doc: document SSL_set_*_state SSL argument
SSL_set_connect_state() and SSL_set_accept_state() have no return value to
report argument errors, but their documentation did not state the precondition
for the SSL argument. Passing NULL, or a pointer that is not a valid
SSL object, is a programmer error rather than a recoverable API error.
Document that the ssl argument must point to a valid SSL object and
must not be NULL.
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Thu Jun 11 09:04:23 2026
(Merged from https://github.com/openssl/openssl/pull/31435)
diff --git a/doc/man3/SSL_set_connect_state.pod b/doc/man3/SSL_set_connect_state.pod
index 559d23a759..7c1969e7fc 100644
--- a/doc/man3/SSL_set_connect_state.pod
+++ b/doc/man3/SSL_set_connect_state.pod
@@ -23,6 +23,8 @@ SSL_set_accept_state() sets B<ssl> to work in server mode.
SSL_is_server() checks if B<ssl> is working in server mode.
+B<ssl> must point to a valid SSL object and B<MUST NOT> be NULL.
+
=head1 NOTES
When the SSL_CTX object was created with L<SSL_CTX_new(3)>,