Skip to content

Commit

Permalink
Workaround for "VerificationException: this operation could destabili…
Browse files Browse the repository at this point in the history
…ze the runtime" that occurs on some servers sometimes.
  • Loading branch information
AArnott committed Aug 5, 2009
1 parent 469553a commit d5efcec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs
Expand Up @@ -21,12 +21,12 @@ internal class DiffieHellmanUtilities {
/// <summary>
/// An array of known Diffie Hellman sessions, sorted by decreasing hash size.
/// </summary>
private static DHSha[] diffieHellmanSessionTypes = {
private static DHSha[] diffieHellmanSessionTypes = new List<DHSha> {
new DHSha(new SHA512Managed(), protocol => protocol.Args.SessionType.DH_SHA512),
new DHSha(new SHA384Managed(), protocol => protocol.Args.SessionType.DH_SHA384),
new DHSha(new SHA256Managed(), protocol => protocol.Args.SessionType.DH_SHA256),
new DHSha(new SHA1Managed(), protocol => protocol.Args.SessionType.DH_SHA1),
};
}.ToArray();

/// <summary>
/// Finds the hashing algorithm to use given an openid.session_type value.
Expand Down
4 changes: 2 additions & 2 deletions src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs
Expand Up @@ -29,7 +29,7 @@ internal class HmacShaAssociation : Association {
/// <summary>
/// A list of HMAC-SHA algorithms in order of decreasing bit lengths.
/// </summary>
private static HmacSha[] hmacShaAssociationTypes = {
private static HmacSha[] hmacShaAssociationTypes = new List<HmacSha> {
new HmacSha {
CreateHasher = secretKey => new HMACSHA512(secretKey),
GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA512,
Expand All @@ -50,7 +50,7 @@ internal class HmacShaAssociation : Association {
GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA1,
BaseHashAlgorithm = new SHA1Managed(),
},
};
}.ToArray();

/// <summary>
/// The specific variety of HMAC-SHA this association is based on (whether it be HMAC-SHA1, HMAC-SHA256, etc.)
Expand Down

0 comments on commit d5efcec

Please sign in to comment.