168651Skris=pod
268651Skris
368651Skris=head1 NAME
468651Skris
568651SkrisSSL_set_fd - connect the SSL object with a file descriptor
668651Skris
768651Skris=head1 SYNOPSIS
868651Skris
968651Skris #include <openssl/ssl.h>
1068651Skris
1168651Skris int SSL_set_fd(SSL *ssl, int fd);
1268651Skris int SSL_set_rfd(SSL *ssl, int fd);
1368651Skris int SSL_set_wfd(SSL *ssl, int fd);
1468651Skris
1568651Skris=head1 DESCRIPTION
1668651Skris
1768651SkrisSSL_set_fd() sets the file descriptor B<fd> as the input/output facility
1868651Skrisfor the TLS/SSL (encrypted) side of B<ssl>. B<fd> will typically be the
1968651Skrissocket file descriptor of a network connection.
2068651Skris
2168651SkrisWhen performing the operation, a B<socket BIO> is automatically created to
2268651Skrisinterface between the B<ssl> and B<fd>. The BIO and hence the SSL engine
2368651Skrisinherit the behaviour of B<fd>. If B<fd> is non-blocking, the B<ssl> will
2468651Skrisalso have non-blocking behaviour.
2568651Skris
2668651SkrisIf there was already a BIO connected to B<ssl>, BIO_free() will be called
2768651Skris(for both the reading and writing side, if different).
2868651Skris
2968651SkrisSSL_set_rfd() and SSL_set_wfd() perform the respective action, but only
3068651Skrisfor the read channel or the write channel, which can be set independently.
3168651Skris
3268651Skris=head1 RETURN VALUES
3368651Skris
3468651SkrisThe following return values can occur:
3568651Skris
3668651Skris=over 4
3768651Skris
38264331Sjkim=item Z<>0
3968651Skris
4068651SkrisThe operation failed. Check the error stack to find out why.
4168651Skris
42264331Sjkim=item Z<>1
4368651Skris
4468651SkrisThe operation succeeded.
4568651Skris
4668651Skris=back
4768651Skris
4868651Skris=head1 SEE ALSO
4968651Skris
5068651SkrisL<SSL_get_fd(3)|SSL_get_fd(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>,
5168651SkrisL<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>,
5268651SkrisL<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
5368651Skris
5468651Skris=cut
55