2016-04-21 19:48:57 -04:00
|
|
|
package ntlmssp
|
|
|
|
|
|
|
|
type negotiateFlags uint32
|
|
|
|
|
|
|
|
const (
|
|
|
|
/*A*/ negotiateFlagNTLMSSPNEGOTIATEUNICODE negotiateFlags = 1 << 0
|
|
|
|
/*B*/ negotiateFlagNTLMNEGOTIATEOEM = 1 << 1
|
|
|
|
/*C*/ negotiateFlagNTLMSSPREQUESTTARGET = 1 << 2
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*D*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATESIGN = 1 << 4
|
2016-04-21 19:48:57 -04:00
|
|
|
/*E*/ negotiateFlagNTLMSSPNEGOTIATESEAL = 1 << 5
|
|
|
|
/*F*/ negotiateFlagNTLMSSPNEGOTIATEDATAGRAM = 1 << 6
|
|
|
|
/*G*/ negotiateFlagNTLMSSPNEGOTIATELMKEY = 1 << 7
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*H*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATENTLM = 1 << 9
|
2016-04-21 19:48:57 -04:00
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*J*/
|
|
|
|
negotiateFlagANONYMOUS = 1 << 11
|
2016-04-21 19:48:57 -04:00
|
|
|
/*K*/ negotiateFlagNTLMSSPNEGOTIATEOEMDOMAINSUPPLIED = 1 << 12
|
|
|
|
/*L*/ negotiateFlagNTLMSSPNEGOTIATEOEMWORKSTATIONSUPPLIED = 1 << 13
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*M*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATEALWAYSSIGN = 1 << 15
|
2016-04-21 19:48:57 -04:00
|
|
|
/*N*/ negotiateFlagNTLMSSPTARGETTYPEDOMAIN = 1 << 16
|
|
|
|
/*O*/ negotiateFlagNTLMSSPTARGETTYPESERVER = 1 << 17
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*P*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATEEXTENDEDSESSIONSECURITY = 1 << 19
|
2016-04-21 19:48:57 -04:00
|
|
|
/*Q*/ negotiateFlagNTLMSSPNEGOTIATEIDENTIFY = 1 << 20
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*R*/
|
|
|
|
negotiateFlagNTLMSSPREQUESTNONNTSESSIONKEY = 1 << 22
|
2016-04-21 19:48:57 -04:00
|
|
|
/*S*/ negotiateFlagNTLMSSPNEGOTIATETARGETINFO = 1 << 23
|
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*T*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATEVERSION = 1 << 25
|
2016-04-21 19:48:57 -04:00
|
|
|
|
2018-10-05 00:33:57 -04:00
|
|
|
/*U*/
|
|
|
|
negotiateFlagNTLMSSPNEGOTIATE128 = 1 << 29
|
2016-04-21 19:48:57 -04:00
|
|
|
/*V*/ negotiateFlagNTLMSSPNEGOTIATEKEYEXCH = 1 << 30
|
|
|
|
/*W*/ negotiateFlagNTLMSSPNEGOTIATE56 = 1 << 31
|
|
|
|
)
|
|
|
|
|
|
|
|
func (field negotiateFlags) Has(flags negotiateFlags) bool {
|
|
|
|
return field&flags == flags
|
|
|
|
}
|
|
|
|
|
|
|
|
func (field *negotiateFlags) Unset(flags negotiateFlags) {
|
|
|
|
*field = *field ^ (*field & flags)
|
|
|
|
}
|