I had to solve this exact scenario.
You do not need to return the listener at all. You need to open the endpoint in "Service Manifest.xml". You bind the ssl certificate here etc. (I assume you know this part).
<Endpoint Name="Test.WcfTypeEndpoint" Protocol="https" Type="Input" CertificateRef="MySSL" Port="44330" />
. , node, .
public class InternalBinding : Binding
{
private readonly HttpsTransportBindingElement _transport;
public InternalBinding()
{
_transport = new HttpTransportBindingElement
{
HostNameComparisonMode = HostNameComparisonMode.StrongWildcard,
}
}
}