Gateway-API TLS termination

Hello, I’m new to gateway-api and my networking knowledge is limited
I’m trying to setup a tcp connection with tls termination
I’m using AKS so I installed the gateway-api CRDs and istio controller
my yamls are the following
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: istio-gateway
spec:
gatewayClassName: istio
listeners:
- name: test
protocol: TLS
port: 9006
hostname: " test.example.com "
tls:
mode: Terminate
certificateRefs:
- kind: "Secret"
name: "test-secret"
allowedRoutes:
kinds:
- kind: TCPRoute
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
name: test-istio
spec:
parentRefs:
- name: istio-gateway
sectionName: test
rules:
- backendRefs:
- name: test-service
port: 9006
is the structure and use of my yamls correct ?
when I try to make a connection to test.example.com i get an error System.IO.IOException: The handshake failed due to an unexpected packet format
I added the loadbalancer ip address generated by the istio gateway to dns record for test.example.com also used an ssl certificate that i generated in the test-secret
which I think it’s wrong because I don’t know much about SNI !!!