summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-02-24 06:24:07 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-02-24 07:58:32 -0800
commit02bf2c67cdc9a9477e0179c77d5c10e7a1c49721 (patch)
tree819848ae0dc1e696f8314e0842bcf49b6e2b4b80 /src
parent61dc047b2cc21403e5b5b5690c925ee5a184aeff (diff)
downloadDotNetOpenAuth-02bf2c67cdc9a9477e0179c77d5c10e7a1c49721.zip
DotNetOpenAuth-02bf2c67cdc9a9477e0179c77d5c10e7a1c49721.tar.gz
DotNetOpenAuth-02bf2c67cdc9a9477e0179c77d5c10e7a1c49721.tar.bz2
Avoids the "Operation could destabilize the runtime" message that can occur in partial trust scenarios when using Diffie-Hellman.
Fixes (or rather works around) Trac #163
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
index 85c0096..8c3d7a2 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/AssociationManager.cs
@@ -9,6 +9,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
using System.Collections.Generic;
using System.Linq;
using System.Net;
+ using System.Security;
using System.Text;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.ChannelElements;
@@ -221,6 +222,14 @@ 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.Uri, ex);
+ return null;
}
}
}