summary refs log tree commit diff
path: root/crypto/src/tls/TlsServer.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-17 00:40:40 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-17 00:40:40 +0700
commitae8243b18d515b4942e41989b5d78fd05026ccd3 (patch)
tree5ee2bea0d14234e008b929d20751edde34716325 /crypto/src/tls/TlsServer.cs
parentBiString updates from bc-java (diff)
downloadBouncyCastle.NET-ed25519-ae8243b18d515b4942e41989b5d78fd05026ccd3.tar.xz
TLS 1.3 PSK server-side work
Diffstat (limited to 'crypto/src/tls/TlsServer.cs')
-rw-r--r--crypto/src/tls/TlsServer.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/src/tls/TlsServer.cs b/crypto/src/tls/TlsServer.cs
index 783c8c14d..fe88d7c43 100644
--- a/crypto/src/tls/TlsServer.cs
+++ b/crypto/src/tls/TlsServer.cs
@@ -23,6 +23,17 @@ namespace Org.BouncyCastle.Tls
 
         byte[] GetNewSessionID();
 
+        /// <summary>Return the <see cref="TlsPskExternal">external PSK</see> to select from the ClientHello.</summary>
+        /// <remarks>
+        /// WARNING: EXPERIMENTAL FEATURE, UNSTABLE API
+        /// Note that this will only be called when TLS 1.3 or higher is amongst the offered protocol versions, and one
+        /// or more PSKs are actually offered.
+        /// </remarks>
+        /// <param name="identities">an <see cref="IList"/> of <see cref="PskIdentity"/> instances.</param>
+        /// <returns>The <see cref="TlsPskExternal"/> corresponding to the selected identity, or null to not select
+        /// any.</returns>
+        TlsPskExternal GetExternalPsk(IList identities);
+
         void NotifySession(TlsSession session);
 
         /// <exception cref="IOException"/>