[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NTLM Patch v1.2 - Experimental
Hi,
I released NTLM patch v1.2. Please notice that this patch is "experimental"
because I added three procedures to module NTTPXMLR4 in order to enable
eXpat for persistent connections. The procedures I added are:
http_parser_init()
http_parser_parseChunk()
http_parser_free()
@Scott: Please accept or reject these procedures when you feel better.
Now you can use these procedures to call web services over a persistent
connection as shown here (shortened EXAMPLE38):
// Open persistent connection
pComm = http_persist_open(URL);
// Set credentials
http_setauth(HTTP_AUTH_NTLM: user: password);
// Open output file
fd = open(IFS: O_WRONLY + O_TRUNC + O_CREAT + O_CCSID: 511: 819);
// Now call HTTPAPI's "GET" routine.
// It'll download the welcome page to the IFS.
rc = http_persist_get( pComm: URL: fd: %paddr('write'));
// Close output file
callp close(fd);
// Initialize XML parser
http_parser_init(*: *null: %paddr(EndOfElement): %addr(userData));
// Then call HTTPAPI's "POST" routine. Pass the above
// variables as parameters. It'll call the web service and
// parse the result.
URL = 'http://' + Job_getTcpIpAddr() + '/HelloWorld.asmx';
userData.srvType = 'good';
rc = http_persist_post( pComm: URL: 0: *null
: %addr(postData)+2: %len(postData)
: 0: %paddr(http_parser_parseChunk));
// Close http connection
http_persist_close(pComm);
Of course you do not need to download the welcome page each time you want
to call a web service. The example above just shows that you can mix GET
and POST operations.
You can download the patch from here:
http://www.tools400.de/Downloads/Freeware/Beta/httpapi_v1.25beta2_ntlm_patches_v1.2.zip
Feel free to send your comments to me.
The complete list of changes is:
Version 1.2 - 15.02.2013
------------------------
Added: Added the following procedures to HTTPXMLR4 in order to
be able to use the eXpat parser with persistent connections:
http_parser_init()
http_parser_parseChunk()
http_parser_free()
Changed: Restructured the program code to better match the pseudo
code given in document 'NT LAN Manager (NTLM) Authentication
Protocol Specification'.
Changed: Changed the LM compatibility modes to:
0 -- Sends NTLMv1 response. That may also include the weak
LM response.
1 -- Sends only the NTLM response. This is more secure than
Levels 0, because it eliminates the cryptographically
weak LM response.
2 -- Sends only the NTLM2 response.
3 -- Sends LMv2 and NTLMv2 data.
Changed: Added parameter 'peNTLM' to http_getauth().
Updated example programs to pass parameter 'isNtlm' to
http_getAuth().
Regards,
Thomas.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------