HPCC-11764 Dafilesrv authentication and encryption on transport

Current dafilesrv uses unencrypted sockets which is not secure. This update
adds a new section to the environment.conf file to optionally specify that
dafilesrv and its clients should use SSL, and points to the cert file, key file
and provides an encrypted passphrase. If specified, dafilesrv and its clients
will enable secure sockets (openSSL) and communicate in a secure manner.

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>
As it turns out this code is correct. SSL_pending is called before SSL_read to avoid blocking. Testing with the code above, the call to avail_read does return a number of bytes to read. As you pointed out this "may" not be exact, since the socket data is encrypted, but the caller doesn't care about the number of bytes. Instead it just treats the result as an indicator there there is data to be read and everything is happy from there on.