Remove HASH_PREFERRED, usages are replaced with HASH_SHA1, which is required for IKEv2 anyway
This commit is contained in:
@@ -249,9 +249,9 @@ METHOD(crypto_factory_t, create_hasher, hasher_t*,
|
||||
enumerator = this->hashers->create_enumerator(this->hashers);
|
||||
while (enumerator->enumerate(enumerator, &entry))
|
||||
{
|
||||
if (algo == HASH_PREFERRED || entry->algo == algo)
|
||||
if (entry->algo == algo)
|
||||
{
|
||||
if (this->test_on_create && algo != HASH_PREFERRED &&
|
||||
if (this->test_on_create &&
|
||||
!this->tester->test_hasher(this->tester, algo,
|
||||
entry->create_hasher, NULL,
|
||||
default_plugin_name))
|
||||
|
||||
@@ -213,9 +213,6 @@ struct crypto_factory_t {
|
||||
/**
|
||||
* Register a hasher constructor.
|
||||
*
|
||||
* The first added hasher is the preferred hasher returned on
|
||||
* create_hasher(HASH_PREFERRED).
|
||||
*
|
||||
* @param algo algorithm to constructor
|
||||
* @param plugin_name plugin that registered this algorithm
|
||||
* @param create constructor function for that algorithm
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
ENUM(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA512,
|
||||
"HASH_UNKNOWN",
|
||||
"HASH_PREFERRED",
|
||||
"HASH_MD2",
|
||||
"HASH_MD4",
|
||||
"HASH_MD5",
|
||||
@@ -34,7 +33,6 @@ ENUM(hash_algorithm_names, HASH_UNKNOWN, HASH_SHA512,
|
||||
|
||||
ENUM(hash_algorithm_short_names, HASH_UNKNOWN, HASH_SHA512,
|
||||
"unknown",
|
||||
"preferred",
|
||||
"md2",
|
||||
"md4",
|
||||
"md5",
|
||||
@@ -199,7 +197,6 @@ integrity_algorithm_t hasher_algorithm_to_integrity(hash_algorithm_t alg,
|
||||
}
|
||||
break;
|
||||
case HASH_SHA1:
|
||||
case HASH_PREFERRED:
|
||||
switch (length)
|
||||
{
|
||||
case 12:
|
||||
|
||||
@@ -37,16 +37,14 @@ typedef struct hasher_t hasher_t;
|
||||
enum hash_algorithm_t {
|
||||
/** not specified hash function */
|
||||
HASH_UNKNOWN = 0,
|
||||
/** preferred hash function, general purpose */
|
||||
HASH_PREFERRED = 1,
|
||||
HASH_MD2 = 2,
|
||||
HASH_MD4 = 3,
|
||||
HASH_MD5 = 4,
|
||||
HASH_SHA1 = 5,
|
||||
HASH_SHA224 = 6,
|
||||
HASH_SHA256 = 7,
|
||||
HASH_SHA384 = 8,
|
||||
HASH_SHA512 = 9
|
||||
HASH_MD2 = 1,
|
||||
HASH_MD4 = 2,
|
||||
HASH_MD5 = 3,
|
||||
HASH_SHA1 = 4,
|
||||
HASH_SHA224 = 5,
|
||||
HASH_SHA256 = 6,
|
||||
HASH_SHA384 = 7,
|
||||
HASH_SHA512 = 8
|
||||
};
|
||||
|
||||
#define HASH_SIZE_MD2 16
|
||||
|
||||
Reference in New Issue
Block a user