diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-05-11 19:09:20 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-05-11 19:09:20 +0700 |
commit | dbeaae6ba4f8b709246d1f67bfb675f4133ffb8f (patch) | |
tree | 265595215c41b436b3fd3c67aca4f0e2abd48c90 /crypto/src/tls/DtlsServerProtocol.cs | |
parent | Improve HMac reset (diff) | |
download | BouncyCastle.NET-ed25519-dbeaae6ba4f8b709246d1f67bfb675f4133ffb8f.tar.xz |
Improve anon suites
Diffstat (limited to 'crypto/src/tls/DtlsServerProtocol.cs')
-rw-r--r-- | crypto/src/tls/DtlsServerProtocol.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/src/tls/DtlsServerProtocol.cs b/crypto/src/tls/DtlsServerProtocol.cs index c019eb9fb..b01c6e34f 100644 --- a/crypto/src/tls/DtlsServerProtocol.cs +++ b/crypto/src/tls/DtlsServerProtocol.cs @@ -155,7 +155,13 @@ namespace Org.BouncyCastle.Tls } state.keyExchange = TlsUtilities.InitKeyExchangeServer(state.serverContext, state.server); - state.serverCredentials = TlsUtilities.EstablishServerCredentials(state.server); + + state.serverCredentials = null; + + if (!KeyExchangeAlgorithm.IsAnonymous(securityParameters.KeyExchangeAlgorithm)) + { + state.serverCredentials = TlsUtilities.EstablishServerCredentials(state.server); + } // Server certificate { |