SSL_set_connect_state.pod revision 89837
176866Skris=pod 276866Skris 376866Skris=head1 NAME 476866Skris 576866SkrisSSL_set_connect_state, SSL_get_accept_state - prepare SSL object to work in client or server mode 676866Skris 776866Skris=head1 SYNOPSIS 876866Skris 976866Skris #include <openssl/ssl.h> 1076866Skris 1176866Skris void SSL_set_connect_state(SSL *ssl); 1276866Skris 1376866Skris void SSL_set_accept_state(SSL *ssl); 1476866Skris 1576866Skris=head1 DESCRIPTION 1676866Skris 1789837SkrisSSL_set_connect_state() sets B<ssl> to work in client mode. 1876866Skris 1989837SkrisSSL_set_accept_state() sets B<ssl> to work in server mode. 2076866Skris 2176866Skris=head1 NOTES 2276866Skris 2376866SkrisWhen the SSL_CTX object was created with L<SSL_CTX_new(3)|SSL_CTX_new(3)>, 2476866Skrisit was either assigned a dedicated client method, a dedicated server 2576866Skrismethod, or a generic method, that can be used for both client and 2676866Skrisserver connections. (The method might have been changed with 2776866SkrisL<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)> or 2876866SkrisSSL_set_ssl_method().) 2976866Skris 3089837SkrisWhen beginning a new handshake, the SSL engine must know whether it must 3189837Skriscall the connect (client) or accept (server) routines. Even though it may 3289837Skrisbe clear from the method chosen, whether client or server mode was 3389837Skrisrequested, the handshake routines must be explicitly set. 3476866Skris 3589837SkrisWhen using the L<SSL_connect(3)|SSL_connect(3)> or 3689837SkrisL<SSL_accept(3)|SSL_accept(3)> routines, the correct handshake 3789837Skrisroutines are automatically set. When performing a transparent negotiation 3889837Skrisusing L<SSL_write(3)|SSL_write(3)> or L<SSL_read(3)|SSL_read(3)>, the 3989837Skrishandshake routines must be explicitly set in advance using either 4089837SkrisSSL_set_connect_state() or SSL_set_accept_state(). 4189837Skris 4276866Skris=head1 RETURN VALUES 4376866Skris 4476866SkrisSSL_set_connect_state() and SSL_set_accept_state() do not return diagnostic 4576866Skrisinformation. 4676866Skris 4776866Skris=head1 SEE ALSO 4876866Skris 4976866SkrisL<ssl(3)|ssl(3)>, L<SSL_new(3)|SSL_new(3)>, L<SSL_CTX_new(3)|SSL_CTX_new(3)>, 5089837SkrisL<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>, 5189837SkrisL<SSL_write(3)|SSL_write(3)>, L<SSL_read(3)|SSL_read(3)>, 5276866SkrisL<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)> 5376866Skris 5476866Skris=cut 55