From 8ccb6119a3bf1e1dcf57a3439c94f59d14d61774 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 21 Apr 2022 20:46:29 +0700 Subject: Add HasHkdfAlgorithm method and use in test --- crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crypto/test/src') diff --git a/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs b/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs index a274cc5ba..ddbe4c6b8 100644 --- a/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs +++ b/crypto/test/src/tls/crypto/test/BcTlsCryptoTest.cs @@ -408,6 +408,9 @@ namespace Org.BouncyCastle.Tls.Crypto.Tests for (int i = 0; i < hashes.Length; ++i) { int hash = hashes[i]; + if (!m_crypto.HasHkdfAlgorithm(hash)) + continue; + int hashLen = TlsCryptoUtilities.GetHashOutputSize(hash); TlsSecret zeros = m_crypto.HkdfInit(hash); -- cgit 1.5.1