Setting xpack.security.enabled = true

I am using elasticsearch 7.1

If I set xpack.security.enabled: true then I will get the following message:

Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled]