Manual Pages for UNIX Darwin command on man SSL_connect
MyWebUniversity

Manual Pages for UNIX Darwin command on man SSL_connect

SSLconnect(3) OpenSSL SSLconnect(3)

NAME

SSLconnect - initiate the TLS/SSL handshake with an TLS/SSL server

SYNOPSIS

#include

int SSLconnect(SSL *ssl);

DESCRIPTION

SSLconnect() initiates the TLS/SSL handshake with a server. The communication channel must already have been set and assigned to the ssssll by setting an underlying BBIIOO. NNOOTTEESS The behaviour of SSLconnect() depends on the underlying BIO. If the underlying BIO is bblloocckkiinngg, SSLconnect() will only return once the handshake has been finished or an error occurred.

If the underlying BIO is nnoonn-bblloocckkiinngg, SSLconnect() will also return

when the underlying BIO could not satisfy the needs of SSLconnect() to

continue the handshake, indicating the problem by the return value -1.

In this case a call to SSLgeterror() with the return value of SSLconnect() will yield SSSSLLEERRRROORRWWAANNTTRREEAADD or SSSSLLEERRRROORRWWAANNTTWWRRIITTEE. The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSLconnect(). The action depends on

the underlying BIO. When using a non-blocking socket, nothing is to be

done, but select() can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue.

RETURN VALUES

The following return values can occur: 1. The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been established. 2. The TLS/SSL handshake was not successful but was shut down controlled and by the specifications of the TLS/SSL protocol. Call SSLgeterror() with the return value rreett to find out the reason. 3. <0 The TLS/SSL handshake was not successful, because a fatal error occurred either at the protocol level or a connection failure occurred. The shutdown was not clean. It can also occur of action

is need to continue the operation for non-blocking BIOs. Call

SSLgeterror() with the return value rreett to find out the reason.

SEE ALSO

SSLgeterror(3), SSLaccept(3), SSLshutdown(3), ssl(3), bio(3), SSLsetconnectstate(3), SSLdohandshake(3), SSLCTXnew(3) PPOODD EERRRROORRSS e! The above document had some coding errors, which are explained bbeellooww:: Around line 49: You have '=item 0' instead of the expected '=item 2' Around line 55: Expected '=item 3'

0.9.7l 2003-06-03 SSLconnect(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™