minor bug fixes throughout for ssl enablement

Signed-off-by: Richard Conway <richard@elastacloud.com>