adding License information and go format
This commit is contained in:
parent
2eea5b495b
commit
8966f9d83d
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,5 @@
|
||||
<<<<<<< HEAD
|
||||
pkg/
|
||||
=======
|
||||
pkg
|
||||
>>>>>>> adding License information and go format
|
||||
|
53
License
Normal file
53
License
Normal file
@ -0,0 +1,53 @@
|
||||
Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
8
README
8
README
@ -1,5 +1,6 @@
|
||||
= NTLM Implementation for Go
|
||||
|
||||
|
||||
== Sample Usage as NTLM Client
|
||||
|
||||
import "ntlm"
|
||||
@ -39,4 +40,9 @@ Once a session is created you can generate the Mac for a message using:
|
||||
|
||||
message := "this is some message to sign"
|
||||
sequenceNumber := 100
|
||||
signature, err := session.Mac([]byte(message), sequenceNumber)
|
||||
signature, err := session.Mac([]byte(message), sequenceNumber)
|
||||
|
||||
|
||||
== License
|
||||
Copyright Thomson Reuters Global Resources 2013
|
||||
Apache License
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
@ -67,7 +68,7 @@ func rc4(cipher *rc4P.Cipher, ciphertext []byte) []byte {
|
||||
return result
|
||||
}
|
||||
|
||||
// Indicates the encryption of an 8-byte data item D with the 7-byte key K using the Data Encryption Standard (DES)
|
||||
// Indicates the encryption of an 8-byte data item D with the 7-byte key K using the Data Encryption Standard (DES)
|
||||
// algorithm in Electronic Codebook (ECB) mode. The result is 8 bytes in length ([FIPS46-2]).
|
||||
func des(key []byte, ciphertext []byte) ([]byte, error) {
|
||||
calcKey := createDesKey(key)
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
@ -25,7 +26,7 @@ func ReadNtlmV1Response(bytes []byte) (*NtlmV1Response, error) {
|
||||
}
|
||||
|
||||
// *** NTLMv2
|
||||
// The NTLMv2_CLIENT_CHALLENGE structure defines the client challenge in the AUTHENTICATE_MESSAGE.
|
||||
// The NTLMv2_CLIENT_CHALLENGE structure defines the client challenge in the AUTHENTICATE_MESSAGE.
|
||||
// This structure is used only when NTLM v2 authentication is configured.
|
||||
type NtlmV2ClientChallenge struct {
|
||||
// An 8-bit unsigned char that contains the current version of the challenge response type.
|
||||
@ -66,7 +67,7 @@ type NtlmV2Response struct {
|
||||
// A 16-byte array of unsigned char that contains the client's NT challenge- response as defined in section 3.3.2.
|
||||
// Response corresponds to the NTProofStr variable from section 3.3.2.
|
||||
Response []byte
|
||||
// A variable-length byte array that contains the ClientChallenge as defined in section 3.3.2.
|
||||
// A variable-length byte array that contains the ClientChallenge as defined in section 3.3.2.
|
||||
// ChallengeFromClient corresponds to the temp variable from section 3.3.2.
|
||||
NtlmV2ClientChallenge *NtlmV2ClientChallenge
|
||||
}
|
||||
@ -124,9 +125,9 @@ func (l *LmV1Response) String() string {
|
||||
|
||||
// *** LMv2
|
||||
type LmV2Response struct {
|
||||
// A 16-byte array of unsigned char that contains the client's LM challenge-response.
|
||||
// A 16-byte array of unsigned char that contains the client's LM challenge-response.
|
||||
// This is the portion of the LmChallengeResponse field to which the HMAC_MD5 algorithm
|
||||
/// has been applied, as defined in section 3.3.2. Specifically, Response corresponds
|
||||
/// has been applied, as defined in section 3.3.2. Specifically, Response corresponds
|
||||
// to the result of applying the HMAC_MD5 algorithm, using the key ResponseKeyLM, to a
|
||||
// message consisting of the concatenation of the ResponseKeyLM, ServerChallenge and ClientChallenge.
|
||||
Response []byte
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
type Negotiate struct {
|
||||
@ -11,11 +12,11 @@ type Negotiate struct {
|
||||
// negotiate flags - 4bytes
|
||||
NegotiateFlags uint32
|
||||
// If the NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED flag is not set in NegotiateFlags,
|
||||
// indicating that no DomainName is supplied in Payload - then this should have Len 0 / MaxLen 0
|
||||
// indicating that no DomainName is supplied in Payload - then this should have Len 0 / MaxLen 0
|
||||
// this contains a domain name
|
||||
DomainNameFields *PayloadStruct
|
||||
// If the NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED flag is not set in NegotiateFlags,
|
||||
// indicating that no WorkstationName is supplied in Payload - then this should have Len 0 / MaxLen 0
|
||||
// If the NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED flag is not set in NegotiateFlags,
|
||||
// indicating that no WorkstationName is supplied in Payload - then this should have Len 0 / MaxLen 0
|
||||
WorkstationFields *PayloadStruct
|
||||
// version - 8 bytes
|
||||
Version *VersionStruct
|
||||
|
@ -1,7 +1,8 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
// During NTLM authentication, each of the following flags is a possible value of the NegotiateFlags field of the NEGOTIATE_MESSAGE,
|
||||
// CHALLENGE_MESSAGE, and AUTHENTICATE_MESSAGE, unless otherwise noted. These flags define client or server NTLM capabilities
|
||||
// During NTLM authentication, each of the following flags is a possible value of the NegotiateFlags field of the NEGOTIATE_MESSAGE,
|
||||
// CHALLENGE_MESSAGE, and AUTHENTICATE_MESSAGE, unless otherwise noted. These flags define client or server NTLM capabilities
|
||||
// ssupported by the sender.
|
||||
|
||||
import (
|
||||
@ -19,7 +20,7 @@ const (
|
||||
NTLM_NEGOTIATE_OEM
|
||||
// The A and B bits are evaluated together as follows:
|
||||
// A==1: The choice of character set encoding MUST be Unicode.
|
||||
// A==0 and B==1: The choice of character set encoding MUST be OEM.
|
||||
// A==0 and B==1: The choice of character set encoding MUST be OEM.
|
||||
// A==0 and B==0: The protocol MUST return SEC_E_INVALID_TOKEN.
|
||||
// C (1 bit): If set, a TargetName field of the CHALLENGE_MESSAGE (section 2.2.1.2) MUST be supplied. An alternate name for this field is NTLMSSP_REQUEST_TARGET.
|
||||
NTLMSSP_REQUEST_TARGET
|
||||
@ -29,9 +30,9 @@ const (
|
||||
// in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_SIGN to the client in the CHALLENGE_MESSAGE. An alternate name
|
||||
// for this field is NTLMSSP_NEGOTIATE_SIGN.
|
||||
NTLMSSP_NEGOTIATE_SIGN
|
||||
// E (1 bit): If set, requests session key negotiation for message confidentiality. If the client sends NTLMSSP_NEGOTIATE_SEAL
|
||||
// to the server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_SEAL to the client in the CHALLENGE_MESSAGE.
|
||||
// Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD always set NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128,
|
||||
// E (1 bit): If set, requests session key negotiation for message confidentiality. If the client sends NTLMSSP_NEGOTIATE_SEAL
|
||||
// to the server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_SEAL to the client in the CHALLENGE_MESSAGE.
|
||||
// Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD always set NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128,
|
||||
// if they are supported. An alternate name for this field is NTLMSSP_NEGOTIATE_SEAL.
|
||||
NTLMSSP_NEGOTIATE_SEAL
|
||||
// F (1 bit): If set, requests connectionless authentication. If NTLMSSP_NEGOTIATE_DATAGRAM is set, then NTLMSSP_NEGOTIATE_KEY_EXCH
|
||||
@ -39,7 +40,7 @@ const (
|
||||
// this field is NTLMSSP_NEGOTIATE_DATAGRAM.
|
||||
NTLMSSP_NEGOTIATE_DATAGRAM
|
||||
// G (1 bit): If set, requests LAN Manager (LM) session key computation. NTLMSSP_NEGOTIATE_LM_KEY and NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
|
||||
// are mutually exclusive. If both NTLMSSP_NEGOTIATE_LM_KEY and NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are requested,
|
||||
// are mutually exclusive. If both NTLMSSP_NEGOTIATE_LM_KEY and NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are requested,
|
||||
// NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY alone MUST be returned to the client. NTLM v2 authentication session key generation
|
||||
// MUST be supported by both the client and the DC in order to be used, and extended session security signing and sealing requires
|
||||
// support from the client and the server to be used. An alternate name for this field is NTLMSSP_NEGOTIATE_LM_KEY.
|
||||
@ -55,13 +56,13 @@ const (
|
||||
NTLMSSP_ANONYMOUS
|
||||
// K (1 bit): If set, the domain name is provided (section 2.2.1.1).<25> An alternate name for this field is NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED.
|
||||
NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED
|
||||
// L (1 bit): This flag indicates whether the Workstation field is present. If this flag is not set, the Workstation field
|
||||
// L (1 bit): This flag indicates whether the Workstation field is present. If this flag is not set, the Workstation field
|
||||
// MUST be ignored. If this flag is set, the length field of the Workstation field specifies whether the workstation name
|
||||
// is nonempty or not.<24> An alternate name for this field is NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED.
|
||||
NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED
|
||||
// r7 (1 bit): This bit is unused and MUST be zero.
|
||||
NTLMSSP_R7
|
||||
// M (1 bit): If set, requests the presence of a signature block on all messages. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be
|
||||
// M (1 bit): If set, requests the presence of a signature block on all messages. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be
|
||||
// set in the NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client. NTLMSSP_NEGOTIATE_ALWAYS_SIGN is
|
||||
// overridden by NTLMSSP_NEGOTIATE_SIGN and NTLMSSP_NEGOTIATE_SEAL, if they are supported. An alternate name for this field
|
||||
// is NTLMSSP_NEGOTIATE_ALWAYS_SIGN.
|
||||
@ -71,13 +72,13 @@ const (
|
||||
// in the NEGOTIATE_MESSAGE and the AUTHENTICATE_MESSAGE. An alternate name for this field is NTLMSSP_TARGET_TYPE_DOMAIN.
|
||||
NTLMSSP_TARGET_TYPE_DOMAIN
|
||||
// O (1 bit): If set, TargetName MUST be a server name. The data corresponding to this flag is provided by the server in the
|
||||
// TargetName field of the CHALLENGE_MESSAGE. If this bit is set, then NTLMSSP_TARGET_TYPE_DOMAIN MUST NOT be set. This flag MUST
|
||||
// TargetName field of the CHALLENGE_MESSAGE. If this bit is set, then NTLMSSP_TARGET_TYPE_DOMAIN MUST NOT be set. This flag MUST
|
||||
// be ignored in the NEGOTIATE_MESSAGE and the AUTHENTICATE_MESSAGE. An alternate name for this field is NTLMSSP_TARGET_TYPE_SERVER.
|
||||
NTLMSSP_TARGET_TYPE_SERVER
|
||||
// r6 (1 bit): This bit is unused and MUST be zero.
|
||||
NTLMSSP_R6
|
||||
// P (1 bit): If set, requests usage of the NTLM v2 session security. NTLM v2 session security is a misnomer because it is not
|
||||
// NTLM v2. It is NTLM v1 using the extended session security that is also in NTLM v2. NTLMSSP_NEGOTIATE_LM_KEY and
|
||||
// NTLM v2. It is NTLM v1 using the extended session security that is also in NTLM v2. NTLMSSP_NEGOTIATE_LM_KEY and
|
||||
// NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are mutually exclusive. If both NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY and
|
||||
// NTLMSSP_NEGOTIATE_LM_KEY are requested, NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY alone MUST be returned to the client.
|
||||
// NTLM v2 authentication session key generation MUST be supported by both the client and the DC in order to be used, and extended
|
||||
@ -90,7 +91,7 @@ const (
|
||||
NTLMSSP_R5
|
||||
// R (1 bit): If set, requests the usage of the LMOWF (section 3.3). An alternate name for this field is NTLMSSP_REQUEST_NON_NT_SESSION_KEY.
|
||||
NTLMSSP_REQUEST_NON_NT_SESSION_KEY
|
||||
// S (1 bit): If set, indicates that the TargetInfo fields in the CHALLENGE_MESSAGE (section 2.2.1.2) are populated. An alternate
|
||||
// S (1 bit): If set, indicates that the TargetInfo fields in the CHALLENGE_MESSAGE (section 2.2.1.2) are populated. An alternate
|
||||
// name for this field is NTLMSSP_NEGOTIATE_TARGET_INFO.
|
||||
NTLMSSP_NEGOTIATE_TARGET_INFO
|
||||
// r4 (1 bit): This bit is unused and MUST be zero.
|
||||
@ -106,17 +107,17 @@ const (
|
||||
NTLMSSP_R1
|
||||
// U (1 bit): If set, requests 128-bit session key negotiation. An alternate name for this field is NTLMSSP_NEGOTIATE_128. If the client
|
||||
// sends NTLMSSP_NEGOTIATE_128 to the server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_128 to the client in the
|
||||
// CHALLENGE_MESSAGE only if the client sets NTLMSSP_NEGOTIATE_SEAL or NTLMSSP_NEGOTIATE_SIGN. Otherwise it is ignored. If both
|
||||
// NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 are requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and
|
||||
// NTLMSSP_NEGOTIATE_128 will both be returned to the client. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD set
|
||||
// CHALLENGE_MESSAGE only if the client sets NTLMSSP_NEGOTIATE_SEAL or NTLMSSP_NEGOTIATE_SIGN. Otherwise it is ignored. If both
|
||||
// NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 are requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and
|
||||
// NTLMSSP_NEGOTIATE_128 will both be returned to the client. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD set
|
||||
// NTLMSSP_NEGOTIATE_128 if it is supported. An alternate name for this field is NTLMSSP_NEGOTIATE_128.<21>
|
||||
NTLMSSP_NEGOTIATE_128
|
||||
// V (1 bit): If set, requests an explicit key exchange. This capability SHOULD be used because it improves security for message integrity or
|
||||
// confidentiality. See sections 3.2.5.1.2, 3.2.5.2.1, and 3.2.5.2.2 for details. An alternate name for this field is NTLMSSP_NEGOTIATE_KEY_EXCH.
|
||||
NTLMSSP_NEGOTIATE_KEY_EXCH
|
||||
// If set, requests 56-bit encryption. If the client sends NTLMSSP_NEGOTIATE_SEAL or NTLMSSP_NEGOTIATE_SIGN with NTLMSSP_NEGOTIATE_56 to the
|
||||
// If set, requests 56-bit encryption. If the client sends NTLMSSP_NEGOTIATE_SEAL or NTLMSSP_NEGOTIATE_SIGN with NTLMSSP_NEGOTIATE_56 to the
|
||||
// server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_56 to the client in the CHALLENGE_MESSAGE. Otherwise it is ignored.
|
||||
// If both NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 are requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and
|
||||
// If both NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 are requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and
|
||||
// NTLMSSP_NEGOTIATE_128 will both be returned to the client. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD set NTLMSSP_NEGOTIATE_56
|
||||
// if it is supported. An alternate name for this field is NTLMSSP_NEGOTIATE_56.
|
||||
NTLMSSP_NEGOTIATE_56
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
// Package NTLM implements the interfaces used for interacting with NTLMv1 and NTLMv2.
|
||||
// To create NTLM v1 or v2 sessions you would use CreateClientSession and create ClientServerSession.
|
||||
package ntlm
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
// Receve an Authenticate message and authenticate the user
|
||||
package ntlm
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
// Receve an Authenticate message and authenticate the user
|
||||
package ntlm
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
|
Loading…
x
Reference in New Issue
Block a user