diff options
author | Tobias Brunner <tobias@strongswan.org> | 2008-05-22 11:39:17 +0000 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2008-05-22 11:39:17 +0000 |
commit | fc1a31d54b324625cca413583abc43406d70e930 (patch) | |
tree | cdeac22676a8d3eda6c601b2864efdc40715fade /src/charon/config/proposal.c | |
parent | 31430acc1bc435b9a7c405978c31c62cc8f747d5 (diff) | |
download | strongswan-fc1a31d54b324625cca413583abc43406d70e930.tar.bz2 strongswan-fc1a31d54b324625cca413583abc43406d70e930.tar.xz |
added ECDH with OpenSSL (see RFC 4753)
Diffstat (limited to 'src/charon/config/proposal.c')
-rw-r--r-- | src/charon/config/proposal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/charon/config/proposal.c b/src/charon/config/proposal.c index 71bb3a2fd..45d0108c2 100644 --- a/src/charon/config/proposal.c +++ b/src/charon/config/proposal.c @@ -766,6 +766,18 @@ static status_t add_string_algo(private_proposal_t *this, chunk_t alg) { add_algorithm(this, DIFFIE_HELLMAN_GROUP, MODP_8192_BIT, 0); } + else if (strncmp(alg.ptr, "ecp256", alg.len) == 0) + { + add_algorithm(this, DIFFIE_HELLMAN_GROUP, ECP_256_BIT, 0); + } + else if (strncmp(alg.ptr, "ecp384", alg.len) == 0) + { + add_algorithm(this, DIFFIE_HELLMAN_GROUP, ECP_384_BIT, 0); + } + else if (strncmp(alg.ptr, "ecp521", alg.len) == 0) + { + add_algorithm(this, DIFFIE_HELLMAN_GROUP, ECP_521_BIT, 0); + } else { return FAILED; |