summaryrefslogtreecommitdiff
path: root/src/pluto/ike_alg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluto/ike_alg.c')
-rw-r--r--src/pluto/ike_alg.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/pluto/ike_alg.c b/src/pluto/ike_alg.c
index 7521dd33b..08353907e 100644
--- a/src/pluto/ike_alg.c
+++ b/src/pluto/ike_alg.c
@@ -194,18 +194,16 @@ struct db_context *ike_alg_db_new(connection_t *c, lset_t policy)
if (policy & POLICY_PUBKEY)
{
- int auth_method = 0;
- size_t key_size = 0;
+ int auth_method = 0, key_size = 0;
key_type_t key_type = KEY_ANY;
-
if (c->spd.this.cert)
{
certificate_t *certificate = c->spd.this.cert->cert;
public_key_t *key = certificate->get_public_key(certificate);
if (key == NULL)
- {
+ {
plog("ike alg: unable to retrieve my public key");
continue;
}
@@ -233,13 +231,13 @@ struct db_context *ike_alg_db_new(connection_t *c, lset_t policy)
case KEY_ECDSA:
switch (key_size)
{
- case 32:
+ case 256:
auth_method = OAKLEY_ECDSA_256;
break;
- case 48:
+ case 384:
auth_method = OAKLEY_ECDSA_384;
break;
- case 66:
+ case 521:
auth_method = OAKLEY_ECDSA_521;
break;
default: