diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-28 16:00:23 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-28 16:00:23 +0700 |
commit | 2b15619e62a09da46a0b2c0f5279c86394a14eb5 (patch) | |
tree | 4163c0412c125e05bc664cda37263e997c499d14 /crypto/src/tls/TlsUtilities.cs | |
parent | Fix test class name (diff) | |
download | BouncyCastle.NET-ed25519-2b15619e62a09da46a0b2c0f5279c86394a14eb5.tar.xz |
Client message flow for PSK handshake
Diffstat (limited to 'crypto/src/tls/TlsUtilities.cs')
-rw-r--r-- | crypto/src/tls/TlsUtilities.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/src/tls/TlsUtilities.cs b/crypto/src/tls/TlsUtilities.cs index 9dea576f5..8df787b6f 100644 --- a/crypto/src/tls/TlsUtilities.cs +++ b/crypto/src/tls/TlsUtilities.cs @@ -4821,6 +4821,18 @@ namespace Org.BouncyCastle.Tls return authentication; } + internal static TlsAuthentication Skip13ServerCertificate(TlsClientContext clientContext) + { + SecurityParameters securityParameters = clientContext.SecurityParameters; + if (null != securityParameters.PeerCertificate) + throw new TlsFatalAlert(AlertDescription.internal_error); + + securityParameters.m_peerCertificate = null; + securityParameters.m_tlsServerEndPoint = null; + + return null; + } + public static bool ContainsNonAscii(byte[] bs) { for (int i = 0; i < bs.Length; ++i) |