1SSL_set_fd(3)                       OpenSSL                      SSL_set_fd(3)
2
3
4

NAME

6       SSL_set_fd - connect the SSL object with a file descriptor
7

SYNOPSIS

9        #include <openssl/ssl.h>
10
11        int SSL_set_fd(SSL *ssl, int fd);
12        int SSL_set_rfd(SSL *ssl, int fd);
13        int SSL_set_wfd(SSL *ssl, int fd);
14

DESCRIPTION

16       SSL_set_fd() sets the file descriptor fd as the input/output facility
17       for the TLS/SSL (encrypted) side of ssl. fd will typically be the
18       socket file descriptor of a network connection.
19
20       When performing the operation, a socket BIO is automatically created to
21       interface between the ssl and fd. The BIO and hence the SSL engine
22       inherit the behaviour of fd. If fd is non-blocking, the ssl will also
23       have non-blocking behaviour.
24
25       If there was already a BIO connected to ssl, BIO_free() will be called
26       (for both the reading and writing side, if different).
27
28       SSL_set_rfd() and SSL_set_wfd() perform the respective action, but only
29       for the read channel or the write channel, which can be set
30       independently.
31

RETURN VALUES

33       The following return values can occur:
34
35       0   The operation failed. Check the error stack to find out why.
36
37       1   The operation succeeded.
38

SEE ALSO

40       SSL_get_fd(3), SSL_set_bio(3), SSL_connect(3), SSL_accept(3),
41       SSL_shutdown(3), ssl(3) , bio(3)
42
43
44
451.0.0e                            2000-09-16                     SSL_set_fd(3)
Impressum