That is, do return only the enabled algorithms in states like FIPS140-2,
rather than returning the set that would have been enabled if these
restrictions wouldn't be in place.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
&& cs_algorithms[i].mac_algorithm ==
pcache->mac.priority[mac_idx]) {
*sidx = i;
- return 0;
+
+ if (_gnutls_cipher_exists(cs_algorithms[i].block_algorithm) &&
+ _gnutls_mac_exists(cs_algorithms[i].mac_algorithm))
+ return 0;
+ else
+ break;
}
}
return GNUTLS_E_UNKNOWN_CIPHER_SUITE;