diff options
author | 6543 <6543@obermui.de> | 2020-10-15 21:27:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 15:27:33 -0400 |
commit | e374bb7e2dede03eeacaec376c8fbb3c05d07a25 (patch) | |
tree | d946047c3c62ee57be2ed13f0e0bebf5f19bc021 /vendor/github.com/Azure/go-ntlmssp/messageheader.go | |
parent | bcf45bb162e50554a09b9735cf966f8679595b09 (diff) | |
download | gitea-e374bb7e2dede03eeacaec376c8fbb3c05d07a25.tar.gz gitea-e374bb7e2dede03eeacaec376c8fbb3c05d07a25.zip |
[Vendor] Update go-ldap to v3.2.4 (#13163)
* [Vendor] update go-ldap to v3.0.3
* update go-ldap to v3.2.4
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'vendor/github.com/Azure/go-ntlmssp/messageheader.go')
-rw-r--r-- | vendor/github.com/Azure/go-ntlmssp/messageheader.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/github.com/Azure/go-ntlmssp/messageheader.go b/vendor/github.com/Azure/go-ntlmssp/messageheader.go new file mode 100644 index 0000000000..247e284652 --- /dev/null +++ b/vendor/github.com/Azure/go-ntlmssp/messageheader.go @@ -0,0 +1,21 @@ +package ntlmssp + +import ( + "bytes" +) + +var signature = [8]byte{'N', 'T', 'L', 'M', 'S', 'S', 'P', 0} + +type messageHeader struct { + Signature [8]byte + MessageType uint32 +} + +func (h messageHeader) IsValid() bool { + return bytes.Equal(h.Signature[:], signature[:]) && + h.MessageType > 0 && h.MessageType < 4 +} + +func newMessageHeader(messageType uint32) messageHeader { + return messageHeader{signature, messageType} +} |