Jump to content
lindemayer2802

IdHTTPConexao erro Comando Post

Recommended Posts

Ola Senhores,

 

Ao excutar o comando Post do Componente IdHTTP1 (delphi 7) , no e.message do Exception retorna

 

"Could not load key, check password" ou "Error connecting with SSL"

 

alguem que ja esteve com esse retorno, poderia me dar uma orientação.

 

Obrigado.

 

 

trecho do fonte abaixo:

 

 

ParametrosWeb.Add('client_id=' + '******');
ParametrosWeb.Add('client_secret=' + '************************);
ParametrosWeb.Add('grant_type=password');
ParametrosWeb.Add('username=' + pLogin ');
ParametrosWeb.add('password='+ UPPERCase( StrMD5('*****')));
IdSSLIOHandlerSocket1.SSLOptions.Method := sslvSSLv3;
IdSSLIOHandlerSocket1.SSLOptions.Mode := sslmClient;

 

IdSSLIOHandlerSocket1.SSLOptions.CertFile       :=  'C:\EstoqMan PRO\enudsk\CAcert.pem';   ;
IdSSLIOHandlerSocket1.SSLOptions.RootCertFile   :=  'C:\EstoqMan PRO\enudsk\WSScert.pem'; 
IdSSLIOHandlerSocket1.SSLOptions.KeyFile  :=  'C:\EstoqMan PRO\enudsk\WSSkey.pem'; 

 

 

with IdHTTPConexao do
            begin
               IOHandler := IdSSLIOHandlerSocket1;
               Request.ContentType := 'application/x-www-form-urlencoded';  //'application/json';
               try
                  Retorno :=  Post( pWebService, ParametrosWeb);
               except
                on E: Exception do
                  ShowMessage('Erro: '#13#10 + e.Message + ' ----- ' + IdHTTPConexao.ResponseText  );
               end;
            end;

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.