summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-04-30 18:51:02 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-04-30 18:51:02 -0700
commit91822352075ce6402ebddf78f41ec7073dfd5b6c (patch)
tree75e4c76dea7899e3b7e115564ddb76e4e43fbe43 /src
parent42d5665170b4d100fd56d135db7a4d8cebd856a6 (diff)
downloadDotNetOpenAuth-91822352075ce6402ebddf78f41ec7073dfd5b6c.zip
DotNetOpenAuth-91822352075ce6402ebddf78f41ec7073dfd5b6c.tar.gz
DotNetOpenAuth-91822352075ce6402ebddf78f41ec7073dfd5b6c.tar.bz2
Moved the VerificationException catch lower in the stack so it catches more problems.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
index 8ed63f5..9af947a 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
@@ -148,10 +148,20 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
return null;
}
- var associateRequest = AssociateRequest.Create(this.securitySettings, provider);
+ try {
+ var associateRequest = AssociateRequest.Create(this.securitySettings, provider);
- const int RenegotiateRetries = 1;
- return this.CreateNewAssociation(provider, associateRequest, RenegotiateRetries);
+ const int RenegotiateRetries = 1;
+ return this.CreateNewAssociation(provider, associateRequest, RenegotiateRetries);
+ } catch (VerificationException ex) {
+ // See Trac ticket #163. In partial trust host environments, the
+ // Diffie-Hellman implementation we're using for HTTP OP endpoints
+ // sometimes causes the CLR to throw:
+ // "VerificationException: Operation could destabilize the runtime."
+ // Just give up and use dumb mode in this case.
+ Logger.OpenId.ErrorFormat("VerificationException occurred while trying to create an association with {0}. {1}", provider.Endpoint, ex);
+ return null;
+ }
}
/// <summary>
@@ -222,14 +232,6 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
// the exception so that auth may continue in dumb mode.
Logger.OpenId.ErrorFormat("An error occurred while trying to create an association with {0}. {1}", provider.Endpoint, ex);
return null;
- } catch (VerificationException ex) {
- // See Trac ticket #163. In partial trust host environments, the
- // Diffie-Hellman implementation we're using for HTTP OP endpoints
- // sometimes causes the CLR to throw:
- // "VerificationException: Operation could destabilize the runtime."
- // Just give up and use dumb mode in this case.
- Logger.OpenId.ErrorFormat("VerificationException occurred while trying to create an association with {0}. {1}", provider.Endpoint, ex);
- return null;
}
}
}