~ubuntu-branches/ubuntu/vivid/freerdp/vivid

« back to all changes in this revision

Viewing changes to libfreerdp/core/gateway/ntlm.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-11-11 12:20:50 UTC
  • mfrom: (1.1.9) (9.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20141111122050-wyr8hrnwco9fcmum
Tags: 1.1.0~git20140921.1.440916e+dfsg1-2ubuntu1
* Merge with Debian unstable, remaining changes
  - Disable ffmpeg support
* Disable gstreamer support, this relies on gstreamer 0.10 and we don't want
  to add any more deps on that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * FreeRDP: A Remote Desktop Protocol Implementation
 
3
 * NTLM over HTTP
 
4
 *
 
5
 * Copyright 2012 Fujitsu Technology Solutions GmbH
 
6
 * Copyright 2012 Dmitrij Jasnov <dmitrij.jasnov@ts.fujitsu.com>
 
7
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
 
8
 *
 
9
 * Licensed under the Apache License, Version 2.0 (the "License");
 
10
 * you may not use this file except in compliance with the License.
 
11
 * You may obtain a copy of the License at
 
12
 *
 
13
 *     http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 * Unless required by applicable law or agreed to in writing, software
 
16
 * distributed under the License is distributed on an "AS IS" BASIS,
 
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
18
 * See the License for the specific language governing permissions and
 
19
 * limitations under the License.
 
20
 */
 
21
 
 
22
#ifndef FREERDP_CORE_NTLM_H
 
23
#define FREERDP_CORE_NTLM_H
 
24
 
 
25
typedef struct rdp_ntlm rdpNtlm;
 
26
typedef struct rdp_ntlm_http rdpNtlmHttp;
 
27
 
 
28
#include "../tcp.h"
 
29
#include "../transport.h"
 
30
 
 
31
#include "rts.h"
 
32
#include "http.h"
 
33
 
 
34
#include <time.h>
 
35
#include <winpr/sspi.h>
 
36
#include <freerdp/types.h>
 
37
#include <freerdp/settings.h>
 
38
#include <freerdp/crypto/tls.h>
 
39
#include <freerdp/crypto/crypto.h>
 
40
#include <freerdp/utils/debug.h>
 
41
 
 
42
#include <winpr/sspi.h>
 
43
#include <winpr/print.h>
 
44
#include <winpr/stream.h>
 
45
 
 
46
struct rdp_ntlm
 
47
{
 
48
        BOOL http;
 
49
        CtxtHandle context;
 
50
        ULONG cbMaxToken;
 
51
        ULONG fContextReq;
 
52
        ULONG pfContextAttr;
 
53
        TimeStamp expiration;
 
54
        PSecBuffer pBuffer;
 
55
        SecBuffer inputBuffer[2];
 
56
        SecBuffer outputBuffer[2];
 
57
        BOOL haveContext;
 
58
        BOOL haveInputBuffer;
 
59
        LPTSTR ServicePrincipalName;
 
60
        SecBufferDesc inputBufferDesc;
 
61
        SecBufferDesc outputBufferDesc;
 
62
        CredHandle credentials;
 
63
        BOOL confidentiality;
 
64
        SecPkgInfo* pPackageInfo;
 
65
        SecurityFunctionTable* table;
 
66
        SEC_WINNT_AUTH_IDENTITY identity;
 
67
        SecPkgContext_Sizes ContextSizes;
 
68
        SecPkgContext_Bindings* Bindings;
 
69
};
 
70
 
 
71
struct rdp_ntlm_http
 
72
{
 
73
        rdpNtlm* ntlm;
 
74
        HttpContext* context;
 
75
};
 
76
 
 
77
BOOL ntlm_authenticate(rdpNtlm* ntlm);
 
78
 
 
79
BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality, char* user,
 
80
                char* domain, char* password, SecPkgContext_Bindings* Bindings);
 
81
void ntlm_client_uninit(rdpNtlm* ntlm);
 
82
 
 
83
BOOL ntlm_client_make_spn(rdpNtlm* ntlm, LPCTSTR ServiceClass, char* hostname);
 
84
 
 
85
rdpNtlm* ntlm_new(void);
 
86
void ntlm_free(rdpNtlm* ntlm);
 
87
 
 
88
#endif /* FREERDP_CORE_NTLM_H */