Fixes SSL sockets with openssl 1.1.1b
Fixes SSL sockets with openssl 1.1.1b

BIO_get_mem_ptr does not give direct access to internal buffer, so we
have to invalidate our copy before using buffer values.

Change-Id: I87f6646301231348110a44a686b23881d5a71925
Reviewed-on: http://review.couchbase.org/108447
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>

avsej/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,avsej/libcouchbase,kojiromike/libcouchbase,couchbase/libcouchbase,couchbase/libcouchbase,kojiromike/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,avsej/libcouchbase,kojiromike/libcouchbase,couchbase/libcouchbase,kojiromike/libcouchbase,couchbase/libcouchbase