How to detect (or set) encryption
Posted: Fri 26 Sep 2008 09:25
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...
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...