OpenSSL: Use SSL_pending() to determine if we want a select() before SSL_read()

In order to obey the timeout in idevice_connection_receive_timeout(), we are
using select() via socket_check_fd(). However, the SSL bio might have buffered
more bytes than actually requested upon a call to SSL_read(), so in the next
call to idevice_connection_receive_timeout() a select() would not find the fd
being ready to read, and make it fail with an error, after the specified
timeout is reached.
With the help of SSL_pending() we can now skip calling select() so that
SSL_read() will directly be called again.
1 file changed
tree: ae4488955b67b676ca5735d622083746c339ce96
  1. common/
  2. cython/
  3. docs/
  4. include/
  5. m4/
  6. src/
  7. tools/
  8. .gitignore
  9. AUTHORS
  10. autogen.sh
  11. configure.ac
  12. COPYING
  13. COPYING.LESSER
  14. doxygen.cfg.in
  15. Makefile.am
  16. NEWS
  17. README.md
README.md

libimobiledevice

About

A library to communicate with services of Apple iOS devices using native protocols.

Requirements

Development Packages of:

  • OpenSSL or GnuTLS
  • libplist
  • libusbmuxd

Software:

  • usbmuxd (OSS or Apple's version)
  • make
  • autoheader
  • automake
  • autoconf
  • libtool
  • pkg-config
  • gcc or clang

Optional:

  • cython (Python bindings)
  • doxygen (Documentation)

Installation

To compile run:

./autogen.sh
make
sudo make install

If you require a custom prefix or other option being passed to ./configure you can pass them directly to ./autogen.sh like this:

./autogen.sh --prefix=/opt/local --enable-debug-code
make
sudo make install

By default, OpenSSL will be used. If you prefer GnuTLS, configure with --disable-openssl like this:

./autogen.sh --disable-openssl

Who/What/Where?

Credits

Apple, iPhone, iPod, and iPod Touch are trademarks of Apple Inc. libimobiledevice is an independent software library and has not been authorized, sponsored, or otherwise approved by Apple Inc.

README Updated on: 2019-06-21