NetTalk Central

Author Topic: netclient and NTLM authorization  (Read 13198 times)

davidgriffo

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
netclient and NTLM authorization
« on: July 10, 2011, 06:48:41 PM »
I had a clarion app running as a service successfully collecting data from a web service.

Then the web service provider put some security on the web service (a username and password)

This web service uses NTLM authorization. 

any tips on how to access this now?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: netclient and NTLM authorization
« Reply #1 on: July 11, 2011, 04:55:19 AM »
which build of NetTalk are you using?
I recently updated the user-agent field so it mimics Firefox rather than IE, which means the server may accept BASIC or DIGEST authentication (which are supported).

Cheers
Bruce

davidgriffo

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: netclient and NTLM authorization
« Reply #2 on: July 11, 2011, 03:12:28 PM »
which build of NetTalk are you using?



I am using 5.29
This can be a little bit confusing if you look at the top of the netall.inc

! NetTalk v5.28 - the premier TCP/IP solution. Copyright © 2000-2011 CapeSoft Software  - www.capesoft.com

! Generated by CapeSoft's Object Writer
! Version & Copyright Information

NETTALK:Version         equate ('5.29') ! Also remember to change the version in Object Writer!
NETTALK:EmailVersion    equate ('5.29')

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: netclient and NTLM authorization
« Reply #3 on: July 12, 2011, 01:15:45 AM »
yeah, I know. the
NETTALK:Version         equate ('5.29') ! Also remember to change the version in Object Writer!
NETTALK:EmailVersion    equate ('5.29')

ones are updated automatically, and are the "official" ones. I try and keep the others up to date as well, but occasionally they're out by one or two numbers.

The "official" place to look is on the global extension.

You can try using digest or basic authentication - but it may or may not work, depending on the server. If it doesn't work, then there's not a whole lot you can do I'm afraid.

If you need help with the authentication just let me know.

cheers
Bruce

davidgriffo

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: netclient and NTLM authorization
« Reply #4 on: July 12, 2011, 03:07:51 PM »
I have convinced the web service supplier to get a SSL cert.

I know that you have lots of examples with SSL but do you have ( or know of ) a web page with SSL that i can practice on?


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: netclient and NTLM authorization
« Reply #5 on: July 12, 2011, 11:13:16 PM »
Hi David,

Doing an SSL Client is really easy;
a) set the SSL Properties;
for example;
        ThisClient.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
        ThisClient.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
        ThisClient.SSLCertificateOptions.CARootFile = '.\CA_Roots.pem'


b) Make sure the SSL DLL's are in the app folder. (there are 4 DLL's)

libeay32.dll
libssl32.dll
msvcr71.dll
ssleay32.dll

c) make sure the ca_roots.pem file is in the app folder.
(you'll find that in the \demo\certificates folder)

Other than that your code remains exactly as it was. Oh, except your URL changes from http:// to https://

As for testing - I don't know of any SSL specific services off the top of my head - but I'm sure there are plenty you can use if you like. I think _perhaps_ the Weather example does an SSL Client? I can't remember offhand...


Aside - I'm not really sure how an SSL certificate is connected to the Server authentication - but I'll leave that in your hands <g>.