Skip to content

Commit 62faaf7

Browse files
MZimmermann_cpMZimmermann_cp
authored andcommitted
reformated loglines and added more details to logs
1 parent d33e306 commit 62faaf7

11 files changed

Lines changed: 1281 additions & 1390 deletions

File tree

trunk/Class Library/ActiveUp.Net.Common/DomainKeys.Signature.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
namespace ActiveUp.Net.Security
2626
{
2727
#if !PocketPC
28-
[System.Serializable]
28+
[Serializable]
2929
#endif
3030
public class Signature
3131
{
@@ -35,7 +35,7 @@ private Signature()
3535
}
3636
public Signature(Message signedMessage)
3737
{
38-
this._signedMessage = signedMessage;
38+
_signedMessage = signedMessage;
3939
}
4040
public static Signature Parse(string input)
4141
{
@@ -46,7 +46,7 @@ public static Signature Parse(string input, Message signedMessage)
4646
Signature signature = signedMessage != null ? new Signature(signedMessage) : new Signature();
4747

4848
MatchCollection matches = Regex.Matches(input, @"[a-zA-Z]+=[^;]+(?=(;|\Z))");
49-
ActiveUp.Net.Mail.Logger.AddEntry(matches.Count.ToString());
49+
Logger.AddEntry(typeof(Signature), matches.Count.ToString());
5050
foreach (Match m in matches)
5151
{
5252
string tag = m.Value.Substring(0,m.Value.IndexOf('='));
@@ -167,18 +167,18 @@ public static bool Verify(byte[] emailData, Signature signature)
167167
}*/
168168
public PublicKeyRecord GetPublicKeyRecord()
169169
{
170-
byte[] data = Validator.GetTxtRecords(this.Selector+"._domainkey."+this.Domain);
170+
byte[] data = Validator.GetTxtRecords(Selector + "._domainkey." + Domain);
171171
return PublicKeyRecord.Parse(Encoding.ASCII.GetString(data,0,data.Length));
172172
}
173173
public SendingDomainPolicy GetSendingDomainPolicy()
174174
{
175-
byte[] data = Validator.GetTxtRecords("._domainkey." + this.Domain);
175+
byte[] data = Validator.GetTxtRecords("._domainkey." + Domain);
176176
return SendingDomainPolicy.Parse(Encoding.ASCII.GetString(data,0,data.Length));
177177
}
178178
public bool Verify()
179179
{
180-
if (this._signedMessage == null) throw new NotSupportedException("The signature must me associated with a message in order to be verified");
181-
return Verify(this._signedMessage.OriginalData, this._signedMessage.Signatures.DomainKeys);
180+
if (_signedMessage == null) throw new NotSupportedException("The signature must me associated with a message in order to be verified");
181+
return Verify(_signedMessage.OriginalData, _signedMessage.Signatures.DomainKeys);
182182
}
183183
private static void FillRSAPublicKeyParameters(byte[] key, ref RSAParameters param)
184184
{
@@ -304,43 +304,43 @@ private static void CopyContent(byte[] source, ref int startIndex, ref byte[] de
304304

305305
public string Algorithm
306306
{
307-
get { return this._a; }
308-
set { this._a = value; }
307+
get { return _a; }
308+
set { _a = value; }
309309
}
310310
public byte[] Data
311311
{
312-
get { return this._b; }
313-
set { this._b = value; }
312+
get { return _b; }
313+
set { _b = value; }
314314
}
315315
public string DataBase64
316316
{
317-
get { return this._b64; }
318-
set { this._b64 = value; }
317+
get { return _b64; }
318+
set { _b64 = value; }
319319
}
320320
public CanonicalizationAlgorithm CanonicalizationAlgorithm
321321
{
322-
get { return this._c; }
323-
set { this._c = value; }
322+
get { return _c; }
323+
set { _c = value; }
324324
}
325325
public QueryMethod QueryMethod
326326
{
327-
get { return this._q; }
328-
set { this._q = value; }
327+
get { return _q; }
328+
set { _q = value; }
329329
}
330330
public string[] SignedHeaders
331331
{
332-
get { return this._h; }
333-
set { this._h = value; }
332+
get { return _h; }
333+
set { _h = value; }
334334
}
335335
public string Domain
336336
{
337-
get { return this._d; }
338-
set { this._d = value; }
337+
get { return _d; }
338+
set { _d = value; }
339339
}
340340
public string Selector
341341
{
342-
get { return this._s; }
343-
set { this._s = value; }
342+
get { return _s; }
343+
set { _s = value; }
344344
}
345345
}
346346
}

0 commit comments

Comments
 (0)