Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: net/http/ntlm_message.h

Issue 2879353002: Add a buffer reader/writer for NTLM. (Closed)
Patch Set: Add a buffer reader/writer for NTLM. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/ntlm_message.h
diff --git a/net/http/ntlm_message.h b/net/http/ntlm_message.h
new file mode 100644
index 0000000000000000000000000000000000000000..376582a1ed7aa28c6a3188e2caed5dd05064bd39
--- /dev/null
+++ b/net/http/ntlm_message.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_BASE_NTLM_MESSAGE_H_
+#define NET_BASE_NTLM_MESSAGE_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+// Contains consts and enums for various fields
+// in the NTLM protocol.
+class NET_EXPORT NtlmMessage {
Ryan Sleevi 2017/05/30 19:02:23 see https://google.github.io/styleguide/cppguide.h
zentaro 2017/06/05 17:28:45 Done.
+ private:
+ NtlmMessage();
+ ~NtlmMessage();
+
+ public:
+ static const uint8_t SIGNATURE[];
+ static const size_t SIGNATURE_LEN;
+ static const size_t SECURITY_BUFFER_LEN;
+ static const size_t NEGOTIATE_MESSAGE_LEN;
+ static const size_t RESPONSE_V1_LEN;
+ static const size_t CHALLENGE_LEN;
+ static const size_t NTLM_HASH_LEN;
+
+ enum NtlmVersion {
+ VERSION_NTLM_V1 = 0x01,
+ VERSION_NTLM_V2 = 0x02,
+ };
+
+ enum MessageType {
+ MESSAGE_NEGOTIATE = 0x01,
+ MESSAGE_CHALLENGE = 0x02,
+ MESSAGE_AUTHENTICATE = 0x03,
+ };
+
+ // Defined in NTLMSSP Spec 2.2.2.5
+ // Only the used subset is defined.
+ enum NegotiateFlags {
+ NTLMSSP_NEGOTIATE_UNICODE = 0x01,
+ NTLMSSP_NEGOTIATE_OEM = 0x02,
+ NTLMSSP_REQUEST_TARGET = 0x04,
+ NTLMSSP_NEGOTIATE_NTLM = 0x200,
+ NTLMSSP_NEGOTIATE_ALWAYS_SIGN = 0x8000,
+ NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY = 0x80000,
+ };
+
+ static const uint32_t NEGOTIATE_MESSAGE_FLAGS;
+};
+
+} // namespace net
+
+#endif // NET_BASE_NTLM_MESSAGE_H_
« net/http/ntlm_client.h ('K') | « net/http/ntlm_client.cc ('k') | net/http/ntlm_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698