SQL Server connection over socket on listening port issue

%3CLINGO-SUB%20id%3D%22lingo-sub-2029128%22%20slang%3D%22en-US%22%3ESQL%20Server%20connection%20over%20socket%20on%20listening%20port%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2029128%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHappy%20New%20Year!%20Hope%20you%20and%20your%20family%20doing%20well%20in%20the%20extraordinary%20situation%20around%20the%20world!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%E2%80%99m%20writing%20this%20for%20an%20issue%20I'm%20facing%20when%20I'm%20connecting%20SQL%20Server%20using%20direct%20socket%20(C%2B%2B)%20on%20port%201433%20(or%20any%20other%20port%2C%20not%20using%20any%20kind%20of%20driver%20like%20ODBC).%20The%20connection%20is%20getting%20succeeded%20and%20I'm%20able%20to%20execute%20queries.%20The%20issue%20start%20popping%20when%20using%20Encrypt%3DTrue%20but%20without%20TrustServerCertificate%3DTrue%20flag%20(default%20is%20false).%20Furthermore%2C%20I%20tested%20this%20in%20TLS%201.2%20environment%20too%20with%20all%20valid%20certificates.%3C%2FP%3E%3CP%3EThe%20only%20combination%20is%20working%20when%20I'm%20setting%20both%26nbsp%3B%20Encrypt%3DTrue%20and%20TrustServerCertificate%3DTrue%20flags.%20But%26nbsp%3BTrustServerCertificate%3DTrue%20is%20not%20accepted%20by%20customer.%20They%20need%20supporting%20docs%20or%20links%20for%20this.%3C%2FP%3E%3CP%3EDid%20anyone%20faced%20this%20issue%3F%20Is%20there%20anything%20I'm%20missing%20while%20connection%3F%20or%20any%20supporting%20docs%2Flinks%20related%20to%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3ESanjoy.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi All,

 

Happy New Year! Hope you and your family doing well in the extraordinary situation around the world!!

 

I’m writing this for an issue I'm facing when I'm connecting SQL Server using direct socket (C++) on port 1433 (or any other port, not using any kind of driver like ODBC). The connection is getting succeeded and I'm able to execute queries. The issue start popping when using Encrypt=True but without TrustServerCertificate=True flag (default is false). Furthermore, I tested this in TLS 1.2 environment too with all valid certificates.

The only combination is working when I'm setting both  Encrypt=True and TrustServerCertificate=True flags. But TrustServerCertificate=True is not accepted by customer. They need supporting docs or links for this.

Did anyone faced this issue? Is there anything I'm missing while connection? or any supporting docs/links related to this? 

 

Regards,
Sanjoy.

0 Replies