2012-11-15 19:00:07 +04:00
|
|
|
/**
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
* NTLM over HTTP
|
|
|
|
*
|
|
|
|
* Copyright 2012 Fujitsu Technology Solutions GmbH
|
|
|
|
* Copyright 2012 Dmitrij Jasnov <dmitrij.jasnov@ts.fujitsu.com>
|
|
|
|
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#ifndef FREERDP_LIB_CORE_GATEWAY_NTLM_H
|
|
|
|
#define FREERDP_LIB_CORE_GATEWAY_NTLM_H
|
2012-11-15 19:00:07 +04:00
|
|
|
|
|
|
|
typedef struct rdp_ntlm rdpNtlm;
|
|
|
|
|
2018-09-28 13:29:29 +03:00
|
|
|
#include <winpr/wtypes.h>
|
2016-08-10 10:12:55 +03:00
|
|
|
#include <freerdp/api.h>
|
2013-03-22 00:45:25 +04:00
|
|
|
#include <winpr/sspi.h>
|
2012-11-15 19:00:07 +04:00
|
|
|
|
2018-09-28 13:29:29 +03:00
|
|
|
FREERDP_LOCAL rdpNtlm* ntlm_new(void);
|
|
|
|
FREERDP_LOCAL void ntlm_free(rdpNtlm* ntlm);
|
2012-11-15 19:00:07 +04:00
|
|
|
|
2018-11-12 18:29:28 +03:00
|
|
|
FREERDP_LOCAL BOOL ntlm_authenticate(rdpNtlm* ntlm, BOOL* pbContinueNeeded);
|
2012-11-15 19:00:07 +04:00
|
|
|
|
2016-08-10 10:12:55 +03:00
|
|
|
FREERDP_LOCAL BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality,
|
2018-09-28 13:29:29 +03:00
|
|
|
LPCTSTR user, LPCTSTR domain,
|
|
|
|
LPCTSTR password, SecPkgContext_Bindings* Bindings);
|
2012-11-15 19:00:07 +04:00
|
|
|
|
2016-08-10 10:12:55 +03:00
|
|
|
FREERDP_LOCAL BOOL ntlm_client_make_spn(rdpNtlm* ntlm, LPCTSTR ServiceClass,
|
2018-09-28 13:29:29 +03:00
|
|
|
LPCTSTR hostname);
|
2012-11-16 01:25:22 +04:00
|
|
|
|
2018-09-28 13:29:29 +03:00
|
|
|
FREERDP_LOCAL SSIZE_T ntlm_client_query_auth_size(rdpNtlm* ntlm);
|
|
|
|
FREERDP_LOCAL SSIZE_T ntlm_client_get_context_max_size(rdpNtlm* ntlm);
|
|
|
|
|
2018-10-09 15:16:27 +03:00
|
|
|
FREERDP_LOCAL BOOL ntlm_client_encrypt(rdpNtlm* ntlm, ULONG fQOP, SecBufferDesc* Message,
|
2018-09-28 13:29:29 +03:00
|
|
|
size_t sequence);
|
|
|
|
|
|
|
|
FREERDP_LOCAL BOOL ntlm_client_set_input_buffer(rdpNtlm* ntlm, BOOL copy, const void* data,
|
|
|
|
size_t size);
|
|
|
|
FREERDP_LOCAL const SecBuffer* ntlm_client_get_output_buffer(rdpNtlm* ntlm);
|
2012-11-15 19:00:07 +04:00
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#endif /* FREERDP_LIB_CORE_GATEWAY_NTLM_H */
|