Add SSL logic