diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-13 06:51:10 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-14 14:30:59 -0800 |
commit | 404e7ff2c44ee18b1412238a1154f34891140325 (patch) | |
tree | 2f4c30e55b3054a02d65366cc056571fdfac046e | |
parent | 41aaea516be8d025985bc698835765f86cccf601 (diff) | |
download | DotNetOpenAuth-404e7ff2c44ee18b1412238a1154f34891140325.zip DotNetOpenAuth-404e7ff2c44ee18b1412238a1154f34891140325.tar.gz DotNetOpenAuth-404e7ff2c44ee18b1412238a1154f34891140325.tar.bz2 |
Changed exception thrown in error case to not get confused with the bad argumentexceptions.
-rw-r--r-- | src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OpenId/RelyingParty/PrivateSecretManager.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs index 6c5f7a0..147d552 100644 --- a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs +++ b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs @@ -176,7 +176,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { byte[] signature; try { signature = this.secretManager.Sign(bytesToSign, returnToParameters[ReturnToSignatureHandleParameterName]); - } catch (ArgumentException ex) { + } catch (ProtocolException ex) { throw ErrorUtilities.Wrap(ex, OpenIdStrings.MaximumAuthenticationTimeExpired); } string signatureBase64 = Convert.ToBase64String(signature); diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/PrivateSecretManager.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/PrivateSecretManager.cs index ca41c03..2fad181 100644 --- a/src/DotNetOpenAuth/OpenId/RelyingParty/PrivateSecretManager.cs +++ b/src/DotNetOpenAuth/OpenId/RelyingParty/PrivateSecretManager.cs @@ -71,14 +71,14 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { /// <returns> /// The signature for the given buffer using the provided handle. /// </returns> - /// <exception cref="ArgumentException">Thrown when an association with the given handle could not be found. + /// <exception cref="ProtocolException">Thrown when an association with the given handle could not be found. /// This most likely happens if the association was near the end of its life and the user took too long to log in.</exception> internal byte[] Sign(byte[] buffer, string handle) { ErrorUtilities.VerifyArgumentNotNull(buffer, "buffer"); ErrorUtilities.VerifyNonZeroLength(handle, "handle"); Association association = this.store.GetAssociation(SecretUri, handle); - ErrorUtilities.VerifyArgument(association != null, OpenIdStrings.PrivateRPSecretNotFound, handle); + ErrorUtilities.VerifyProtocol(association != null, OpenIdStrings.PrivateRPSecretNotFound, handle); return association.Sign(buffer); } |