Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

HTTPS connection, how to debug to determine what is going wrong?

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Joyner ᏩᏯ

HTTPS connection, how to debug to determine what is going wrong?

I am initiating an https connection using the generated files from ws_helper and the synapse library.
Based on sample code include with wst i have in my uses clause: soap_formatter, metadata_repository, // WST
ssl_openssl, synapse_http_protocol, //SYNAPSE

    vim_proxy, vim; //From WSDL conversion

When I try to connect, I get an exception that says 'HTTP Request to https://192.168.0.170/sdk failed'

The log file on my ESXi 4.0 box shows:
err 'APP' ] SSLStreamImpl::DoServerHandshake (D24A4d8) SSL_accept failed with Unexpected EOF
warning 'Proxysvc'] SSL Handshake failed failed for stream TCP(local=192.168.0.197:47287, peer=192.168.0.170:443), error=SSL Exception: Unexpected EOF

Perhaps my client does not trust the SSL certificate? How can I tell? How can I change if it doesn't?

Here is my sample code:

procedure TMainForm.btnConnectClick(Sender: TObject);
var
   serviceInstance: ManagedObjectReference; //all invocations require this.
   vimPort: VimPortType;
   login: LoginRequestType;
   areLogin: LoginResponse;
begin
  //try
    memoResults.Append('Click!');
    SYNAPSE_RegisterHTTP_Transport();
    memoResults.Append('Synapse!');
    serviceInstance := ManagedObjectReference.Create();
    memoResults.Append('Service Instance Created.');
    vimPort :=
wst_CreateInstance_VimPortType('SOAP:','HTTP:',txtURL.Text);//();
    memoResults.Append('vimPort created.');
    login := LoginRequestType.Create();
    login.userName:=txtUser.Text;
    login.password:=txtPasswd.Text;
    memoResults.Append('procedure login');
    areLogin := vimPort.Login(login);
    memoResults.Append('Login.');
  //except
    if areLogin = nil then memoResults.Append('areLogin is NIL!');
    memoResults.Append('Not Good!');
  //end;
end;

Reply by email

Michael Joyner ᏩᏯ
to Michael Joyner ᏩᏯ
Michael Joyner ?? wrote
HTTPS connection, how to debug to determine what is going wrong?

It appears that the code to load the SSL and Crypto libraries is less than forgiving...

I had to put:

       DLLSSLName := '/lib/libssl.so.0.9.8';
       DLLUtilName := '/lib/libcrypto.so.0.9.8';

before:

    SYNAPSE_RegisterHTTP_Transport();

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091128/494303c7/attachment-0001.html>

Reply by email