FreeRDP
Loading...
Searching...
No Matches
libwinpr/sspi/CredSSP/credssp.h
1
19
20#ifndef WINPR_SSPI_CREDSSP_PRIVATE_H
21#define WINPR_SSPI_CREDSSP_PRIVATE_H
22
23#include <winpr/sspi.h>
24
25#include "../sspi.h"
26
27typedef enum
28{
29 CREDSSP_STATE_NEGO = 0, /* exchanging the inner Negotiate (Kerberos/NTLM) tokens */
30 CREDSSP_STATE_PUBKEY, /* sent pubKeyAuth, waiting for the server's response */
31 CREDSSP_STATE_DONE /* sent the encrypted TSCredentials */
32} CREDSSP_STATE;
33
34typedef struct
35{
36 PSecurityFunctionTableW nego; /* the WinPR Negotiate package */
37 CredHandle negoCred;
38 BOOL haveNegoCred;
39 DWORD flags; /* CREDSSP_FLAG_REDIRECT for Remote Credential Guard */
41 BOOL haveIdentity;
43
44typedef struct
45{
46 BOOL server;
47 PSecurityFunctionTableW nego;
48 CtxtHandle negoCtx;
49 BOOL haveNegoCtx;
51 BOOL haveSizes;
52 SEC_WCHAR* targetName;
53 CREDSSP_STATE state;
54 DWORD flags;
55 UINT32 version; /* CredSSP version we negotiate (6) */
56 UINT32 peerVersion; /* 0 until the first server TSRequest */
57 ULONG sendSeqNum;
58 ULONG recvSeqNum;
59 SecBuffer publicKey; /* the server SubjectPublicKey, from the input READONLY|TOKEN buffer */
60 SecBuffer clientNonce; /* 32 random bytes, sent in clientNonce[5] */
62 BOOL haveIdentity;
64
65CREDSSP_CONTEXT* credssp_ContextNew(void);
66void credssp_ContextFree(CREDSSP_CONTEXT* context);
67
68extern const SecPkgInfoA CREDSSP_SecPkgInfoA;
69extern const SecPkgInfoW CREDSSP_SecPkgInfoW;
70extern const SecurityFunctionTableA CREDSSP_SecurityFunctionTableA;
71extern const SecurityFunctionTableW CREDSSP_SecurityFunctionTableW;
72
73BOOL CREDSSP_init(void);
74
75#endif /* WINPR_SSPI_CREDSSP_PRIVATE_H */