1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/src/tls/KeyExchangeAlgorithm.cs b/crypto/src/tls/KeyExchangeAlgorithm.cs
index 1dfa6db66..fdb2773f1 100644
--- a/crypto/src/tls/KeyExchangeAlgorithm.cs
+++ b/crypto/src/tls/KeyExchangeAlgorithm.cs
@@ -59,5 +59,18 @@ namespace Org.BouncyCastle.Tls
* GMT 0024-2014
*/
public const int SM2 = 25;
+
+ public static bool IsAnonymous(int keyExchangeAlgorithm)
+ {
+ switch (keyExchangeAlgorithm)
+ {
+ case DH_anon:
+ case DH_anon_EXPORT:
+ case ECDH_anon:
+ return true;
+ default:
+ return false;
+ }
+ }
}
}
|