SSL/TLS Negotiation

I am trying to create a server similar to PostgreSQL lets say it Db Service and also trying to connect Bi tool to this. So to implement SSL in Db service, i was using TCP.bindTLs, but i am not getting expected results because Bi tools start ssl negotiation from the second message instead of first.

So flow is like this.

Bi tool —> send SSL request --> DB service

DB service --> send yes --> Bi tool

and then bi tool starts ssl negotiation by sending client hello message.

  1. But in my case when i am using TCP.bindTLs, Db service is not able to capture SSL request message, so it can’t send “yes”

  2. and if i am using TCP.bind then first two steps are okay, Bi tool also send client hello message, but Db service is unable to interpret the client hello message and even if it is able to capture client hello by some method , then to send server hello i have to do complete SSL implementation in DB service.

So i am stuck here… Which option we should choose from the above two and how?