summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/Bindings/InvalidSignatureException.cs
blob: 28b7e9620ce9fc04381f6a6071df6825e29f5086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//-----------------------------------------------------------------------
// <copyright file="InvalidSignatureException.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Messaging.Bindings {
	using System;

	/// <summary>
	/// An exception thrown when a signed message does not pass signature validation.
	/// </summary>
	[Serializable]
	internal class InvalidSignatureException : ProtocolException {
		/// <summary>
		/// Initializes a new instance of the <see cref="InvalidSignatureException"/> class.
		/// </summary>
		/// <param name="faultedMessage">The message with the invalid signature.</param>
		public InvalidSignatureException(IProtocolMessage faultedMessage)
			: base(MessagingStrings.SignatureInvalid, faultedMessage) { }

		/// <summary>
		/// Initializes a new instance of the <see cref="InvalidSignatureException"/> class.
		/// </summary>
		/// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> 
		/// that holds the serialized object data about the exception being thrown.</param>
		/// <param name="context">The System.Runtime.Serialization.StreamingContext 
		/// that contains contextual information about the source or destination.</param>
		protected InvalidSignatureException(
		  System.Runtime.Serialization.SerializationInfo info,
		  System.Runtime.Serialization.StreamingContext context)
			: base(info, context) { }
	}
}