summaryrefslogtreecommitdiff
path: root/programs/pluto/ike_alg.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/pluto/ike_alg.c')
-rw-r--r--programs/pluto/ike_alg.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/programs/pluto/ike_alg.c b/programs/pluto/ike_alg.c
index 456ca3a96..508e4ed2a 100644
--- a/programs/pluto/ike_alg.c
+++ b/programs/pluto/ike_alg.c
@@ -11,7 +11,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: ike_alg.c,v 1.7 2007/01/10 00:36:19 as Exp $
+ * RCSID $Id: ike_alg.c,v 1.8 2007/01/15 07:48:01 as Exp $
*/
#include <stdio.h>
@@ -231,11 +231,12 @@ ike_alg_db_new(struct alg_info_ike *ai , lset_t policy)
{
struct db_context *db_ctx = NULL;
struct ike_info *ike_info;
- u_int ealg, halg, modp, eklen = 0;
struct encrypt_desc *enc_desc;
- bool is_xauth_server;
+ u_int ealg, halg, modp, eklen = 0;
int i;
+ bool is_xauth_server = (policy & POLICY_XAUTH_SERVER) != LEMPTY;
+
if (!ai)
{
whack_log(RC_LOG_SERIOUS, "no IKE algorithms "
@@ -305,8 +306,6 @@ ike_alg_db_new(struct alg_info_ike *ai , lset_t policy)
db_attr_add_values(db_ctx, OAKLEY_GROUP_DESCRIPTION, modp);
}
- is_xauth_server = (policy & POLICY_XAUTH_SERVER) != LEMPTY;
-
if (policy & POLICY_XAUTH_RSASIG)
{
db_trans_add(db_ctx, KEY_IKE);