FreeRDP
sspi_gss.h
1
22
#ifndef WINPR_SSPI_GSS_PRIVATE_H
23
#define WINPR_SSPI_GSS_PRIVATE_H
24
25
#include <winpr/sspi.h>
26
#include <winpr/asn1.h>
27
28
#ifdef WITH_KRB5_MIT
29
#include <krb5.h>
30
typedef
krb5_data
sspi_gss_data
;
31
#elif defined(WITH_KRB5_HEIMDAL)
32
#include <krb5.h>
33
typedef
krb5_data
sspi_gss_data
;
34
#else
35
typedef
struct
36
{
37
int32_t magic;
38
unsigned
int
length;
39
char
* data;
40
}
sspi_gss_data
;
41
#endif
42
43
#define SSPI_GSS_C_DELEG_FLAG 1
44
#define SSPI_GSS_C_MUTUAL_FLAG 2
45
#define SSPI_GSS_C_REPLAY_FLAG 4
46
#define SSPI_GSS_C_SEQUENCE_FLAG 8
47
#define SSPI_GSS_C_CONF_FLAG 16
48
#define SSPI_GSS_C_INTEG_FLAG 32
49
50
#define FLAG_SENDER_IS_ACCEPTOR 0x01
51
#define FLAG_WRAP_CONFIDENTIAL 0x02
52
#define FLAG_ACCEPTOR_SUBKEY 0x04
53
54
#define KG_USAGE_ACCEPTOR_SEAL 22
55
#define KG_USAGE_ACCEPTOR_SIGN 23
56
#define KG_USAGE_INITIATOR_SEAL 24
57
#define KG_USAGE_INITIATOR_SIGN 25
58
59
#define TOK_ID_AP_REQ 0x0100
60
#define TOK_ID_AP_REP 0x0200
61
#define TOK_ID_ERROR 0x0300
62
#define TOK_ID_TGT_REQ 0x0400
63
#define TOK_ID_TGT_REP 0x0401
64
65
#define TOK_ID_MIC 0x0404
66
#define TOK_ID_WRAP 0x0504
67
#define TOK_ID_MIC_V1 0x0101
68
#define TOK_ID_WRAP_V1 0x0201
69
70
#define GSS_CHECKSUM_TYPE 0x8003
71
72
static
INLINE BOOL sspi_gss_oid_compare(
const
WinPrAsn1_OID
* oid1,
const
WinPrAsn1_OID
* oid2)
73
{
74
WINPR_ASSERT(oid1);
75
WINPR_ASSERT(oid2);
76
77
return
(oid1->len == oid2->len) && (memcmp(oid1->data, oid2->data, oid1->len) == 0);
78
}
79
80
BOOL sspi_gss_wrap_token(
SecBuffer
* buf,
const
WinPrAsn1_OID
* oid, uint16_t tok_id,
81
const
sspi_gss_data
* token);
82
BOOL sspi_gss_unwrap_token(
const
SecBuffer
* buf,
WinPrAsn1_OID
* oid, uint16_t* tok_id,
83
sspi_gss_data
* token);
84
85
#endif
/* WINPR_SSPI_GSS_PRIVATE_H */
SecBuffer
Definition:
include/winpr/sspi.h:833
WinPrAsn1_MemoryChunk
Definition:
asn1.h:79
sspi_gss_data
Definition:
sspi_gss.h:36
winpr
libwinpr
sspi
sspi_gss.h
Generated by
1.9.1