finalize and integrate SSL support