Hi,
Finally it works with
TC.ProviderName := 'PostgreSQL';
TC.UserName := UserName.Text;
TC.Password := Password.Text;
TC.server := Server.Text;
TC.Database := Database.Text;
TC.port := Port.ValueAsInt;
TC.SpecificOptions.Values['ApplicationName'] := 'MICROSAT 5';
if Trim(Schema.Text) <> '' then
TC.SpecificOptions.Values['Schema'] := Schema.Text
else
TC.SpecificOptions.Values['Schema'] := '';
TC.SpecificOptions.Values['SSLMode'] := 'smRequire';
TC.SpecificOptions.Values['SSLCert'] := Certificatclient.Text;
TC.SpecificOptions.Values['SSLKey'] := Clefprive.Text;
TC.SpecificOptions.Values['SSLCACert'] := Certificatdautorite.Text;
TC.SpecificOptions.Values['SSLCipherList'] := Chiffrementsacceptes.Text;
but if Certificatclient.Text, Clefprive.Text, Certificatdautorite.Text or Chiffrementsacceptes is empty it is working !!
my ph_hba.conf
hostssl all all 0.0.0.0/0 md5
and postgresql.conf
# - SSL -
ssl = on
#ssl_ca_file = ''
#ssl_cert_file = 'server.crt'
#ssl_crl_file = ''
#ssl_crl_dir = ''
#ssl_key_file = 'server.key'
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL'
I've created the openssl :
C:\Program Files\OpenSSL-Win64\bin\openssl req -new -x509 -days 365 -nodes -text -out server.crt -keyout server.key
and put erver.crt et server.key in postgresql data directory
and ideas ?
Any ideas ?