Several patch changes regarding to OpenSSL as this version does not compile under LibreSSL. Signed-off-by: Rosen Penev <rosenp@gmail.com>