summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-10-10 21:18:28 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-10-10 21:18:28 -0700
commitb8b3c1cf15fdcb612c72b30f21a523b6714fa54e (patch)
tree35eea80dd2325bb9ba64d60629b56a943b54bac1 /src/DotNetOpenAuth.OpenId.RelyingParty/OpenId
parentcb9ac7c41553b80b380b35d33ecb36222958c42f (diff)
parente28d275f1e328d1cc2939cfadb576db7ed7b56a3 (diff)
downloadDotNetOpenAuth-b8b3c1cf15fdcb612c72b30f21a523b6714fa54e.zip
DotNetOpenAuth-b8b3c1cf15fdcb612c72b30f21a523b6714fa54e.tar.gz
DotNetOpenAuth-b8b3c1cf15fdcb612c72b30f21a523b6714fa54e.tar.bz2
Merging in build support for omitting the Diffie-Hellman algorithm.
Diffstat (limited to 'src/DotNetOpenAuth.OpenId.RelyingParty/OpenId')
-rw-r--r--src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyMessageFactory.cs5
-rw-r--r--src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyMessageFactory.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyMessageFactory.cs
index 4756c6e..9ec6c53 100644
--- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyMessageFactory.cs
+++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyMessageFactory.cs
@@ -95,13 +95,14 @@ namespace DotNetOpenAuth.OpenId.ChannelElements {
// This is a special recognized error case that we create a special message for.
message = new AssociateUnsuccessfulResponse(protocol.Version, associateRequest);
} else if (message == null) {
+#if !ExcludeDiffieHellman
var associateDiffieHellmanRequest = request as AssociateDiffieHellmanRequest;
- var associateUnencryptedRequest = request as AssociateUnencryptedRequest;
-
if (associateDiffieHellmanRequest != null) {
message = new AssociateDiffieHellmanRelyingPartyResponse(protocol.Version, associateDiffieHellmanRequest);
}
+#endif
+ var associateUnencryptedRequest = request as AssociateUnencryptedRequest;
if (associateUnencryptedRequest != null) {
message = new AssociateUnencryptedResponseRelyingParty(protocol.Version, associateUnencryptedRequest);
}
diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs
index 99f1a3e..0e00963 100644
--- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs
+++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs
@@ -68,11 +68,15 @@ namespace DotNetOpenAuth.OpenId.Messages {
associateRequest.AssociationType = associationType;
return associateRequest;
} else {
+#if !ExcludeDiffieHellman
var associateRequest = new AssociateDiffieHellmanRequest(provider.Version, provider.Uri);
associateRequest.AssociationType = associationType;
associateRequest.SessionType = sessionType;
associateRequest.InitializeRequest();
return associateRequest;
+#else
+ return null;
+#endif
}
}
}