SSL_set_fd
The SSL_set_fd function assigns a socket to a Secure Sockets Layer (SSL) structure.
Last updated
Changed for PUT00.
Format
LIBS := CSSL
#include <openssl/ssl.h>
int SSL_set_fd(SSL *ssl,int fd) - ssl
- A pointer to a token returned on the SSL_new call.
- fd
- The file descriptor of the socket.
Normal return
Return code 1 indicates that the function was successful.
Error return
A return code equal to 0 indicates an error.
Programming considerations
- To use this function, you must include the library that is specified in the prototype in your makefile.
-
Assign the socket to an SSL structure before starting the SSL session with the SSL_connect or SSL_accept function. You can assign the socket to an SSL structure anytime after the Transmission Control Protocol (TCP) connection is established, meaning after the connect or accept functions is completed successfully.
Examples
For sample SSL applications, see SSL examples.
Related information
- SSL_accept
- SSL_connect
- SSL_new
- connect: Request a connection to a remote host
- accept — Accept a connection request.
See the Socket Application Programming Interface Overview
See z/TPF Security for more SSL information.