Clean up ssl template moving many `if` to attributes

Template is not the best place for "configure" things. Instead attributes seems better for this kind of code