Skip to content

Commit

Permalink
Fixed simple mistakes and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
DamirAinullin committed Feb 24, 2018
1 parent 11a8609 commit 2b58041
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Nancy/Cryptography/AesEncryptionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public string Decrypt(string data)
{
return String.Empty;
}
throw ex;
throw;
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/Nancy/Cryptography/DefaultHmacProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ public byte[] GenerateHmac(string data)
/// <returns>Hmac bytes</returns>
public byte[] GenerateHmac(byte[] data)
{
var hmacGenerator = new HMACSHA256(this.key);

return hmacGenerator.ComputeHash(data);
using (var hmacGenerator = new HMACSHA256(this.key))
{
return hmacGenerator.ComputeHash(data);
}
}
}
}
}
3 changes: 1 addition & 2 deletions src/Nancy/Owin/NancyMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public static MidFunc UseNancy(NancyOptions options = null)
X509Certificate2 certificate = null;
if (options.EnableClientCertificates)
{
var clientCertificate = new X509Certificate2(Get<X509Certificate>(environment, "ssl.ClientCertificate").Export(X509ContentType.Cert));
certificate = clientCertificate ?? null;
certificate = new X509Certificate2(Get<X509Certificate>(environment, "ssl.ClientCertificate").Export(X509ContentType.Cert));
}
var serverClientIp = Get<string>(environment, "server.RemoteIpAddress");
Expand Down

0 comments on commit 2b58041

Please sign in to comment.