Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2004-04-22 23:40:34 +0400
committerSebastien Pouliot <sebastien@ximian.com>2004-04-22 23:40:34 +0400
commit8cf50bf20491ef6dfc9a49bde6c63d5017d0d362 (patch)
tree8ba5ec18b581028e17d5ac444df1d5e59f54cc2e /mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm
parentc1b45e55404ccd4fb98c905d72db491b1944c04d (diff)
2004-04-22 Sebastien Pouliot <sebastien@ximian.com>
* ChallengeResponse.cs: FxCop-ized. * NtlmFlags.cs: FxCop-ized. CLS compliance. * Type1Message.cs: FxCop-ized. * Type3Message.cs: FxCop-ized. svn path=/trunk/mcs/; revision=25860
Diffstat (limited to 'mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm')
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs10
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChangeLog7
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs11
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs12
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs10
5 files changed, 32 insertions, 18 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
index 29e876890da..8e49d8d2eb0 100755
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
@@ -3,9 +3,10 @@
// Implements Challenge Response for NTLM v1
//
// Author:
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
//
// References
// a. NTLM Authentication Scheme for HTTP, Ronald Tschalär
@@ -15,6 +16,7 @@
//
using System;
+using System.Globalization;
using System.Security.Cryptography;
using System.Text;
@@ -59,6 +61,7 @@ namespace Mono.Security.Protocol.Ntlm {
// properties
public string Password {
+ get { return null; }
set {
if (_disposed)
throw new ObjectDisposedException ("too late");
@@ -103,6 +106,7 @@ namespace Mono.Security.Protocol.Ntlm {
}
public byte[] Challenge {
+ get { return null; }
set {
if (value == null)
throw new ArgumentNullException ("Challenge");
@@ -189,7 +193,7 @@ namespace Mono.Security.Protocol.Ntlm {
{
byte[] key7 = new byte [7];
int len = System.Math.Min (password.Length - position, 7);
- Encoding.ASCII.GetBytes (password.ToUpper (), position, len, key7, 0);
+ Encoding.ASCII.GetBytes (password.ToUpper (CultureInfo.CurrentCulture), position, len, key7, 0);
byte[] key8 = PrepareDESKey (key7, 0);
// cleanup intermediate key material
Array.Clear (key7, 0, key7.Length);
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChangeLog
index 0c00072b11d..38ef148489b 100755
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-22 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ChallengeResponse.cs: FxCop-ized.
+ * NtlmFlags.cs: FxCop-ized. CLS compliance.
+ * Type1Message.cs: FxCop-ized.
+ * Type3Message.cs: FxCop-ized.
+
2004-04-20 Sebastien Pouliot <sebastien@ximian.com>
* NtlmFlags.cs: Changed enum to int for CLS compliance.
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
index 60ae7af500b..c8002404167 100755
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
@@ -2,9 +2,10 @@
// Mono.Security.Protocol.Ntlm.NtlmFlags
//
// Author:
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
//
// References
// a. NTLM Authentication Scheme for HTTP, Ronald Tschalär
@@ -22,11 +23,11 @@ namespace Mono.Security.Protocol.Ntlm {
// The client sets this flag to indicate that it supports Unicode strings.
NegotiateUnicode = 0x00000001,
// This is set to indicate that the client supports OEM strings.
- NegotiateOEM = 0x00000002,
+ NegotiateOem = 0x00000002,
// This requests that the server send the authentication target with the Type 2 reply.
RequestTarget = 0x00000004,
// Indicates that NTLM authentication is supported.
- NegotiateNTLM = 0x00000200,
+ NegotiateNtlm = 0x00000200,
// When set, the client will send with the message the name of the domain in which the workstation has membership.
NegotiateDomainSupplied = 0x00001000,
// Indicates that the client is sending its workstation name with the message.
@@ -34,7 +35,7 @@ namespace Mono.Security.Protocol.Ntlm {
// Indicates that communication between the client and server after authentication should carry a "dummy" signature.
NegotiateAlwaysSign = 0x00008000,
// Indicates that this client supports the NTLM2 signing and sealing scheme; if negotiated, this can also affect the response calculations.
- NegotiateNTLM2Key = 0x00080000,
+ NegotiateNtlm2Key = 0x00080000,
// Indicates that this client supports strong (128-bit) encryption.
Negotiate128 = 0x20000000,
// Indicates that this client supports medium (56-bit) encryption.
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
index 3376456db17..a12fa7ab844 100755
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
@@ -2,9 +2,10 @@
// Mono.Security.Protocol.Ntlm.Type1Message - Negotiation
//
// Author:
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
//
// References
// a. NTLM Authentication Scheme for HTTP, Ronald Tschalär
@@ -14,14 +15,13 @@
//
using System;
+using System.Globalization;
using System.Text;
namespace Mono.Security.Protocol.Ntlm {
public class Type1Message : MessageBase {
- //static private byte[] header = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0xb2, 0x00, 0x00 };
-
private string _host;
private string _domain;
@@ -94,10 +94,10 @@ namespace Mono.Security.Protocol.Ntlm {
data [28] = 0x20;
data [29] = 0x00;
- byte[] host = Encoding.ASCII.GetBytes (_host.ToUpper ());
+ byte[] host = Encoding.ASCII.GetBytes (_host.ToUpper (CultureInfo.InvariantCulture));
Buffer.BlockCopy (host, 0, data, 32, host.Length);
- byte[] domain = Encoding.ASCII.GetBytes (_domain.ToUpper ());
+ byte[] domain = Encoding.ASCII.GetBytes (_domain.ToUpper (CultureInfo.InvariantCulture));
Buffer.BlockCopy (domain, 0, data, dom_off, domain.Length);
return data;
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
index 63fce061395..a37c5ffb36f 100755
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
@@ -2,9 +2,10 @@
// Mono.Security.Protocol.Ntlm.Type3Message - Authentication
//
// Author:
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// (C) 2004 Novell (http://www.novell.com)
//
// References
// a. NTLM Authentication Scheme for HTTP, Ronald Tschalär
@@ -14,6 +15,7 @@
//
using System;
+using System.Globalization;
using System.Text;
namespace Mono.Security.Protocol.Ntlm {
@@ -133,9 +135,9 @@ namespace Mono.Security.Protocol.Ntlm {
public override byte[] GetBytes ()
{
- byte[] domain = Encoding.Unicode.GetBytes (_domain.ToUpper ());
+ byte[] domain = Encoding.Unicode.GetBytes (_domain.ToUpper (CultureInfo.InvariantCulture));
byte[] user = Encoding.Unicode.GetBytes (_username);
- byte[] host = Encoding.Unicode.GetBytes (_host.ToUpper ());
+ byte[] host = Encoding.Unicode.GetBytes (_host.ToUpper (CultureInfo.InvariantCulture));
byte[] data = PrepareMessage (64 + domain.Length + user.Length + host.Length + 24 + 24);