Skip to content

Yet another "Client network socket disconnected before secure TLS connection was established". #404

Open
@4aiman

Description

@4aiman

Exchange 2013 (yes, in 2022)
NTLM-enabled server, no basic auth, no 0auth.

There HAS to be something I'm missing here:

// self-signed certificate
	process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

	let EWS = require ("ews-javascript-api");
	EWS.EwsLogging.DebugLogEnabled = true;
	
// I need NTLM, but WHICH ONE? None seem to work
	const { XhrApi, ntlmAuthXhrApi } = require ("@ewsjs/xhr");
	EWS.ConfigurationApi.SetXHROptions({rejectUnauthorized : false});

	let xhr = new XhrApi() 
	xhr.useNtlmAuthentication(cr.username, cr.password);	
	EWS.ConfigurationApi.ConfigureXHR(xhr);

	var service = await new EWS.ExchangeService(EWS.ExchangeVersion.Exchange2013);		
	service.Credentials = new EWS.WebCredentials("fake", "fake");
	service.Url = await new EWS.Uri(cr.url);

and then I do (in an async func, ofc)

console.log(await service.GetUserOofSettings(cr.username))

I can clearly see, that the NTLM kicks in, but fails mid-negotiation.

I'm 100% sure the server's fine, since I'm able to connect via cURL and get the data with the XML generated by this lib.
Any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions