diff --git a/src/pluto/ike_alg.c b/src/pluto/ike_alg.c index 1b9974418..8c858ad12 100644 --- a/src/pluto/ike_alg.c +++ b/src/pluto/ike_alg.c @@ -131,64 +131,6 @@ bool ike_alg_enc_present(u_int ealg) return ike_alg_get_encrypter(ealg) != NULL; } -/** - * Validate and register IKE hash algorithm object - */ -int ike_alg_register_hash(struct hash_desc *hash_desc) -{ - const char *alg_name = NULL; - int ret = 0; - - if (hash_desc->algo_id > OAKLEY_HASH_MAX) - { - plog ("ike_alg: hash alg=%d > max=%d" - , hash_desc->algo_id, OAKLEY_HASH_MAX); - return_on(ret,-EINVAL); - } - - alg_name = enum_name(&oakley_hash_names, hash_desc->algo_id); - if (!alg_name) - { - plog ("ike_alg: hash alg=%d not found in constants.c:oakley_hash_names" - , hash_desc->algo_id); - alg_name = ""; - } - -return_out: - if (ret == 0) - ret = ike_alg_add((struct ike_alg *)hash_desc); - - plog("ike_alg: Activating %s hash: %s" - ,alg_name, ret == 0 ? "Ok" : "FAILED"); - - return ret; -} - -/** - * Validate and register IKE encryption algorithm object - */ -int ike_alg_register_enc(struct encrypt_desc *enc_desc) -{ - int ret = ike_alg_add((struct ike_alg *)enc_desc); - - const char *alg_name = enum_name(&oakley_enc_names, enc_desc->algo_id); - - char alg_number[20]; - - /* algorithm is not listed in oakley_enc_names */ - if (alg_name == NULL) - { - snprintf(alg_number, sizeof(alg_number), "OAKLEY_ID_%d" - , enc_desc->algo_id); - alg_name = alg_number; - } - - plog("ike_alg: Activating %s encryption: %s" - , alg_name, ret == 0 ? "Ok" : "FAILED"); - - return ret; -} - /** * Get pfsgroup for this connection */ diff --git a/src/pluto/ike_alg.h b/src/pluto/ike_alg.h index 40791c701..14647e20c 100644 --- a/src/pluto/ike_alg.h +++ b/src/pluto/ike_alg.h @@ -84,8 +84,6 @@ extern struct hash_desc *ike_alg_get_hasher(u_int alg); extern struct encrypt_desc *ike_alg_get_encrypter(u_int alg); extern bool ike_alg_enc_present(u_int ealg); extern bool ike_alg_hash_present(u_int halg); -extern int ike_alg_register_hash(struct hash_desc *a); -extern int ike_alg_register_enc(struct encrypt_desc *e); extern const struct oakley_group_desc* ike_alg_pfsgroup(struct connection *c , lset_t policy); extern struct db_context * ike_alg_db_new(struct alg_info_ike *ai, lset_t policy);