skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 2:... HP Open Source Security for OpenVMS Volume 2:...
go to beginning of reference: SSL Application Programming Interface (API) Reference SSL Application Programming Interface (API) Reference
go to previous page: SSL_get_default_timeout SSL_get_default_timeout
go to next page: SSL_get_ex_data_X509_STORE_CTX_idxSSL_get_ex_data_X509_STORE_CTX_idx
end of book navigation links


SSL_get_error
Description
Return Values
See Also
History
 

NAME

SSL_get_error - obtain result code for TLS/SSL I/O operation

Synopsis  

#include <openssl/ssl.h>
int SSL_get_error(SSL *ssl, int ret);


return to top DESCRIPTION  

SSL_get_error() returns a result code (suitable for the C "switch" statement) for a preceding call to SSL_connect(), SSL_accept(), SSL_do_handshake(), SSL_read(), SSL_peek(), or SSL_write() on ssl. The value returned by that TLS/SSL I/O function must be passed to SSL_get_error() in parameter ret.

In addition to ssl and ret, SSL_get_error() inspects the current thread's OpenSSL error queue. Thus, SSL_get_error() must be used in the same thread that performed the TLS/SSL I/O operation, and no other OpenSSL function calls should appear in between. The current thread's error queue must be empty before the TLS/SSL I/O operation is attempted, or SSL_get_error() will not work reliably.


return to top RETURN VALUES  

The following return values can currently occur:


return to top SEE ALSO  

err(3)


return to top HISTORY  

SSL_get_error() was added in SSLeay 0.8.
go to previous page: SSL_get_default_timeout SSL_get_default_timeout
go to next page: SSL_get_ex_data_X509_STORE_CTX_idxSSL_get_ex_data_X509_STORE_CTX_idx