summary refs log tree commit diff
path: root/crypto/src/crypto/tls/TlsKeyExchange.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/crypto/tls/TlsKeyExchange.cs')
-rw-r--r--crypto/src/crypto/tls/TlsKeyExchange.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/crypto/src/crypto/tls/TlsKeyExchange.cs b/crypto/src/crypto/tls/TlsKeyExchange.cs
new file mode 100644
index 000000000..5102edbec
--- /dev/null
+++ b/crypto/src/crypto/tls/TlsKeyExchange.cs
@@ -0,0 +1,38 @@
+using System;
+using System.IO;
+
+namespace Org.BouncyCastle.Crypto.Tls
+{
+	/// <summary>
+	/// A generic interface for key exchange implementations in TLS 1.0.
+	/// </summary>
+	public interface TlsKeyExchange
+	{
+		/// <exception cref="IOException"/>
+		void SkipServerCertificate();
+
+		/// <exception cref="IOException"/>
+		void ProcessServerCertificate(Certificate serverCertificate);
+
+		/// <exception cref="IOException"/>
+		void SkipServerKeyExchange();
+
+		/// <exception cref="IOException"/>
+		void ProcessServerKeyExchange(Stream input);
+
+		/// <exception cref="IOException"/>
+		void ValidateCertificateRequest(CertificateRequest certificateRequest);
+
+		/// <exception cref="IOException"/>
+		void SkipClientCredentials();
+
+		/// <exception cref="IOException"/>
+		void ProcessClientCredentials(TlsCredentials clientCredentials);
+		
+		/// <exception cref="IOException"/>
+		void GenerateClientKeyExchange(Stream output);
+
+		/// <exception cref="IOException"/>
+		byte[] GeneratePremasterSecret();
+	}
+}