X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=doc%2Fssl%2FSSL_connect.pod;h=8101d4de912070f7b5d0c8a57caba8cb1a2cb677;hb=ed233db7421b98b2058da2a07f6c46b52917b918;hp=269edd0e709e3efb7cd15354f78f753cf3d99ffc;hpb=cc99526db1ee5b948736f6b07958a786fec1240b;p=openssl.git diff --git a/doc/ssl/SSL_connect.pod b/doc/ssl/SSL_connect.pod index 269edd0e70..8101d4de91 100644 --- a/doc/ssl/SSL_connect.pod +++ b/doc/ssl/SSL_connect.pod @@ -2,7 +2,7 @@ =head1 NAME -SSL_connect - Initiate the TLS handshake with an TLS server +SSL_connect - initiate the TLS/SSL handshake with an TLS/SSL server =head1 SYNOPSIS @@ -12,19 +12,23 @@ SSL_connect - Initiate the TLS handshake with an TLS server =head1 DESCRIPTION -SSL_connect() initiates the TLS handshake with a server. The communication +SSL_connect() initiates the TLS/SSL handshake with a server. The communication channel must already have been set and assigned to the B by setting an -underlying B. The behaviour of SSL_connect() depends on the underlying -BIO. +underlying B. -If the underlying BIO is B, SSL_connect() will only return, once the -handshake has been finished or an error occured. +=head1 NOTES -If the underlying BIO is B, SSL_connect() will also return, +The behaviour of SSL_connect() depends on the underlying BIO. + +If the underlying BIO is B, SSL_connect() will only return once the +handshake has been finished or an error occurred. + +If the underlying BIO is B, SSL_connect() will also return when the underlying BIO could not satisfy the needs of SSL_connect() -to continue the handshake. In this case a call to SSL_get_error() with the -return value of SSL_connect() will yield SSL_ERROR_WANT_READ or -SSL_ERROR_WANT_WRITE. The calling process then must repeat the call after +to continue the handshake, indicating the problem by the return value -1. +In this case a call to SSL_get_error() with the +return value of SSL_connect() will yield B or +B. The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_connect(). 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 @@ -37,22 +41,22 @@ The following return values can occur: =over 4 -=item 1 +=item Z<>0 -The TLS handshake was successfully completed, a TLS connection has been -established. +The TLS/SSL handshake was not successful but was shut down controlled and +by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the +return value B to find out the reason. -=item 0 +=item Z<>1 -The TLS handshake was not successfull but was shut down controlled and -by the specifications of the TLS protocol. Call SSL_get_error() with the -return value B to find out the reason. +The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been +established. -=item -1 +=item E0 -The TLS handshake was not successfull, because a fatal error occured either -at the protocol level or a connection failure occured. The shutdown was -not clean. It can also occure of action is need to continue the operation +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 SSL_get_error() with the return value B to find out the reason. @@ -60,7 +64,10 @@ to find out the reason. =head1 SEE ALSO -L, L, -L, L , L +L, L, +L, L, L, +L, +L, +L =cut