I want to detect if encryption is being used or not when a connection has been established to the server. How would I do that?
Current setup (that works encrypted - tested using a packet sniffer):
Server running MSSQL 2000 SP4 with an installed certificate and "Force protocol encryption" is checked.
Client using TMSConnection with defaults.
Ok, so far so good... But now I want to check if the connection is really encrypted in code at the client, how would I do that?
- The Options.Encrypted property has not been changed...
- The ConnectionString has not been changed...
- I cannot find any property to detect if the current connection is really encrypted or not...
A related question: Why does it not work if I force encryption on the client?
- I mean, I've sniffed the traffic and the connection is encrypted if "Force protocol encryption" is checked on the server and "Options.Encrypt := False" is set on the client... But I cannot connect if I specify "Options.Encrypt := True" on the client.
I think that's quite strange... I mean, obviously the encryption works...
How to detect (or set) encryption
TMSConnection does not allow to get know if there was established encrypted connection by server side initiation.
To establish encrypted connection on the client you should set Options.Encrypt to True. In this case you should have a valid Certificate Server in your network environment.
You can find more detailed information about enabling encryption for SQL Server by the following link:
http://support.microsoft.com/kb/276553
To establish encrypted connection on the client you should set Options.Encrypt to True. In this case you should have a valid Certificate Server in your network environment.
You can find more detailed information about enabling encryption for SQL Server by the following link:
http://support.microsoft.com/kb/276553